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
from ortools.constraint_solver import pywrapcp | |
from ortools.constraint_solver import routing_enums_pb2 | |
import argparse | |
import json | |
import sys | |
is_debug = False | |
class CreateDistanceCallback(object): |
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 MILLISECONDS_IN_A_SECOND = 1000; | |
const SECONDS_IN_A_MINUTE = 60; | |
const MINUTES_IN_AN_HOUR = 60; | |
const HOURS_IN_A_DAY = 24; | |
const DAYS_IN_A_WEEK = 7; | |
const MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE; | |
const MILLISECONDS_IN_AN_HOUR = MILLISECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR; | |
const MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_AN_HOUR * HOURS_IN_A_DAY; | |
const MILLISECONDS_IN_A_WEEK = MILLISECONDS_IN_A_DAY * DAYS_IN_A_WEEK; |
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; | |
contract C1 { | |
uint public num; | |
address public sender; | |
function callSetNum(address c2, uint _num) public { | |
(bool res,) = c2.call(abi.encodePacked(bytes4(keccak256("setNum(uint256)")), _num)); | |
if(!res) revert(); // C2's num is set | |
} |