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
$chD = curl_init(); | |
curl_setopt_array($chD, array( | |
CURLOPT_URL => $ReportDocArray['url'], | |
CURLOPT_HEADER => true, | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_BINARYTRANSFER => true, // Set to true for binary files | |
CURLOPT_ENCODING => '', | |
CURLOPT_MAXREDIRS => 10, | |
CURLOPT_TIMEOUT => 0, | |
CURLOPT_FOLLOWLOCATION => true, |
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
const canvas1 = document.getElementById("canvas1"); | |
const ctx1 = canvas1.getContext("2d"); | |
const canvas2 = document.createElement("canvas"); | |
canvas2.width = canvas1.width; | |
canvas2.height = canvas1.height; | |
const ctx2 = canvas2.getContext("2d"); | |
const img = new Image(); | |
img.onload = function() { |
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
1 | New York | New York | 8405837 | 4.8% | |
---|---|---|---|---|---|
2 | Los Angeles | California | 3884307 | 4.8% | |
3 | Chicago | Illinois | 2718782 | -6.1% | |
4 | Houston | Texas | 2195914 | 11.0% | |
5 | Philadelphia | Pennsylvania | 1553165 | 2.6% | |
6 | Phoenix | Arizona | 1513367 | 14.0% | |
7 | San Antonio | Texas | 1409019 | 21.0% | |
8 | San Diego | California | 1355896 | 10.5% | |
9 | Dallas | Texas | 1257676 | 5.6% | |
10 | San Jose | California | 998537 | 10.5% |
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
Describe Zero-knowledge rollups (ZK-rollups) are layer 2 | |
Zero-knowledge rollups (ZK-rollups) are a type of Layer 2 scaling solution for blockchains that aim to increase transaction throughput while maintaining the security and decentralization features of the underlying blockchain. | |
In a ZK-rollup, multiple transactions are aggregated and processed off-chain, and the resulting state changes are then committed to the blockchain as a single transaction. This allows for much higher transaction throughput and lower fees, as well as faster confirmation times. | |
ZK-rollups use zero-knowledge proofs (ZKPs) to ensure the integrity of the transaction data without revealing any sensitive information. This means that users can submit transactions to the ZK-rollup with complete privacy, while the network can still verify the validity of the transactions without needing to access the individual transaction data. | |
ZK-rollups are considered to be more secure and decentralized than other Layer 2 solutions, such as sidechains, |
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
//Using Axios | |
const axios = require('axios'); | |
axios.get('https://pro-api.coinmarketcap.com/v1/tools/price-conversion?amount=1&symbol=MAIN&convert=USD', { | |
headers: { | |
'X-CMC_PRO_API_KEY': CMC_PRO_API_KEY, | |
}, | |
}) | |
.then(function (response) { | |
// get BNB price in BUSD |
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
#!/usr/bin/python | |
import struct | |
import time | |
import sys | |
infile_path = "/dev/input/event6" | |
#long int, long int, unsigned short, unsigned short, unsigned int | |
FORMAT = 'llHHI' | |
EVENT_SIZE = struct.calcsize(FORMAT) |
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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script> | |
function isEven(n) { | |
n = Number(n); | |
return n === 0 || !!(n && !(n % 2)); | |
} |
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
<script> | |
var map = false; | |
var markers = []; | |
var infoWindow; | |
var locationSelect; | |
function initMap() { | |
if (typeof google === 'undefined' || google === null) { | |
setTimeout(initMap, 300); | |
return; |
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
xlsxj = require('xlsx-to-json'); | |
xlsxj({ | |
input: 'p.xlsx', | |
output: 'php-books.json' | |
}, function(err, result) { | |
if (err) { | |
console.log(err); | |
} | |
else { | |
console.log(result); |
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
run = require('./run-php.js') | |
run [ | |
'$ci->load->library(\'shop_catalog\')' | |
'$r=$ids=explode(\',\',$ci->shop_catalog->getRefineFromTopMenuCategory(1))' | |
], (data) -> | |
console.log data |
NewerOlder