Calculate length of the list
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<input id="file-upload" type="file"> | |
<script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Connect 4!</title> | |
</head> | |
<body> | |
Please use the console. |
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: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract StakableToken is ERC20, Ownable { | |
constructor() ERC20("TestToken", "TT") { | |
_mint(msg.sender, 1000000 * 10 ** decimals()); |
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
#!/bin/sh | |
set -eu | |
docker network create private 2>/dev/null || true | |
# mysql | |
docker stop mysql 2>/dev/null || true | |
docker rm mysql 2>/dev/null || 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
defmodule UserUtil do | |
def list do | |
{:atomic, records} = | |
:mnesia.transaction(fn -> | |
:mnesia.match_object({:user_info, :_, :_}) | |
end) | |
Enum.map(records, fn {:user_info, username, _password} -> username end) | |
end | |
def delete(username) do |
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 sys | |
temperatures_file = sys.argv[1] | |
record_file = sys.argv[2] | |
def parse_csv(text): | |
return [line.split(",") for line in text.split("\n")] | |
def lookup_temperature(district, date): |
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
Public Class Form1 | |
Public Apath As Application | |
Public Filepath As String = Apath.StartupPath & "\GamePicture\" | |
Public XY() As Integer | |
Public FoodXY As Integer | |
Public Loca As String = "Left" |
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
var http = require('http'); | |
var url = require('url'); | |
var MongoClient = require('mongodb').MongoClient; | |
var assert = require('assert'); | |
var ObjectId = require('mongodb').ObjectID; | |
var mongourl = 'mongodb://developer:developer123@ds131963.mlab.com:31963/fyp2018'; | |
var server = http.createServer(async function (req, res) { | |
console.log(`INCOMING REQUEST: ${req.method} ${req.url}`); |
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
<h1>Load Testing</h1> | |
<div> | |
<input id="url" type="text"/> | |
<button id="start">Start</button> | |
</div> | |
<div id="output"> | |
</div> |
NewerOlder