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
#define _GNU_SOURCE | |
#include <sys/ptrace.h> | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
#include <signal.h> | |
#include <sys/wait.h> | |
#include <sys/user.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/uio.h> |
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
#define _GNU_SOURCE | |
#include <sys/ptrace.h> | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
#include <signal.h> | |
#include <sys/wait.h> | |
#include <sys/user.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
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
class Solution(object): | |
def threeSum(self, nums): | |
""" | |
:type nums: List[int] | |
:rtype: List[List[int]] | |
""" | |
if len(nums) < 3: | |
return [] | |
nums.sort() | |
r = [] |
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
#define _GNU_SOURCE | |
#include <sys/ucontext.h> | |
#include <seccomp.h> | |
#include <unistd.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <sys/mman.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> |
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
// SPDX-License-Identifier: GPL-2.0 | |
#define _GNU_SOURCE | |
#include <sys/types.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <sched.h> | |
#include <time.h> | |
#include <stdio.h> |
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
clock-gettime-monotonic: syscall: 293 nsec/call | |
clock-gettime-monotonic: libc: 20 nsec/call | |
clock-gettime-monotonic: vdso: 18 nsec/call | |
clock-getres-monotonic: syscall: 264 nsec/call | |
clock-getres-monotonic: libc: 261 nsec/call | |
clock-getres-monotonic: vdso: 3 nsec/call | |
clock-gettime-monotonic-coarse: syscall: 274 nsec/call | |
clock-gettime-monotonic-coarse: libc: 5 nsec/call | |
clock-gettime-monotonic-coarse: vdso: 3 nsec/call | |
clock-getres-monotonic-coarse: syscall: 265 nsec/call |
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
arch/x86/entry/vdso/vdso64.so: file format elf64-x86-64 | |
Disassembly of section .text: | |
00000000000005e0 <__vdso_clock_gettime@@LINUX_2.6-0x140>: | |
5e0: 55 push %rbp | |
5e1: 48 63 ff movslq %edi,%rdi | |
5e4: 4c 8d 0d 95 ca ff ff lea -0x356b(%rip),%r9 # ffffffffffffd080 <__vdso_getcpu@@LINUX_2.6+0xffffffffffffc870> |
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
[avagin@laptop ~]$ cat t.py | |
import sys | |
items = {} | |
class Item: | |
def __init__(self, key, parent): | |
self.parent = parent | |
self.key = key | |
self.children = [] |
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
04:58:30.279397 IP (tos 0x0, ttl 64, id 24922, offset 0, flags [DF], proto TCP (6), length 52) | |
127.0.0.1.8880 > 127.0.0.1.43814: Flags [.], cksum 0xfe28 (incorrect -> 0x7b33), seq 1081132048, ack 2965916432, win 342, options [nop,nop,TS val 404987 ecr 0], length 0 | |
04:58:30.283197 IP (tos 0x0, ttl 64, id 61017, offset 0, flags [DF], proto TCP (6), length 52) | |
127.0.0.1.43814 > 127.0.0.1.8880: Flags [.], cksum 0xfe28 (incorrect -> 0x7b30), seq 2965916431, ack 1081132049, win 342, options [nop,nop,TS val 404990 ecr 0], length 0 | |
04:58:30.285500 IP (tos 0x0, ttl 64, id 24923, offset 0, flags [DF], proto TCP (6), length 52) | |
127.0.0.1.8880 > 127.0.0.1.43814: Flags [.], cksum 0xfe28 (incorrect -> 0x7b28), seq 1081132049, ack 2965916432, win 342, options [nop,nop,TS val 404997 ecr 0], length 0 | |
04:58:30.289530 IP (tos 0x0, ttl 64, id 61018, offset 0, flags [DF], proto TCP (6), length 52) | |
127.0.0.1.43814 > 127.0.0.1.8880: Flags [.], cksum 0xfe28 (incorrect -> 0x7b23), seq 2965916432, ack 1081132049, win 3 |
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 9adc21d0236d9ef28da9064299789092388aa7e9 Mon Sep 17 00:00:00 2001 | |
From: Andrey Vagin <avagin@openvz.org> | |
Date: Thu, 1 Oct 2015 23:28:07 +0300 | |
Subject: [PATCH] net/unix: fix logic about sk_peek_offset | |
Now send with MSG_PEEK can return data from multiple SKBs. | |
Unfortunately we take into account the peek offset for each skb, | |
that is wrong. We need to skip data only once. |
NewerOlder