code-rag-bench/online-tutorials huggingface dataset:
Bootstrap 4 Button .btn-outline-dark class

Use the .btn-outline-dark class in Bootstrap to set dark outline on a button.
The following is an example of a button with dark outline −
Set the above outline to the button, using the btn-outline-dark class as shown below −
<button type="button" class="btn btn-outline-dark">
  Submit
</button>
You can try to run the following code to implement the btn-outline-dark class −
Live Demo
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  </head>
<body>
  <div class="container">  
    <h4>Bootstrap 4</h4>
    <p>Learning  btn-outline-dark class usage:</p>
    <button type="button" class="btn btn-outline-dark">Submit</button>
  </div>
</body>
</html>
IDE | GeeksforGeeks | A computer science portal for geeks

Please enter your email address or userHandle.
123456789101112131415161718192021https://smash.gg/tournament/en-directo-real-madrid-vs-barcelona-supercopa-en-directo-online/detailshttps://smash.gg/tournament/gratis-tv-barcelona-vs-real-madrid-en-vivo-online-12/detailshttps://smash.gg/tournament/supercopa-bar-a-vs-madrid-en-directo/detailshttps://smash.gg/tournament/semifinal-real-madrid-fc-barcelona-en-vivo-gratis/detailshttps://smash.gg/tournament/ver-real-madrid-fc-barcelona-gratis-en-vivo/detailshttps://smash.gg/tournament/supercopa-madrid-vs-bar-a-en-directo/detailshttps://smash.gg/tournament/supercopa-de-espa-a-2022-bar-a-vs-madrid-en/detailshttps://smash.gg/tournament/live-inter-juventus-supercoppa-in-diretta-streaming/detailshttps://smash.gg/tournament/calcio-tv-inter-juve-in-diretta-streaming/detailshttps://smash.gg/tournament/dove-vederla-inter-juve-in-diretta-streaming/detailshttps://smash.gg/tournament/supercoppa-inter-juventus-dove-vederla-in-tv/detailshttps://smash.gg/tournament/streaming-inter-juventus-supercoppa-dove-vederla-in-diretta-tv/detailshttps://smash.gg/tournament/live-diretta-juve-inter-supercoppa-in-diretta-streaming/detailshttps://gametv24sports.blogspot.com/2022/01/supercoppa-dove-vederla.htmlhttps://tumbfrt.tumblr.com/post/673187019079516160/ryrtyt-terytuhttps://www.click4r.com/posts/g/3375865/tytyi7yi-rtytutyhttps://paste2.org/6Oybzgcyhttps://pasteio.com/xAiTh5376hqjhttps://paste.in/tTkmbchttp://www.4mark.net/story/5439421/%e2%98%85-en-directo-real-madrid-vs-barcelona-(supercopa)-en-directo-onlinehttps://www.lattepanda.com/topic-f5t36554.htmlההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
https://ide.geeksforgeeks.org/rS6ZyfkhcM
prog.c:1:6: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â:â token
Difference between Int64 and UInt64 in C# - GeeksforGeeks

26 May, 2020
Int64: This Struct is used to represents 64-bit signed integer. The Int64 can store both types of values including negative and positive between the ranges of -9,223,372,036,854,775,808 to +9, 223,372,036,854,775,807
Example :
C#
// C# program to show the// difference between Int64// and UInt64  using System;using System.Text;  publicclass GFG {    // Main Method  static void Main(string[] args) {      // printing minimum & maximum values    Console.WriteLine("Minimum value of Int64: "                       + Int64.MinValue);    Console.WriteLine("Maximum value of Int64: "                       + Int64.MaxValue);    Console.WriteLine();      // Int64 array    Int64[] arr1 = {-3, 0, 1, 3, 7};      foreach (Int64 i in arr1)    {       Console.WriteLine(i);    }  }}
Output:
Minimum value of Int64: -9223372036854775808
Maximum value of Int64: 9223372036854775807

-3
0
1
3
7

UInt64: This Struct is used to represents 64-bit unsigned integer. The UInt64 can store only positive value only which ranges from 0 to 18,446,744,073,709,551,615.
Example :
C#
// C# program to show the // difference between Int64 // and UInt64  using System;using System.Text;  public class GFG{          // Main Method    static void Main(string[] args)    {          //printing minimum & maximum values        Console.WriteLine("Minimum value of UInt64: "                          + UInt64.MinValue);        Console.WriteLine("Maximum value of UInt64: "                          + UInt64.MaxValue);        Console.WriteLine();                  //Int64 array        UInt64[] arr1 = { 13, 0, 1, 3, 7};                  foreach (UInt64 i in arr1)        {            Console.WriteLine(i);        }    }}
Output:
Minimum value of UInt64: 0
Maximum value of UInt64: 18446744073709551615

13
0
1
3
7

Differences between Int64 and UInt64 in C#
Sr.No
INT64
UINT64
1.
2.
3.
4.
5.
 6.
 Syntax to declare the Int64 :
Int64 variable_name;

  Syntax to declare the UInt64:
UInt64 variable_name;

CSharp-Int64-Struct
CSharp-UInt64-Struct
C#
Difference Between
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
C# Dictionary with examples
C# | Delegates
C# | Method Overriding
C# | Abstract Classes
Difference between Ref and Out keywords in C#
Difference between BFS and DFS
Class method vs Static method in Python
Differences between TCP and UDP
Difference between var, let and const keywords in JavaScript
Differences between IPv4 and IPv6
How to enable/disable a button using jQuery ? - GeeksforGeeks

