"YNeos"[cond::2]
# => "No" if cond else "Yes"
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 cv2 | |
import numpy as np | |
class CvTrackbar: | |
def __init__(self, name, window_name, val, max_val, callback=None): | |
self.__name = name | |
self.__window_name = window_name | |
cv2.createTrackbar(name, window_name, val, max_val, callback or CvTrackbar.nothing) | |
def value(self): |
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
" json format (by jq) and syntax highlight | |
function! FormatAndHighlightJsonData() | |
if executable('jq') | |
:%!jq . | |
:set filetype=json | |
endif | |
endfunction | |
ca json call FormatAndHighlightJsonData() | |
" convert unix time to str under cursor |
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
""" | |
https://github.com/Dovyski/cvui | |
https://dovyski.github.io/cvui/ | |
""" | |
from abc import ABCMeta, abstractmethod | |
import numpy as np | |
import cv2 | |
import cvui |
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 abc import ABCMeta, abstractmethod | |
import numpy as np | |
import cv2 | |
import cvui | |
class CvuiComponent(metaclass=ABCMeta): | |
def __init__(self): | |
self.frame = None |
javascript:document.getElementsByClassName('SidebarCommonModules')[0].remove();document.getElementsByClassName('topbar')[0].remove();document.getElementsByClassName('SearchNavigation')[0].appendChild(document.getElementsByClassName('SidebarFilterModule')[0]);Array.prototype.forEach.call(document.getElementsByClassName('SearchNavigation'),function(e){e.classList.add('u-size1of3');e.classList.add('u-lg-size1of4');e.classList.add('Grid-cell');e.style.margin='0 10px'});
// おすすめユーザ等の情報を削除
document.getElementsByClassName('SidebarCommonModules')[0].remove();
> Get-VM
> Start-VM -Name [name]
> Stop-VM -Name [name] -Force
> Get-VMSnapshot -VMName [name]
> Restore-VMSnapshot -VMName [name] -Name [snapshot name] -Confirm:$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
fun value(str: String): Int { | |
println(str) | |
return 0 | |
} | |
fun test(str: String) { | |
println("【Executed Test: $str】") | |
} | |
class Test1 { |
console.log(foo);
let bar = JSON.parse(foo);
console.log(bar);
のときの foo
と bar
の値が一致しなくて ? となった.
https://stackoverflow.com/questions/37328301/strange-behavior-of-json-parse-in-firefox