Here I am giving 3 examples to copy URL to clipboard on button click using JavaScript, jQuery, and HTML. Example -1: Copy URL to Clipboard on Button Click Using JavaScript In the below code, the JavaScript function copyToClipboard is written ...
Discy Latest Articles
Find When Your Mac Was Last Shutdown
VinishTo find when your Mac last shutdown, use the last shutdown command in the Terminal app. Below is an example: Open the Terminal app and then execute the following command: last shutdown It will give you the list of last ...
Oracle SELECT Statement
VinishIn Oracle, the SELECT statement is used to get the data from the tables, views, etc. The following is the syntax of the SQL SELECT statement: Oracle SELECT Statement Syntax [ with_clause ] SELECT [ hint ] [ { { ...
Python Append List to List Example
VinishIn this example, you will learn how to append a list to a list in Python. Append List to List Python Program Example The following Python program will create a fruit list and a vegetable list; then, it will append ...
JavaScript Object Get Value by Key
VinishIn this example, you will learn how to get object value by key in JavaScript. JavaScript Object Get Value by Key Example The following is an object in JavaScript: var objct = { 1: “One”, 2: “Two”, 3: “Three”, Four: ...
Import Lodash Library
VinishIn this tutorial, you will learn how to import the Lodash library (full) and import a specific Lodash function. Import Lodash Library (full) To import the full Lodash library, run the following script: <script> import _ from ‘lodash’; const range ...
Built-in methods of Dictionary in Python
Shibulen() This method is used to return the length of the dictionary. That is, the number of items (key-value pairs) Example: dict1={‘name’:’john’,’course’:’B.Tech’,’Stipen’:9000} print(len(dict1)) Output: 3 clear() This method to delete all entries in the dictionary. Example: dict1={‘name’:’john’,’course’:’B.Tech’,’Stipen’:9000} dict1.clear() print(dict1) Output: ...
Built-In methods of List in Python
Shibuappend() This method is used to append an element to the list. Example: num_list=[1,2,3,4,5] num_list.append(6) print(num_list) Output: [1, 2, 3, 4, 5, 6] count() This method is used to count the number of times an element appears in the list. ...
Built-In String Methods and Functions in Python
Shibucapitalize() This function is used to capitalize the first letter of the string. Example: str=”hello world” print(str.capitalize()) Output: Hello world count(str, beg, end) This function is used to count the number of times str occurs in a string. We can ...
Name of Module, Making our own modules in Python
ShibuName of Module Every module has a name. We can find the name of a module by using the __name__attribute of the module. Actually, for every standalone program written by the user, the name of the module is _main_. Example: ...