20 Sep, 2021
In this article, we will demonstrate how to enable and disable buttons using jQuery. This article requires some familiarity with HTML, CSS, JavaScript, and jQuery. The jQuery prop() function can be used to disable a button.  
The property values can be explicitly retrieved using the prop() method. The prop() method only returns the property value for the first matching element in the set. For a property whose value hasn’t been set, or for a matched set that does not contain elements, it returns Undefined.
Syntax:
The selected element’s boolean attribute can be set to true or false using this method. 
$().prop(property, value) 
 
The function returns a boolean value. Whenever the selected element contains a boolean attribute (disabled, checked), it returns true otherwise.
$().prop(property)
What is a disabled attribute?
This is a boolean attribute that indicates the element should not be displayed. It is unusable to use an element that is disabled. You can set the disabled attribute to prevent the element from being used until another condition is met (such as checking a box).
Example: When you click the button below, the button above is disabled, and when you double click the button below, the button above is enabled. The prop is applied in this example to demonstrate how it is used correctly and how it can be applied.
HTML
<!DOCTYPE html><html>  <head>    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js">    </script></head>  <body style="text-align: center;     border:2px solid green;    min-height:240px;">      <h1 style="color:green;">        GeeksforGeeks    </h1>          <button id="update">        update me    </button>          <div style="margin-top:50px;">        <button id="change">            click me        </button>    </div>      <script>        $('#change').on('click', function () {            $('#update').prop('disabled', true);        }        );        $('#change').on('dblclick', function () {            $('#update').prop('disabled', false);        });    </script></body>  </html>
Output:
output
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.
Blogathon-2021
jQuery-Methods
jQuery-Questions
Picked
Blogathon
HTML
JQuery
Web Technologies
HTML
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
How to Create a Table With Multiple Foreign Keys in SQL?
How to Import JSON Data into SQL Server?
Stratified Sampling in Pandas
How to Install Tkinter in Windows?
Python program to convert XML to Dictionary
How to insert spaces/tabs in text using HTML/CSS?
Top 10 Projects For Beginners To Practice HTML and CSS Skills
How to update Node.js and NPM to next version ?
How to set the default value for an HTML <select> element ?
Hide or show elements in HTML using display property
COUNT() Function in SQL Server - GeeksforGeeks

19 Jan, 2021
COUNT() function :
This function in SQL Server is used to find the number of indexes as returned from the query selected.
Features :
This function is used to find the number of indexes as returned from the query selected.
This function comes under Numeric Functions.
This function accepts only one parameter namely expression.
This function ignore NULL values and doesn’t count them.
Syntax :
COUNT(expression)
Parameter :
This method accepts only one parameter as given below:
expression: Specified expression which can either be a field or a string type value.
Returns :
It returns the number of indexes as returned from the query selected.
Example-1 :
Using COUNT() function and getting the output.
CREATE TABLE product
(  
user_id int IDENTITY(100, 2) NOT NULL,    
product_1 VARCHAR(10),
product_2 VARCHAR(10),
price int  
);
INSERT product(product_1, price)  
VALUES ('rice', 400);

INSERT product(product_2, price)  
VALUES ('grains', 600);
SELECT COUNT(user_id) FROM product;
Output :
2
Example-2 :
Using COUNT() function and counting float values.
CREATE TABLE floats
(  
user_id int IDENTITY(100, 2) NOT NULL,
float_val float
);
INSERT floats(float_val)  
VALUES (3.5);
INSERT floats(float_val)  
VALUES (2.1);
INSERT floats(float_val)  
VALUES (6.3);
INSERT floats(float_val)  
VALUES (9.9);
INSERT floats(float_val)  
VALUES (7.0);
SELECT COUNT(float_val) FROM floats;
Output :
5
Example-3 :
Using COUNT() function and getting the output where MRP is greater than the number of counts of MRP.
CREATE TABLE package
(  
user_id int IDENTITY(100, 4) NOT NULL,  
item VARCHAR(10),
mrp int  
);
INSERT package(item, mrp)  
VALUES ('book1', 3);

INSERT package(item, mrp)  
VALUES ('book2', 350);

INSERT package(item, mrp)  
VALUES ('book3', 400);

SELECT * FROM package
WHERE mrp > (SELECT COUNT(mrp) FROM package);
Output :
  | user_id  | item     | mrp
--------------------------------
1 | 104      | book2    | 350
--------------------------------
2 | 108      | book3    | 400
Example-4 :
Using COUNT() function and getting the records of (MRP-sales price).
CREATE TABLE package
(  
user_id int IDENTITY(100, 4) NOT NULL,  
item VARCHAR(10),
mrp int,
sp int
);
INSERT package(item, mrp, sp)  
VALUES ('book1', 250, 240);
INSERT package(item, mrp, sp)  
VALUES ('book2', 350, 320);
INSERT package(item, mrp)  
VALUES ('book3', 400);
SELECT COUNT(mrp-sp) FROM package;
Output :
2
Application :
This function is used to find the number of indexes as returned from the query selected.
DBMS-SQL
SQL-Server
SQL
SQL
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
How to Update Multiple Columns in Single Update Statement in SQL?
SQL | Subquery
How to Create a Table With Multiple Foreign Keys in SQL?
What is Temporary Table in SQL?
SQL Query to Find the Name of a Person Whose Name Starts with Specific Letter
SQL Query to Convert VARCHAR to INT
SQL using Python
How to Write a SQL Query For a Specific Date Range and Date Time?
How to Select Data Between Two Dates and Times in SQL Server?
SQL Query to Compare Two Dates
Angular ng Bootstrap Datepicker Component - GeeksforGeeks

