This file contains hidden or 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
# SendMessage(HWND_BROADCAST,WM_SYSCOMMAND, SC_MONITORPOWER, POWER_OFF) | |
# HWND_BROADCAST 0xffff | |
# WM_SYSCOMMAND 0x0112 | |
# SC_MONITORPOWER 0xf170 | |
# POWER_OFF 0x0002 | |
Add-Type -TypeDefinition ' | |
using System; | |
using System.Runtime.InteropServices; | |
namespace Utilities { |
This file contains hidden or 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
class Solution: | |
def plusOne(self, digits: List[int]) -> List[int]: | |
s = "".join([str(d) for d in digits]) | |
i = int(s) | |
i = i + 1 | |
s = str(i) | |
return [int(si) for si in s] | |
This file contains hidden or 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
# Definition for singly-linked list. | |
# class ListNode: | |
# def __init__(self, x): | |
# self.val = x | |
# self.next = None | |
class Solution: | |
def deleteDuplicates(self, head: ListNode) -> ListNode: | |
cur = head |