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
Windows 2012 R2のHyper-V用NAT | |
New-VMSwitch -SwitchName "Hyper-V-Switch" - SwitchType Internal | |
Get-NetIPAddress -InterfaceAlias "vEthernet (Hyper-V-Switch)" | |
IPAddress : 169.254.141.105 ……… 適当なものが振られる | |
InterfaceIndex : n ………………… 後で使う | |
InterfaceAlias : vEthernet (Hyper-V-Switch) | |
AddressFamily : IPv4 |
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
binsearch = (a, low, high, target) -> | |
if low == high || low + 1 == high | |
if a[low] < target then return low + 1 else return low | |
mid = Math.floor((low + high) / 2) | |
if a[mid] == target | |
return mid | |
else if target > a[mid] | |
binsearch(a, mid + 1, high, target) | |
else | |
binsearch(a, low, mid - 1, target) |
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
require 'origami' | |
pdf = Origami::PDF.read(ARGV[0], verbosity: Origami::Parser::VERBOSE_QUIET) | |
unless pdf.pages.first.Resources.Font.C2_0 | |
exit 1 | |
end | |
font_table = {} | |
pdf.pages.first.Resources.each_font do |name, font| | |
puts name if $DEBUG |
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
module Libxlsxwriter | |
class Validator < FFI::Struct | |
layout :validate, :uint8, | |
:criteria, :uint8, | |
:ignore_blank, :uint8, | |
:show_input, :uint8, | |
:show_error, :uint8, | |
:dropdown, :uint8, | |
:value_number, :double, | |
:value_formula, :string, |
OlderNewer