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
#include <Windows.h> | |
int main() | |
{ | |
INPUT input[3]; | |
input[0].type = INPUT_KEYBOARD; | |
input[0].ki.wScan = 0; | |
input[0].ki.time = 0; | |
input[0].ki.dwExtraInfo = 0; | |
input[0].ki.wVk = 0x11; |
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
#!/usr/bin/env python3 | |
lines=[] | |
with open("input.txt",'r') as input: | |
lines=[line.strip() for line in input.read().strip().split('\n')] | |
max_lines=len(lines) | |
max_length=0 | |
ratios: dict[tuple[int,int],list[int]]={} # position of the gear is the key, list of adjacent parts is the value | |
gear='*' | |
no_gear=(-1,-1) |
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
diff --git a/src/Screen.cpp b/src/Screen.cpp | |
index 54634d6a..172e4b32 100644 | |
--- a/src/Screen.cpp | |
+++ b/src/Screen.cpp | |
@@ -620,7 +620,7 @@ void Screen::copyFromHistory(Character* dest, int startLine, int count) const | |
if (_selBegin != -1) { | |
for (int column = 0; column < _columns; column++) { | |
if (isSelected(column, line)) { | |
- dest[destLineOffset + column].rendition |= RE_SELECTED; | |
+ reverseRendition(dest[destLineOffset + column]); |
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
diff --git a/src/Screen.cpp b/src/Screen.cpp | |
index bba16a97..1cde7131 100644 | |
--- a/src/Screen.cpp | |
+++ b/src/Screen.cpp | |
@@ -461,8 +461,14 @@ void Screen::updateEffectiveRendition() | |
_effectiveBackground = _currentBackground; | |
} | |
- if ((_currentRendition & RE_BOLD) == 0 && (_currentRendition & RE_FAINT) != 0) { | |
+ if ((_currentRendition & RE_BOLD) != 0) { |
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
diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c | |
index 6157d18..8237ec7 100644 | |
--- a/src/shared/linux_osl.c | |
+++ b/src/shared/linux_osl.c | |
@@ -942,7 +942,7 @@ osl_getcycles(void) | |
void * | |
osl_reg_map(uint32 pa, uint size) | |
{ | |
- return (ioremap_nocache((unsigned long)pa, (unsigned long)size)); | |
+ return (ioremap((unsigned long)pa, (unsigned long)size)); |
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
#include <vector> | |
#include <algorithm> | |
struct SubArray | |
{ | |
std::vector<int>::iterator low; | |
std::vector<int>::iterator high; | |
int sum; | |
}; |
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
#include <vector> | |
#include <numeric> | |
class Solution { | |
public: | |
int summize(std::vector<int> nums) | |
{ | |
int result=std::accumulate(nums.begin(),nums.end(),0); | |
if (nums.size() == 2) | |
{ |
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
diff --git a/kernel/nvidia-drm/nvidia-drm-connector.c b/kernel/nvidia-drm/nvidia-drm-connector.c | |
index dbda66d..5cc1eca 100644 | |
--- a/kernel/nvidia-drm/nvidia-drm-connector.c | |
+++ b/kernel/nvidia-drm/nvidia-drm-connector.c | |
@@ -226,7 +226,7 @@ static int nv_drm_connector_get_modes(struct drm_connector *connector) | |
if (nv_connector->edid != NULL) { | |
- drm_mode_connector_update_edid_property( | |
+ drm_connector_update_edid_property( |
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
diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c | |
index 9a8f9f6..22ec88b 100644 | |
--- a/kernel/nvidia-drm/nvidia-drm-drv.c | |
+++ b/kernel/nvidia-drm/nvidia-drm-drv.c | |
@@ -634,26 +634,26 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = { | |
#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE) | |
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY, | |
nv_drm_gem_import_nvkms_memory_ioctl, | |
- DRM_CONTROL_ALLOW|DRM_UNLOCKED), | |
+ DRM_UNLOCKED), |
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
diff --git a/vboxpci/linux/VBoxPci-linux.c b/vboxpci/linux/VBoxPci-linux.c | |
index 4484496..a460d5b 100644 | |
--- a/vboxpci/linux/VBoxPci-linux.c | |
+++ b/vboxpci/linux/VBoxPci-linux.c | |
@@ -89,7 +89,7 @@ MODULE_VERSION(VBOX_VERSION_STRING " r" RT_XSTR(VBOX_SVN_REV)); | |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) | |
# define PCI_DEV_GET(v,d,p) pci_get_device(v,d,p) | |
# define PCI_DEV_PUT(x) pci_dev_put(x) | |
-# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn) | |
+# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_domain_bus_and_slot(0, bus, devfn) |
NewerOlder