06 Jul, 2021
Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make responsive websites.
In this article, we will see how to use Datepicker in angular ng bootstrap. The Datepicker is used to make a component that will be shown by using a calendar.
Installation syntax:
ng add @ng-bootstrap/ng-bootstrap
Approach:
First, install the angular ng bootstrap using the above-mentioned command. 
 
Add the following script in index.html<link href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” rel=”stylesheet”>
<link href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” rel=”stylesheet”>
Import ng bootstrap module in module.tsimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';

imports: [
  NgbModule
]

import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

imports: [
  NgbModule
]

In app.component.html, make a datepicker component.
Serve the app using ng serve.
Example: In this example, we are making a basic example of datepicker.
app.component.html
<ngb-datepicker id='gfg'></ngb-datepicker>
app.module.ts
import { NgModule } from '@angular/core';  // Importing forms moduleimport { FormsModule, ReactiveFormsModule  }from '@angular/forms';import { BrowserModule }from '@angular/platform-browser';import { BrowserAnimationsModule } from '@angular/platform-browser/animations';import { AppComponent }   from './app.component';import { NgbModule } from '@ng-bootstrap/ng-bootstrap';   @NgModule({  bootstrap: [    AppComponent  ],  declarations: [    AppComponent  ],  imports: [    FormsModule,    BrowserModule,    BrowserAnimationsModule,    ReactiveFormsModule,    NgbModule  ]})export class AppModule { }
app.component.css
#gfg{    margin:40px}
Output:
Reference: https://ng-bootstrap.github.io/#/components/datepicker/overview
Angular-ng-bootstrap
AngularJS
Web Technologies
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Angular PrimeNG Dropdown Component
Angular PrimeNG Calendar Component
Angular 10 (blur) Event
Angular PrimeNG Messages Component
How to make a Bootstrap Modal Popup in Angular 9/8 ?
Remove elements from a JavaScript Array
Installation of Node.js on Linux
Convert a string to an integer in JavaScript
How to fetch data from an API in ReactJS ?
How to insert spaces/tabs in text using HTML/CSS?
Shell Script to Demonstrate Special Parameters With Example - GeeksforGeeks

20 Apr, 2021
Here, we are going to see what are the special Parameters of the shell script. Before that first, let’s understand what is parameters in the shell. The parameter is the entity that stores the value. The variables are the parameters that are defined by the user to use in that specific shell script. And the Special parameters are the read-only variables that are predefined and maintained by the shell. Now let’s see what are the Special parameters in the bash shell.
This parameter represents the current flags set in your shell .himBH are the flags in bash shell.
Where:
H – histexpand
m – monitor
h – hashall
B – braceexpand
i – interactive
Now let’s see the script which demonstrates all Special Parameters.
#!/bin/bash

echo "Number of argument passed: $#"
echo "Script name is $0"
echo "The 2nd argument passed is: $2"
echo "Arguments passed to script are: $*"
echo "Exit status of last command that executed:$?" #This is the previous command for $_
echo "Last argument provide to previous command:$_"
echo "PID of current shell is: $$"
echo "Flags are set in the shell: $-"
Now let’s see the output of the above script:
Picked
Shell Script
Linux-Unix
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
scp command in Linux with Examples
mv command in Linux with examples
Docker - COPY Instruction
SED command in Linux | Set 2
chown command in Linux with Examples
nohup Command in Linux with Examples
Named Pipe or FIFO with example C program
Thread functions in C/C++
uniq Command in LINUX with examples
Start/Stop/Restart Services Using Systemctl in Linux
How to Install Scala on MacOS? - GeeksforGeeks

30 Nov, 2021
In this article, we are going to show you how you can download and install Scala on your Mac operating system. First of all, you need to download the Java JDK which you can download here
Follow the below steps to install Scala on MacOS:
Step 1: After installing JDK, run the following commands and make sure they don’t return an error :
javac -version
java -version
Step 2: Now, we need to download and install scala 
download the binary file from the official-website
Step 3: After downloading it you’ll have to extract it from the command line. And make sure to extract it in the root directory
tar -zxvf scala-2.12.8.tgz
Step 4: After extracting run the following command
sudo cp -R scala-X.XX /usr/local/scala
When you run this command the output like where you’ll find folders like bin, doc, lib, man.
Step 5: Open your .bash_profile file and run the following command :
sudo nano ~/.bash_profile
Step 6: The following step is to change or add environment variables. Replace USERNAME with your actual username, but make sure your file location is right.
export SCALA_HOME="/Users/USERNAME/scala-2.12.6"
export PATH=$PATH:$SCALA_HOME/bin
Step 7: Save and Restart the terminal.
Step 8: Now run the commands to check the Scala is installed properly.
scalac -version
scala -version
how-to-install
Picked
How To
Installation Guide
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
How to Install FFmpeg on Windows?
How to Add External JAR File to an IntelliJ IDEA Project?
How to Set Git Username and Password in GitBash?
How to create a nested RecyclerView in Android
How to Install Jupyter Notebook on MacOS?
Installation of Node.js on Linux
How to Install FFmpeg on Windows?
How to Install Pygame on Windows ?
How to Add External JAR File to an IntelliJ IDEA Project?
How to Install Jupyter Notebook on MacOS?
Scala Iterator count() method with example - GeeksforGeeks

