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 readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
const dataStructureNames = [ | |
"Array", "Hashmap", "Linked List", "Queue", "Stack", "Graph", "Binary Tree", "AVL Tree", "Min-Max Heap", | |
"Skip List", "B Tree" |
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
import requests | |
from PIL import Image, ImageDraw, ImageFont | |
from io import BytesIO | |
def draw_caption_internal(image, caption, where, is_bottom): | |
text_bbox = draw.textbbox((0, 0), caption, font=font) | |
text_width = text_bbox[2] - text_bbox[0] | |
text_height = text_bbox[3] - text_bbox[1] |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.10; | |
contract ArraySortingExample { | |
address[] public users; | |
// simple function to add an address to the users array |
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
pragma solidity ^0.5.0; | |
import "./PaymentSharer.sol"; | |
contract Attacker { | |
address private victim; | |
address payable owner; | |
constructor() public { | |
owner = msg.sender; |
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
#### Steps for downloading btcd: #### | |
# Run this script on a machine with at least 2 Gb of RAM and 200 GB of disk space | |
wget https://redirector.gvt1.com/edgedl/go/go1.9.2.linux-amd64.tar.gz | |
sudo tar -C /usr/local/ -xzf go1.9.2.linux-amd64.tar.gz | |
cd | |
mkdir go | |
export PATH=$PATH:/usr/local/go/bin |
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
/// given this uncompilable code | |
pub fn main() { | |
let vec0 = Vec::new(); | |
let mut vec1 = fill_vec(vec0); | |
// Do not change the following line! | |
println!("{} has length {} content `{:?}`", "vec0", vec0.len(), vec0); | |
vec1.push(88); |