This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Following git demonstrates the use of decentralized applications and blockchain technology using web3.js. | |
// Here's an example of a simple smart contract that stores and returns a message. | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract MessageContract { | |
string private message; | |
function setMessage(string memory newMessage) public { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// loading image: using PHP's GD library to load the image from its file or URL | |
$img = imagecreatefromjpeg('image.jpg'); | |
// getting image size: using getimagesize() function to get the width and height of the image | |
list($width, $height) = getimagesize($img); | |
// extracting image metadata: using exif_read_data() function to extract the image metadata, including camera settings, location, and time | |
$exif = exif_read_data($img); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// let's validate some string with regex | |
- Credit Cards (Visa, Mastercard, American Express, Discover Card) | |
- Date (Check complex information for different months and leap years) | |
- HEX Color Code | |
- IP Address | |
- Password (With at least one uppercase & one lowercase letter, one digit, one special character, and atleast 8 characters long) | |
- Phone Number (For global numbers with/without country codes and separators like hyphens, dots, or spaces) | |
- URL Validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first select all liked buttons | |
var buttons = document.getElementsByClassName('PageLikedButton'); | |
// launch pop for liked button | |
for(let button of buttons){ | |
button.click(); | |
}; | |
// select unlike button parent to prevent timeline button clicks | |
var unlikes = document.getElementsByClassName('InterestListMenuDisconnect'); |