30 Jun, 2019
The count() method belongs to the concrete value members of the class Abstract Iterator. It is defined in the class IterableOnceOps. It counts the number of elements in the stated collection which satisfy the given predicate.
Method Definition : def count(p: (A) => Boolean): Int
Where, p is the predicate used.
Return Type :It returns the number of elements satisfying the predicate p.
Example #1:
// Scala program of count()// method  // Creating objectobject GfG{       // Main method    def main(args:Array[String])    {              // Creating an Iterator         val iter = Iterator(5, 6, 8)                  // Applying count method        val result = iter.count(x => {x % 3 != 0})                  // Displays output        println(result)          }}
2

Here, only two elements satisfies the stated predicate so, two is returned.Example #2:
// Scala program of count()// method  // Creating objectobject GfG{       // Main method    def main(args:Array[String])    {              // Creating an Iterator         val iter = Iterator(4, 6, 10, 11, 13)                  // Applying count method        val result = iter.count(x => {x % 2 == 0})                  // Displays output        println(result)          }}
3

Scala
Scala-Method
Scala
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Type Casting in Scala
Class and Object in Scala
Scala Lists
Scala Tutorial – Learn Scala with Step By Step Guide
Operators in Scala
Scala Constructors
Scala String substring() method with example
Scala | Arrays
How to get the first element of List in Scala
Scala String replace() method with example
java.time.ZoneId Class in Java - GeeksforGeeks

03 Mar, 2021
A ZoneId is used to identify the rules that used to convert between a LocalDateTime and an Instant of time. The actual rules, describing when and the way the offset changes, are defined by ZoneRules. This class is just an ID wont to obtain the underlying rules. The given approach has opted because the government defines the rules and alters frequently, whereas the ID is stable.
There are two distinct types of ID:
Fixed offsets is a fully resolved offset from UTC/Greenwich, that uses the same offset for all local date-timesGeographical regions are a neighborhood where a selected set of rules for locating the offset from UTC/Greenwich apply
Fixed offsets is a fully resolved offset from UTC/Greenwich, that uses the same offset for all local date-times
Geographical regions are a neighborhood where a selected set of rules for locating the offset from UTC/Greenwich apply
Declaration of java.time.ZoneId class
public abstract class ZoneId extends Object implements Serializable  
A zone map overrides to enable the short time-zone names to be used. The use of short zone IDs has been deprecated in java.util.TimeZone. This map allows the IDs to still be used via the of(String, Map) factory method. This map contains a mapping of the IDs that’s in line with TZDB 2005r and later, where ‘EST’, ‘MST’ and ‘HST’ map to IDs that don’t include daylight savings.
This maps as follows:
EST
HST 
MST 
ACT 
AET 
AGT 
ART
AST 
BET 
BST 
CAT 
CNT 
CST 
CTT 
EAT 
ECT 
IET 
IST 
JST 
MIT 
NET 
NST 
PLT 
PNT
PRT 
PST 
SST 
Note: The map is unmodifiable.
Methods of ZoneId class:
Below is an example of the implementation of some methods:
Java
// java.time.ZoneId Class in Java with exampleimport java.time.*;public class GFG {    public static void main(String[] args)    {          // Setting Zone1        ZoneId zoneid1 = ZoneId.of("Asia/Kolkata");        // Setting Zone2        ZoneId zoneid2 = ZoneId.of("Europe/London");        LocalTime time1 = LocalTime.now(zoneid1);        LocalTime time2 = LocalTime.now(zoneid2);        System.out.println(time1);        System.out.println(time2);          // Checking if the time of zone1        // comes before time of second zone        System.out.println(time1.isBefore(time2));    }}
22:34:11.044312
17:04:11.044385
false
Java-time package
Java-ZoneId
Picked
Technical Scripter 2020
Java
Technical Scripter
Java
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Stream In Java
Constructors in Java
Exceptions in Java
Functional Interfaces in Java
Different ways of Reading a text file in Java
Generics in Java
Introduction to Java
Comparator Interface in Java with Examples
Internal Working of HashMap in Java
Strings in Java
DCL Full Form - GeeksforGeeks

14 May, 2020
DCL stands for Data Control Language in Structured Query Language (SQL). As the name suggests these commands are used to control privilege in the database. The privileges (Right to access the data) are required for performing all the database operations like creating tables, views, or sequences.DCL command is a statement that is used to perform the work related to the rights, permissions, and other control of the database system.
There are two types of Privileges in database:
System Privilege
Object Privilege
Unauthorized access to the data should be prevented in order to achieve security in our database
DCL commands maintain the database effectively than anyone else other than database administrator is not allowed to access the data without permission.
These commands provide flexibility to the data administrator to set and remove database permissions in granular fashion.
The two most important DCL commands are:
GRANT
REVOKE
This command is used to grant permission to the user to perform a particular operation on a particular object. If you are a database administrator and you want to restrict user accessibility such as one who only views the data or may only update the data. You can give the privilege permission to the users according to your wish.
Syntax:
GRANT privilege_list
ON Object_name
TO user_name;

This command is used to take permission/access back from the user. If you want to return permission from the database that you have granted to the users at that time you need to run REVOKE command.
Syntax:
REVOKE privilege_list
ON object_name
FROM user_name;

Following commands are granted to the user as a Privilege List:
EXECUTE
UPDATE
SELECT
DELETE
ALTER
ALL
It allows to restrict the user from accessing data in database.
It ensures security in database when the data is exposed to multiple users.
It is the wholesome responsibility of the data owner or data administrator to maintain the authority of grant and revoke privileges to the users preventing any threat to data.
It prevents other users to make changes in database who have no access to Database
Picked
DBMS
Full Form
SQL
Write From Home
DBMS
SQL
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Deadlock in DBMS
Types of Functional dependencies in DBMS
What is Temporary Table in SQL?
KDD Process in Data Mining
Conflict Serializability in DBMS
DBA Full Form
HTTP Full Form
RDBMS Full Form
CDMA Full Form
SCTP Full Form
ASCII() Function in SQL Server - GeeksforGeeks

07 Oct, 2020
The ASCII() function returns the ASCII value of the leftmost character of a character expression.
Syntax :
ASCII(character_expression)
Parameter :This method accepts a single-parameter as mentioned above and described below :character_expression :It can be a literal character, an expression of a string, or a column. If more than one character is entered, it will only return the value for the leftmost character.Returns :It returns the ASCII code value of its leftmost character.
Example-1 :When the arguments hold the single uppercase and lowercase letter.
SELECT ASCII('A') AS A, ASCII('a') AS a,
ASCII('Z') AS Z, ASCII('z') AS z;
Output :
Example-2 :When the arguments hold the single number and special character.
SELECT ASCII('1') AS [1], ASCII('#') AS #,
ASCII(9) AS [9], ASCII('@') AS [@]; 
Output :
Example-3 :When the arguments hold the expression of a string.
SELECT ASCII('GeeksForGeeks');
Output :
71
Example-4 :Using ASCII() function with table columns.Table – Player_Details
SELECT PlayerName, ASCII(PlayerName) AS AsciiCodeOfFirstChar
FROM Player_Details;
Output :
SQL-Server
SQL
SQL
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
SQL Interview Questions
CTE in SQL
How to Update Multiple Columns in Single Update Statement in SQL?
Difference between DELETE, DROP and TRUNCATE
MySQL | Group_CONCAT() Function
Difference between DELETE and TRUNCATE
SQL - ORDER BY
SQL | Subquery
How to Create a Table With Multiple Foreign Keys in SQL?
What is Temporary Table in SQL?
conj() function in C++ with Examples - GeeksforGeeks

05 Aug, 2021
The conj() function is defined in the complex header file. This function is used to find the conjugate of the complex number z. If we represent a complex number z as (real, img), then its conjugate is (real, -img).Syntax:  
template<class T> complex<T> 
     conj (const complex<T>& Z);
Parameter:  
z: This method takes a mandatory parameter z which represents the complex number.
Return value: This function returns the conjugate of the complex number z.Below programs illustrate the conj() function for complex number in C++:Example 1:- 
CPP
// C++ program to demonstrate// example of conj() function.  #include <bits/stdc++.h>using namespace std;  // driver programint main (){  complex<double> complexnumber (3.0, 2.4);    cout << "The conjugate of " << complexnumber << " is: ";    // use of conj() function  cout << conj(complexnumber) << endl;  return 0;}
The conjugate of (3,2.4) is: (3,-2.4)
 
Example 2:-
CPP
// C++ program to demonstrate// example of conj() function.  #include <bits/stdc++.h>using namespace std;  // driver programint main (){  complex<double> complexnumber (2.0, 9.0);    cout << "The conjugate of " << complexnumber << " is: ";    // use of conj() function  cout << conj(complexnumber) << endl;  return 0;}
The conjugate of (2,9) is: (2,-9)
 
sagar0719kumar
CPP-Library
cpp-math
C++
CPP
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Operator Overloading in C++
Polymorphism in C++
Sorting a vector in C++
Friend class and function in C++
Pair in C++ Standard Template Library (STL)
Convert string to char array in C++
Iterators in C++ STL
Inline Functions in C++
List in C++ Standard Template Library (STL)
Multithreading in C++
Groovy - sqrt()

The method returns the square root of the argument.
double sqrt(double d)

d - Any primitive data type.
This method Returns the square root of the argument.
Following is an example of the usage of this method −
class Example { 
   static void main(String[] args) { 
      double x = 11.635; 
      double y = 2.76; 
	  
      System.out.printf("The value of e is %.4f%n", Math.E); 
      System.out.printf("sqrt(%.3f) is %.3f%n", x, Math.sqrt(x)); 
   } 
}
When we run the above program, we will get the following result −
The value of e is 2.7183 
sqrt(11.635) is 3.411


    52 Lectures 
     8 hours 

 Krishna Sakinala

    49 Lectures 
     2.5 hours 

 Packt Publishing
 Print
 Add Notes
 Bookmark this page
Escape sequences in C

Many programming languages support a concept called Escape Sequence. When a character is preceded by a backslash (\), it is called an escape sequence and it has a special meaning to the compiler. For example, \n in the following statement is a valid character and it is called a new line character −
char ch = '\n';
Here, character n has been preceded by a backslash (\), it has special meaning which is a new line but keep in mind that backslash (\) has special meaning with a few characters only. The following statement will not convey any meaning in C programming and it will be assumed as an invalid statement −
char ch = '\1';
The following table lists the escape sequences available in C programming language −
#include <stdio.h>
int main() {
   char ch1;
   char ch2;
   char ch3;
   char ch4;
   ch1 = '\t';
   ch2 = '\n';
   printf( "Test for tabspace %c and a newline %c will start here", ch1, ch2);
}
Test for tabspace and a newline
will start here
How to use handler in android?

This example demonstrate about How to use handler in android
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
<LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"
   android:orientation = "vertical"
   android:layout_width = "match_parent"
   android:layout_height = "match_parent">
   <Button
      android:id = "@+id/my_button"
      android:layout_width = "100dp"
      android:layout_height = "wrap_content"
      android:layout_x = "0dp"
      android:layout_y = "0dp"
      android:text = "Yes" />
</LinearLayout>
In the above code, we have taken button.
Step 3 − Add the following code to src/MainActivity.java
<?xml version = "1.0" encoding = "utf-8"?>
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
import android.widget.Button;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;

public class MainActivity extends FragmentActivity {
   Handler handler;
   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      handler = new Handler();
      final Button button = (Button) findViewById(R.id.my_button);
      final DisplayMetrics displaymetrics = new DisplayMetrics();
      getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
      final Timer timer = new Timer();
      timer.schedule(new TimerTask() {
         @Override
         public void run() {
            handler.post(new Runnable() {
               @Override
               public void run() {
                  Random R = new Random();
                  final float dx = R.nextFloat() * displaymetrics.widthPixels;
                  final float dy = R.nextFloat() * displaymetrics.heightPixels;
                  final Timer timer = new Timer();
                  button.animate()
                  .x(dx)
                  .y(dy)
                  .setDuration(0)
                  .start();
               }
            });
         }
      }, 0, 1000);
   }
}
Let's try to run your application. I assume you have connected your actual Android Mobile device with your computer. To run the app from android studio, open one of your project's activity files and click Run  icon from the toolbar. Select your mobile device as an option and then check your mobile device which will display your default screen –
Click here to download the project code
How can I convert Python dictionary to JavaScript hash table?

Python and javascript both have different representations for a dictionary. So you need an intermediate representation in order to pass data between them. The most commonly used intermediate representation is JSON, which is a simple lightweight data-interchange format.
The dumps function converts the dict to a string. 
import json
my_dict = {
   'foo': 42,'bar': {
      'baz': "Hello",'poo': 124.2
   }
}
my_json = json.dumps(my_dict)
print(my_json)
This will give the output −
'{"foo": 42, "bar": {"baz": "Hello", "poo": 124.2}}'
The load's function converts the string back to a dict. 
import json
my_str = '{"foo": 42, "bar": {"baz": "Hello", "poo": 124.2}}'
my_dict = json.loads(my_str)
print(my_dict['bar']['baz'])
This will give the output −
Hello
On the JS side of things, you don't need to do anything. This is because JSON literally means JavaScript Object Notation. And JS implicitly constructs objects from JSON. If you get a string, you can convert it using JSON.parse().
How to remove an object using filter() in JavaScript?

Let’s say, we have the following objects in JavaScript −
ObjectValue =[
   { "id": "101", "details": { Name:"John",subjectName:"JavaScript" }},
   { "id": "102", "details": { Name:"David",subjectName:"MongoDB" }},
   { "id": "103" }
]
To remove an object using filter(), the code is as follows −
ObjectValue =[
   { "id": "101", "details": { Name:"John",subjectName:"JavaScript" }},
   { "id": "102", "details": { Name:"David",subjectName:"MongoDB" }},
   { "id": "103" }
]
output=ObjectValue.filter(obj=>obj.details)
console.log(output)
To run the above program, you need to use the following command −
node fileName.js.
This will produce the following output −
PS C:\Users\Amit\JavaScript-code> node demo46.js
[
   { id: '101', details: { Name: 'John', subjectName: 'JavaScript' } },
   { id: '102', details: { Name: 'David', subjectName: 'MongoDB' } }
]
What are required arguments of a function in python?

Required arguments are the mandatory arguments of a function. These argument values must be passed in correct number and order during function call. 
If you run the given code you get the following output
Hi 15
Traceback (most recent call last):
  File "requiredarg1.py", line 4, in <module>
    requiredArg('Hello')
TypeError: requiredArg() takes exactly 2 arguments (1 given)
EXPLANATION
In the output above for the first function call with two required arguments we get the output as Hi 15. But for the second function call with only one argument, we get a TypeError saying the function takes exactly 2 arguments. This shows the importance of required arguments and their mandatory nature
All combinations of sums for array in JavaScript

We are required to write a JavaScript function that takes in an array of Numbers as the first
argument and a number, say n as the second argument. The number n will always be less than or equal to the length of the array.
Our function should return an array of the sum of all elements of all the possible subarrays of length n from the original array.
For example, If the input is −
const arr = [2, 6, 4];
const n = 2;
Then the output should be −
const output = [8, 10, 6];
The code for this will be −
const arr = [2, 6, 4];
const n = 2;
const buildCombinations = (arr, num) => {
   const res = [];
   let temp, i, j, max = 1 << arr.length;
   for(i = 0; i < max; i++){
      temp = [];
      for(j = 0; j < arr.length; j++){
         if (i & 1 << j){
            temp.push(arr[j]);
         };
      };
      if(temp.length === num){
         res.push(temp.reduce(function (a, b) { return a + b; }));
      };
   };
   return res;
}
console.log(buildCombinations(arr, n));
The output in the console −
[ 8, 6, 10 ]
Calculate the absolute value in R programming - abs() method - GeeksforGeeks

10 May, 2020
abs() method in R programming is used to get the absolute value that is positive value doesn’t change and negative value converted into positive value.
Syntax: abs(value)
Return: Returns the absolute value.
Example 1:
# R program to calculate absolute value  # Using abs() methodanswer1 <- abs(-12)answer2 <- abs(21)answer3 <- abs(-2)  print(answer1)print(answer2)print(answer3)
Output:
[1] 12
[2] 21
[3] 2

Example 2:
# R program to calculate absolute value  # Using abs() methodanswer1 <- abs(c(1, 2, 3, 4))answer2 <- abs(c(1, -2, 3, -4))  print(answer1)print(answer2)
Output:
[1] 1 2 3 4
[2] 1 2 3 4

R Language
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Filter data by multiple conditions in R using Dplyr
Loops in R (for, while, repeat)
How to change Row Names of DataFrame in R ?
Change Color of Bars in Barchart using ggplot2 in R
Group by function in R using Dplyr
How to Change Axis Scales in R Plots?
How to Split Column Into Multiple Columns in R DataFrame?
R Programming Language - Introduction
K-Means Clustering in R Programming
Replace Specific Characters in String in R
MySQL MIN() and MAX() Functions

The MIN() function returns the smallest value of the selected column.
The MAX() function returns the largest value of the selected column.
Below is a selection from the "Products" table in the Northwind sample database:
The following SQL statement finds the price of the cheapest product:
The following SQL statement finds the price of the most expensive product:
Use the MIN function to select the record with the smallest value of the Price column.
SELECT 
FROM Products;

Start the Exercise
We just launchedW3Schools videos
Get certifiedby completinga course today!
If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
help@w3schools.com
Your message has been sent to W3Schools.
Find max in struct array - GeeksforGeeks

06 Jun, 2018
Given a struct array of type Height, find max
struct Height{
  int feet;
  int inches;
}

Question source : Microsoft Interview Experience Set 127 | (On-Campus for IDC)
The idea is simple, traverse the array, and keep track of max valuevalue of array element(in inches) = 12*feet + inches
// CPP program to return max// in struct array#include <iostream>#include <climits>using namespace std;  // struct Height// 1 feet = 12 inchesstruct Height {    int feet;    int inches;};  // return max of the arrayint findMax(Height arr[], int n){    int mx = INT_MIN;    for (int i = 0; i < n; i++) {        int temp = 12 * (arr[i].feet)                      + arr[i].inches;        mx = max(mx, temp);    }    return mx;}  // driver programint main(){    // initialize the array    Height arr[] = {        { 1, 3 },        { 10, 5 },        { 6, 8 },        { 3, 7 },        { 5, 9 }    };    int res = findMax(arr, 5);    cout << "max :: " << res << endl;    return 0;}
Output:
max :: 125

This article is contributed by Mandeep Singh. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
ASAJ RAWAT
Microsoft
Arrays
Microsoft
Arrays
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Window Sliding Technique
Trapping Rain Water
Reversal algorithm for array rotation
Building Heap from Array
Move all negative numbers to beginning and positive to end with constant extra space
Program to find sum of elements in a given array
Find duplicates in O(n) time and O(1) extra space | Set 1
Count pairs with given sum
Next Greater Element
Remove duplicates from sorted array
Program to sort each diagonal elements in ascending order of a matrix in C++

Suppose we have n x m matrix Mat, we have to sort this Mat diagonally in increasing order from top-left to the bottom right, so that all elements in the diagonals are sorted. So if the input matrix is like −
The output matrix will be −
To solve this, we will follow these steps −
Define a method called solve(), this will take si, sj and matrix mat
Define a method called solve(), this will take si, sj and matrix mat
n := number of rows and m := number of columns
n := number of rows and m := number of columns
make an array called temp
make an array called temp
i:= si and j := sj, and index := 0
i:= si and j := sj, and index := 0
while i < n and j < m, doinsert m[i, j] into temp, then increase i and j by 1
while i < n and j < m, do
insert m[i, j] into temp, then increase i and j by 1
insert m[i, j] into temp, then increase i and j by 1
sort temp array
sort temp array
set index := 0, i := si and j := sj
set index := 0, i := si and j := sj
while i < n and j < mmat[i, j] := temp[index]increase i, j and index by 1
while i < n and j < m
mat[i, j] := temp[index]
mat[i, j] := temp[index]
increase i, j and index by 1
increase i, j and index by 1
from the main method, do the following −
from the main method, do the following −
n := number of rows and m := number of columns
n := number of rows and m := number of columns
for i in range 0 to n – 1, dosolve(i, 0, mat)
for i in range 0 to n – 1, do
solve(i, 0, mat)
solve(i, 0, mat)
for j in range 1 to m – 1, dosolve(0, j, mat)
for j in range 1 to m – 1, do
solve(0, j, mat)
solve(0, j, mat)
return mat
return mat
Let us see the following implementation to get better understanding −
 Live Demo
#include <bits/stdc++.h>
using namespace std;
void print_vector(vector<vector<auto> > v){
   cout << "[";
   for(int i = 0; i<v.size(); i++){
      cout << "[";
      for(int j = 0; j <v[i].size(); j++){
         cout << v[i][j] << ", ";
      }
      cout << "],";
   }
   cout << "]"<<endl;
}
class Solution {
   public:
   void solve(int si, int sj, vector < vector <int> > &mat){
      int n = mat.size();
      int m = mat[0].size();
      vector <int> temp;
      int i = si;
      int j = sj;
      int idx = 0;
      while(i < n && j < m){
         temp.push_back(mat[i][j]);
         i++;
         j++;
      }
      sort(temp.begin(), temp.end());
      idx = 0;
      i = si;
      j = sj;
      while(i < n && j < m){
         mat[i][j] = temp[idx];
         i++;
         j++;
         idx++;
      }
   }
   vector<vector<int>> diagonalSort(vector<vector<int>>& mat) {
      int n = mat.size();
      int m = mat[0].size();
      for(int i = 0; i <n; i++){
         solve(i, 0, mat);
      }
      for(int j = 1; j < m; j++){
         solve(0, j, mat);
      }
      return mat;
   }
};
main(){
   vector<vector<int>> v = {{3,3,1,1},{2,2,1,2},{1,1,1,2}};
   Solution ob;
   print_vector(ob.diagonalSort(v));
}
{{3,3,1,1},{2,2,1,2},{1,1,1,2}}
[[1, 1, 1, 1, ], [1, 2, 2, 2, ], [1, 2, 3, 3, ],]
How to create a ToolBar in JavaFX?

A toolbar is used to display UI elements such as buttons, toggle buttons, and separators, etc.. You cannot add any other nodes to a toolbar. The contents of a toolbar can be arranged either horizontally or vertically. You can create a toolbar by instantiating the javafx.scene.control.ToolBar class.
The following Example demonstrates the creation of a ToolBar.
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Separator;
import javafx.scene.control.ToolBar;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class ToolBarExample extends Application {
   public void start(Stage stage) {
      Button bt1 = new Button("Java");
      Button bt2 = new Button("JavaFX");
      Separator sep1 = new Separator();
      Button bt3 = new Button("Neo4J");
      Button bt4 = new Button("MongoDB");
      Separator sep2 = new Separator();
      Button bt5 = new Button("Python");
      Button bt6 = new Button("C++");
      //Creating a tool bar
      ToolBar toolBar = new ToolBar();
      //Retrieving the items list of the toolbar
      ObservableList list = toolBar.getItems();
      list.addAll(bt1, bt2, sep1, bt3, bt4, sep2, bt5, bt6);
      //Creating a vbox to hold the pagination
      VBox vbox = new VBox();
      vbox.setSpacing(15);
      vbox.setPadding(new Insets(50, 50, 50, 100));
      vbox.getChildren().addAll(toolBar);
      //Setting the stage
      Scene scene = new Scene(new Group(vbox), 595, 150, Color.BEIGE);
      stage.setTitle("Tool Bar");
      stage.setScene(scene);
      stage.show();
   }
   public static void main(String args[]){
      launch(args);
   }
}
AWK - Bit Manipulation Functions

AWK has the following built-in bit manipulation functions −
Performs bitwise AND operation.
[jerry]$ awk 'BEGIN {
   num1 = 10
   num2 = 6
   printf "(%d AND %d) = %d\n", num1, num2, and(num1, num2)
}'
On executing this code, you get the following result −
(10 AND 6) = 2

It performs bitwise COMPLEMENT operation.
[jerry]$ awk 'BEGIN {
   num1 = 10
   printf "compl(%d) = %d\n", num1, compl(num1)
}'
On executing this code, you get the following result −
compl(10) = 9007199254740981

It performs bitwise LEFT SHIFT operation.
[jerry]$ awk 'BEGIN {
   num1 = 10
   printf "lshift(%d) by 1 = %d\n", num1, lshift(num1, 1)
}'
On executing this code, you get the following result −
lshift(10) by 1 = 20

It performs bitwise RIGHT SHIFT operation.
[jerry]$ awk 'BEGIN {
   num1 = 10
   printf "rshift(%d) by 1 = %d\n", num1, rshift(num1, 1)
}'
On executing this code, you get the following result −
rshift(10) by 1 = 5

It performs bitwise OR operation.
[jerry]$ awk 'BEGIN {
   num1 = 10
   num2 = 6
   printf "(%d OR %d) = %d\n", num1, num2, or(num1, num2)
}'
On executing this code, you get the following result −
(10 OR 6) = 14

It performs bitwise XOR operation.
[jerry]$ awk 'BEGIN {
   num1 = 10
   num2 = 6
   printf "(%d XOR %d) = %d\n", num1, num2, xor(num1, num2)
}'
On executing this code, you get the following result −
(10 bitwise xor 6) = 12

 Print
 Add Notes
 Bookmark this page
C library function - fclose()

The C library function int fclose(FILE *stream) closes the stream. All buffers are flushed.
Following is the declaration for fclose() function.
int fclose(FILE *stream)
stream − This is the pointer to a FILE object that specifies the stream to be closed.
stream − This is the pointer to a FILE object that specifies the stream to be closed.
This method returns zero if the stream is successfully closed. On failure, EOF is returned.
The following example shows the usage of fclose() function.
#include <stdio.h>

int main () {
   FILE *fp;
 
   fp = fopen("file.txt", "w");

   fprintf(fp, "%s", "This is tutorialspoint.com");
   fclose(fp);
   
   return(0);
}
Let us compile and run the above program that will create a file file.txt, and then it will write following text line and finally it will close the file using fclose() function.
This is tutorialspoint.com


    12 Lectures 
     2 hours 

 Nishant Malik

    12 Lectures 
     2.5 hours 

 Nishant Malik

    48 Lectures 
     6.5 hours 

 Asif Hussain

    12 Lectures 
     2 hours 

 Richa Maheshwari

    20 Lectures 
     3.5 hours 

 Vandana Annavaram

    44 Lectures 
     1 hours 

 Amit Diwan
 Print
 Add Notes
 Bookmark this page