text stringlengths 1 1.05M |
|---|
<%
from pwnlib.shellcraft.amd64.linux import syscall
%>
<%page args="fd"/>
<%docstring>
Invokes the syscall fsync. See 'man 2 fsync' for more information.
Arguments:
fd(int): fd
</%docstring>
${syscall('SYS_fsync', fd)}
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xd25d, %rax
nop
nop
nop
nop
and $37380, %r8
mov $0x6162636465666768, %rdi
movq %rdi, (%rax)
sub $49344, %r12
lea addresses_WC_ht+0x18579, %rsi
lea addresses_A_ht+0x148dd, %rdi
... |
#include "_linalg.h"
class ::Eigen::SparseMatrix< double, 0, int > const & (::Eigen::SparseMatrixBase< ::Eigen::SparseMatrix< double, 0, int > >::*method_pointer_bf7ce97eec4253618afea439f1aad3a2)()const= &::Eigen::SparseMatrixBase< class ::Eigen::SparseMatrix< double, 0, int > >::derived;
class ::Eigen::SparseMatrix< ... |
; A035706: Coordination sequence for 11-dimensional cubic lattice.
; Submitted by Christian Krause
; 1,22,242,1782,9922,44726,170610,568150,1690370,4573910,11414898,26572086,58227906,121023606,240089586,457018518,838478850,1488341910,2564399090,4300978550,7039035586,11265589302,17664712562,27182654422,41110086402,61184... |
; A089806: Expansion of Jacobi theta function (theta_3(q^(1/3))-theta_2(q^3))/2/q^(1/12).
; 1,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mul $0,3
add $0,1
mov $2,2
... |
; A078041: Expansion of (1-x)/(1+x-x^2-2*x^3).
; Submitted by Jamie Morken(s1)
; 1,-2,3,-3,2,1,-5,10,-13,13,-6,-7,27,-46,59,-51,18,49,-133,218,-253,205,-22,-279,667,-990,1099,-755,-126,1569,-3205,4522,-4589,2701,1754,-8231,15387,-20110,19035,-8371,-12814,42513,-72069,88954,-75997,20813,81098,-212279,335003,-385086,2955... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xb538, %rsi
lea addresses_A_ht+0x1b038, %rdi
nop
nop
xor $21204, %rax
mov $90, %rcx
rep movsw
add %rax, %rax
lea addresses_WT_ht+0x16d38, %r11
nop
nop
nop
nop
nop
and $3564, %... |
; A167762: a(n) = 2*a(n-1)+3*a(n-2)-6*a(n-3) starting a(0)=a(1)=0, a(2)=1.
; Submitted by Christian Krause
; 0,0,1,2,7,14,37,74,175,350,781,1562,3367,6734,14197,28394,58975,117950,242461,484922,989527,1979054,4017157,8034314,16245775,32491550,65514541,131029082,263652487,527304974,1059392917,2118785834,4251920575,85038... |
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x1e688, %r13
nop
lfence
and $0xffffffffffffffc0, %r13
vmovaps (%r13), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %rbp
nop
nop
nop
nop
nop
xor $21085, %rax
lea add... |
; Filename: Strings-64.nasm
; Author: Vivek Ramachandran
; Website: http://securitytube.net
; Training: http://securitytube-training.com
;
;
; Purpose: String Operations in 64-bit CPU
; Added line below to satisfy Vim error checking. MK.
BITS 64
global _start
section .text
_start:
; Movsb/w/d/q
; Memory to... |
dnl x86-64 mpn_rshift optimized for "Core 2".
dnl Copyright 2007, 2009, 2011, 2012 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General P... |
SECTION code_fp_math32
PUBLIC round_fastcall
EXTERN _m32_roundf
defc round_fastcall = _m32_roundf
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _round_fastcall
defc _round_fastcall = _m32_roundf
ENDIF
|
check_long_mode:
; test if extended processor info in available
mov eax, 0x80000000 ; implicit argument for cpuid
cpuid ; get highest supported argument
cmp eax, 0x80000001 ; it needs to be at least 0x80000001
jb .no_long_mode ; if it's less, the CPU is too old for long ... |
; A220280: Reluctant sequence of reluctant sequence A002260.
; 1,1,1,1,1,2,1,1,2,1,1,1,2,1,2,1,1,2,1,2,3,1,1,2,1,2,3,1,1,1,2,1,2,3,1,2,1,1,2,1,2,3,1,2,3,1,1,2,1,2,3,1,2,3,4,1,1,2,1,2,3,1,2,3,4,1,1,1,2,1,2,3,1,2,3,4,1,2,1,1,2,1,2,3,1,2,3,4,1,2,3,1,1,2,1,2,3,1,2,3,4,1,2,3,4,1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,1,2,1,2,3,1,2,3... |
dnl x86 generic mpn_sqr_basecase -- square an mpn number.
dnl Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU Lesser General Public ... |
// Copyright 2019 The MACE Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... |
; A172160: a(0)=1. a(n)= 2^n*(5-n)/4, n>0.
; 1,2,3,4,4,0,-16,-64,-192,-512,-1280,-3072,-7168,-16384,-36864,-81920,-180224,-393216,-851968,-1835008,-3932160,-8388608,-17825792,-37748736,-79691776,-167772160,-352321536,-738197504,-1543503872,-3221225472,-6710886400,-13958643712,-28991029248,-60129542144,-124554051584,-25... |
; ----------------------------------------------------------------
; Z88DK INTERFACE LIBRARY FOR THE NIRVANA ENGINE - by Einar Saukas
;
; See "nirvana-.h" for further details
; ----------------------------------------------------------------
; void NIRVANAM_paintC(unsigned char *attrs, unsigned int lin, unsigned int c... |
#include <assert.h>
#include <stdlib.h>
#include "mempool.h"
struct mydata {
char name[9];
int age;
};
#define ALLOC_BYTES 128
int
main(int argc, char** argv) {
printf("sizeof(mydata):%lu\n", sizeof(mydata));
void *mem = malloc(ALLOC_BYTES);
mempool<mydata> pool;
pool.init(mem, ALLO... |
%ifdef CONFIG
{
"RegData": {
"MM5": ["0x0000000000000000", "0x0000"],
"MM6": ["0x8000000000000000", "0x3FFF"],
"MM7": ["0x8000000000000000", "0x3FFF"]
},
"Mode": "32BIT"
}
%endif
fld1
fldz
mov eax, 2
cmp eax, 2
fcmovbe st0, st1
fldz
cmp eax, 0
fcmovbe st0, st2
hlt
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x6903, %r10
nop
nop
nop
nop
nop
and $54258, %r9
mov $0x6162636465666768, %rax
movq %rax, (%r10)
and $28621, %r10
lea addresses_UC_ht+0x14bd9, %rbp
nop
nop
add %r... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__CWE131_loop_84_goodG2B.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__CWE131.label.xml
Template File: sources-sink-84_goodG2B.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Alloc... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparamsbase.h"
#include "clientversion.h"
#include "rpcclient.h"
#in... |
;Tritone v2 beeper music engine by Shiru (shiru@mail.ru) 03'11
;Three channels of tone, per-pattern tempo
;One channel of interrupting drums
;Feel free to do whatever you want with the code, it is PD
OP_NOP equ $00
OP_SCF equ $37
OP_ORC equ $b1
org $8000
begin
ld hl,musicData
call play
jp be... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x54b9, %rsi
lea addresses_D_ht+0x120b8, %rdi
nop
nop
and $51120, %r8
mov $118, %rcx
rep movsw
cmp $14600, %rdi
lea addresses_A_ht+0x53b8, %rdi
nop
nop
nop
nop
xor %rax, %rax
m... |
section .multiboot
header_start:
dd 0xe85250d6 ; magic number (multiboot 2)
dd 0 ; architecture 0 (protected mode i386)
dd header_end - header_start ; header length
; checksum
dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start))
; insert option... |
// C++ pgm to display lower tri. matrix in row & column major both the approches.
#include <iostream>
using namespace std;
class LTMatrix
{
private:
int n;
int *A;
public:
LTMatrix(int n)
{
this->n = n;
A = new int[n * (n + 1) / 2];
}
~LTMatrix() { delete[] A; }
void Displa... |
_echo: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 57 push %edi
4: 56 push %es... |
WaveSamples: ; e8db2
; These are streams of 32 nybbles (4-bit values) used as wave patterns.
; Plot them as a line chart to see the wave's shape.
dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1
dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 1... |
###############################################################################
# Copyright 2019 Intel Corporation
# All Rights Reserved.
#
# If this software was obtained under the Intel Simplified Software License,
# the following terms apply:
#
# The source code, information and material ("Material") containe... |
#include "builtin/compact_lookup_table.hpp"
#include "builtin/lookup_table.hpp"
#include "builtin/object.hpp"
#include "builtin/string.hpp"
#include "builtin/symbol.hpp"
#include "capi/capi.hpp"
#include "capi/ruby.h"
#include "configuration.hpp"
using namespace rubinius;
using namespace rubinius::capi;
extern "C" ... |
/**
* @file TSS_Adapter.cpp
*
* $Id: TSS_Adapter.cpp 2622 2015-08-13 18:30:00Z mitza $
*
* Originally in Synch.cpp
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
#include "ace/TSS_Adapter.h"
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_BEGIN_V... |
///
/// \file SI47xx.cpp
/// \brief Implementation for the radio library to control the SI47xx radio chips.
///
/// \author N Poole, nickpoole.me
/// \author Matthias Hertel, http://www.mathertel.de
/// \copyright Copyright (c) 2014 by Matthias Hertel.\n
/// This work is licensed under a BSD style license.\n
//... |
; A063116: Dimension of the space of weight 2n cusp forms for Gamma_0( 48 ).
; 3,18,34,50,66,82,98,114,130,146,162,178,194,210,226,242,258,274,290,306,322,338,354,370,386,402,418,434,450,466,482,498,514,530,546,562,578,594,610,626,642,658,674,690,706,722,738,754,770,786
mul $0,16
trn $0,1
add $0,3
|
;/*
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
; All rights reserved
;
;
; ***************************************************************************
; * *
; * FreeRTOS tutorial books are available in pdf and... |
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; SetMem16.nasm
;
; Abstract:
;
; SetMem16 function
;
; Notes:
;
;------------------------------------... |
// pop local 4
// set A to LCL+4
@LCL
D=M
@4
D=D+A
// store in R15
@R15
M=D
// get top of stack and dec SP
@SP
AM=M-1
D=M
// put value into place
@R15
A=M
M=D |
/*
* Title: PulseBurstPositioning
*
* Objective:
* This example demonstrates control of the ClearPath-MCPV operational mode
* Pulse Burst Positioning.
*
* Description:
* This example enables a ClearPath motor and executes a repeating pattern of
* positional move commands. During operation, various ... |
; A159682: Numerator of Hermite(n, 19/20).
; Submitted by Christian Krause
; 1,19,161,-4541,-182879,158099,185882881,3342055939,-196736970559,-9085291943021,181506000088801,21619197887729219,11451559671492961,-51668495296791759341,-1011475465784925126079,125453752981103348759299,5418047703995739004663681,-2985091031636... |
#include "sendcoinsentry.h"
#include "ui_sendcoinsentry.h"
#include "guiutil.h"
#include "bitcoinunits.h"
#include "addressbookpage.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#include "addresstablemodel.h"
#include <QApplication>
#include <QClipboard>
SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
... |
; A116764: Number of permutations of length n which avoid the patterns 1423, 2134, 3214.
; Submitted by Jon Maiga
; 1,2,6,21,74,257,886,3050,10505,36206,124833,430474,1484526,5119597,17655746,60888801,209985534,724171922,2497434881,8612847430,29702935745,102435859346,353268294998,1218308608389,4201554149626
add $0,1
m... |
;
; Enterprise 64/128 specific routines
; by Stefano Bodrato, 2011
;
; set_exos_variable(unsigned char variable, unsigned char value);
;
;
; $Id: set_exos_variable_callee.asm,v 1.4 2015/01/19 01:32:43 pauloscustodio Exp $
;
PUBLIC set_exos_variable_callee
PUBLIC ASMDISP_SET_EXOS_VARIABLE_CALLEE
set_exos_variable_ca... |
loop: $1 -> rob@in0
rob@out -> rob@in0
loop -> cu@in1
rob@out -> cu@in0
|
; A337896: Number of chiral pairs of colorings of the 8 triangular faces of a regular octahedron or the 8 vertices of a cube using n or fewer colors.
; 0,1,66,920,6350,29505,106036,317856,832140,1961025,4248310,8590296,16398746,29814785,51983400,87399040,142333656,225359361,347978730,525376600,777308070,1129138241,1613... |
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/config.hpp>
#include <nano/lib/numbers.hpp>
#include <nano/secure/blockstore.hpp>
#include <nano/secure/common.hpp>
#include <crypto/cryptopp/words.h>
#include <boost/endian/conversion.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/var... |
; A233334: a(1)=1; for n>1, a(n) is the smallest number > a(n-1) such that a(1) + a(2) +...+ a(n) is a composite number.
; 1,3,4,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70
a... |
; A146087: a(n) = 3*A146085(n) - 1.
; 2,11,20,83,92,101,164,173,182,731,740,749,812,821,830,893,902,911,1460,1469,1478,1541,1550,1559,1622,1631,1640,6563,6572,6581,6644,6653,6662,6725,6734,6743,7292,7301,7310,7373,7382,7391,7454,7463,7472,8021,8030,8039,8102,8111,8120
mov $20,$0
add $20,1
lpb $20,1
clr $0,18
sub $... |
;*
;* CW : Character Oriented Windows
;*
;* getchar.asm : get character at a given position.
include user.inc
include screen.inc
include inscr.inc
;----------------------------------------------------------------------------
sBegin DATA
assumes DS,DGROUP
externB <instCur> ;* INST type
externB <axMac> ; Ma... |
; A089090: a(n) is the smallest composite number coprime to n.
; 4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,49,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,49,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,49,4,9,4,9,4,25,4,9,4,9
add $0,1
pow $0,3
sub $0,1
seq $0,5587... |
// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed wi... |
.MODEL SMALL
.STACK 100H
OUTPUT MACRO MSG
LEA DX,MSG
MOV AH,9
INT 21H
ENDM
INPUT MACRO
MOV AH,1
INT 21H
ENDM
.DATA
MSG1 DB 13, 10, "Enter a string: $"
MSG2 DB 13, 10, "Total number of v... |
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xb371, %rsi
lea addresses_WT_ht+0x1de11, %rdi
nop
nop
nop
nop
add %r13, %r13
mov $78, %rcx
rep movsl
nop
nop
nop
and $57309, %r15
lea addresses_WC_ht+0x8ed1, %rdi
clflush (%rdi)
nop
no... |
; A070685: n^6 mod 45.
; 0,1,19,9,1,10,36,19,19,36,10,1,9,19,1,0,1,19,9,1,10,36,19,19,36,10,1,9,19,1,0,1,19,9,1,10,36,19,19,36,10,1,9,19,1,0,1,19,9,1,10,36,19,19,36,10,1,9,19,1,0,1,19,9,1,10,36,19,19,36,10,1,9,19,1,0,1,19,9,1,10,36
pow $0,6
mod $0,45
|
SECTION code_l_sdcc
PUBLIC __modsint_callee
EXTERN l_divs_16_16x16
__modsint_callee:
; signed 16-bit mode
;
; enter : stack = divisor, dividend, ret
;
; exit : hl = remainder
; de = quotient
pop af
pop hl ; hl = dividend
pop de ; de ... |
//
// Created by Silvio Fragnani da Silva on 20/03/16.
//
#include <iostream>
#include <GL/glew.h>
#include <SDL.h>
#include "Cleanup.h"
using namespace std;
int main() {
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
cout << "SDL_Init error " << SDL_GetError() << endl;
return 1;
}
// set GL versio... |
; A084265: a(n) = (n^2 + 3*n + 1 + (-1)^n) / 2.
; 1,2,6,9,15,20,28,35,45,54,66,77,91,104,120,135,153,170,190,209,231,252,276,299,325,350,378,405,435,464,496,527,561,594,630,665,703,740,780,819,861,902,946,989,1035,1080,1128,1175,1225,1274,1326,1377,1431,1484,1540,1595,1653,1710,1770,1829,1891,1952,2016,2079,2145,2210,2... |
; Executable name : uppercaser2
; Version : 1.0
; Created date : 3/25/2009
; Last update : 3/25/2009
; Author : Jeff Duntemann
; Description : A simple program in assembly for Linux, using NASM 2.05,
; demonstrating simple text file I/O (through redirection) for reading an
; inpu... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %r8
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x13663, %rsi
lea addresses_A_ht+0x8251, %rdi
clflush (%rsi)
nop
nop
add $1111, %r12
mov $52, %rcx
rep movsl
dec %rdi
lea addresses_WC_ht+0x108a3, %rsi
lea addresses_normal_ht+0x90a3, %r... |
//
// Upcaste Performance Libraries
// Copyright (C) 2012-2013 Jesse W. Towner
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without lim... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin developers
// Copyright (c) 2009-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-li... |
<%
from pwnlib.shellcraft import pretty, value, common, registers
from pwnlib.shellcraft.i386 import mov, pushstr, setregs, strlen
from pwnlib import constants
%>
<%docstring>
Copies a string
Example:
>>> sc = 'jmp get_str\n'
>>> sc += 'pop_str: pop eax\n'
>>> sc += shellcraft.i386.strcpy('esp', 'eax')
... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Moneta developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "intro.h"
#include "ui_intro.h"
#include "guiutil.h"
#include "uti... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... |
[bits 16]
pm:
cli ; disable interrupts
lgdt [gdt_descriptor] ; load the gtd descriptor
mov eax, cr0
or al, 0x1 ;set 32-bit mode in cr0
mov cr0, eax
jmp CODE_SEG:init_pm ;far jump by using a different segment
[bits 32]
init_pm:
;lol 32 bit modes
mov ax, DATA_SEG ;update seg registers
... |
/*
****************************************************************
****************************************************************
-> Coded by Stavros Chryselis
-> Visit my github for more solved problems over multiple sites
-> https://github.com/StavrosChryselis
-> Feel free to email me at stavrikios@gm... |
// #83 認証用テキスト付き PNG 画像を作る
#include <iostream>
#include <string>
#include <string_view>
#include <random>
#include <array>
#include <algorithm>
#include <functional>
#include "pngwriter.h"
void create_image(
int width, int height,
std::string_view font, int font_size,
std::string_view filepath)
{
pngwrite... |
; SMSQmulator "Hardware" Initialisation V2.01 (c) W. Lenerz
; based on T. Tebby's code
;
* 2003-09-27 v.2.00 (?) added OSPS config item (wl)
* 2015 May 24 2.01 added config item for ieee floats (wl)
; Called with a7 a valid, safe stack
; d4 the host (QDOS) version number
; The hardware is initialised.
;... |
// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "amount.h"
#include "policy/feerate.h"
#include "test/test_bitcoin.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE... |
COMMENT @-----------------------------------------------------------------------
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC/GEOS
MODULE: Klib/Format
FILE: Format/formatLow.asm
AUTHOR: Cheng, 1/90
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date ... |
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/third_party/quiche/src/quic/core/quic_version_manager.h"
#include "net/third_party/quiche/src/quic/core/quic_versions.h"
#include "net/... |
/// Entry points into the Nachos kernel from user programs.
///
/// There are two kinds of things that can cause control to transfer back to
/// here from user code:
///
/// * System calls: the user code explicitly requests to call a procedure in
/// the Nachos kernel. Right now, the only function we support is `Hal... |
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; WriteCr3.Asm
;
; Abstract:
;
; AsmWriteCr3 function
;
; Notes:
;
;-------------------... |
section .rodata
n db 0xa
section .text
global _start
_start:
mov ebp, [esp]
.loop:
add esp, 4
mov edi, [esp]
mov ecx, 0xffffffff
xor eax,eax
repne scasb
inc ecx
not ecx
... |
SECTION code_fp_math48
PUBLIC asm_dconst_ln2
EXTERN am48_dconst_ln2
defc asm_dconst_ln2 = am48_dconst_ln2
|
; A268526: a(n) = r*a(ceiling(n/2))+s*a(floor(n/2)) with a(1)=1 and (r,s)=(3,2).
; Submitted by Jon Maiga
; 1,5,17,25,61,85,109,125,233,305,377,425,497,545,593,625,949,1165,1381,1525,1741,1885,2029,2125,2341,2485,2629,2725,2869,2965,3061,3125,4097,4745,5393,5825,6473,6905,7337,7625,8273,8705,9137,9425,9857,10145,10433,... |
; Substitute for z80 cpd instruction
; aralbrec 06.2007
SECTION code_crt0_sccz80
PUBLIC __z80asm__cpd
IF __CPU_GBZ80__
EXTERN __z80asm__ex_sp_hl
ENDIF
__z80asm__cpd:
jr c, cpdwcarry
cp (hl)
dec hl
dec bc
push af
IF __CPU_GBZ80__
call __z80asm... |
; move ids
; indexes for:
; - Moves (see data/moves/moves.asm)
; - MoveNames (see data/moves/names.asm)
; - MoveDescriptions (see data/moves/descriptions.asm)
; - BattleAnimations (see data/moves/animations.asm)
const_def
const NO_MOVE ; 00
const POUND ; 01
const KARATE_CHOP ; 02
const DOUBLESLAP ; ... |
/*
** Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved.
**
** File: developmentIGC.cpp
**
** Author:
**
** Description:
** Implementation of the CdevelopmentIGC class. This file was initially created by
** the ATL wizard for the core object.
**
** History:
*/
// developmentIGC.cpp : Implem... |
// Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include "ABI35_0_0JSBigString.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <folly/Memory.h>
#include <folly/portability/SysMman.h... |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %rdx
lea addresses_UC_ht+0x1b82c, %r11
nop
nop
nop
nop
xor %rdx, %rdx
movups (%r11), %xmm3
vpextrq $0, %xmm3, %r10
nop
nop
nop
nop
and %r14, %r14
pop %rdx
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r8
pus... |
; A179789: Sum of the differences between the first prime and the next, inside in the first jump in a Sieve of Eratosthenes table.
; Submitted by Christian Krause
; 1,2,2,10,16,20,34,44,66,78,124,182,184,206,212,300,386,360,412,494,466,608,628,700,928,1046,1006,1034,996,1034,1440,1474,1728,1816,1976,1922,2226,2212,2264... |
;------------------------------------------------------------------------------
;
; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; ScanMem8.Asm
;
; Abstract:
;
; ScanMem8 function
;
; Notes:
;
; The following BaseMemoryLib... |
// Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
; ===============================================================
; Feb 2014
; ===============================================================
;
; void b_vector_destroy(b_vector_t *v)
;
; Free the vector's array and zero out the structure.
;
; ===============================================================
SECTION c... |
/*
* This file is a part of the TChecker project.
*
* See files AUTHORS and LICENSE for copyright details.
*
*/
#ifndef TCHECKER_VEDGE_HH
#define TCHECKER_VEDGE_HH
#include "tchecker/utils/iterator.hh"
/*!
\file vedge.h
\brief Tuple of edges
*/
namespace tchecker {
/*!
\class vedge_iterator_t
\br... |
; A082410: a(1)=0. Thereafter, the sequence is constructed using the rule: for any k >= 0, if a(1), a(2), ..., a(2^k+1) are known, the next 2^k terms are given as follows: a(2^k+1+i) = 1 - a(2^k+1-i) for 1 <= i <= 2^k.
; 0,1,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1,1,1,0,0,1,0,0,0,1... |
; A309093: The analog of A309077(n), but allowing fractional powers.
; 1,2,2,3,3,4,5,5,6,6,7,7,8,8,9,10,10,11,11,12
add $0,3
mul $0,5
div $0,9
|
; Matches pokered's "gate" tileset (notable for its Pewter Museum tiles)
; https://tcrf.net/Pok%C3%A9mon_Gold_and_Silver#Unused_Tile_Palette_Assignment_Data
tilepal 0, WATER, RED, YELLOW, YELLOW, RED, GREEN, GREEN, BROWN
tilepal 0, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
tilepal 0, GRAY, GRAY, YELLOW, YELL... |
#include "usb/classdriver/mouse.hpp"
#include <algorithm>
#include "logger.hpp"
#include "usb/device.hpp"
#include "usb/memory.hpp"
namespace usb {
HIDMouseDriver::HIDMouseDriver(Device* dev, int interface_index)
: HIDBaseDriver{dev, interface_index, 3} {}
Error HIDMouseDriver::OnDataReceived() {
uint8_t butt... |
.byte $01 ; Unknown purpose
.byte OBJ_FIRECHOMP, $0D, $04
.byte OBJ_FIRECHOMP, $11, $11
.byte OBJ_GREENTROOPA, $1B, $18
.byte OBJ_BLOOPERWITHKIDS, $1C, $16
.byte OBJ_GREENTROOPA, $1D, $18
.byte OBJ_GOOMBA, $21, $17
.byte OBJ_GREENTROOPA, $29, $18
.byte OBJ_FLYINGREDPARATROOPA, $2A, $06
.byte OBJ_REDTROOPA, $... |
/*
MIT License
Copyright (c) 2014~ Gaetan Guidet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... |
#include <bits/stdc++.h>
using namespace std;
void display(int *a, int n) {
for (int i=0; i<n; i++) {
printf("%d ", a[i]);
}
}
int main(void) {
int n = 9;
int a[] = {1, 45, 56, 23, 2, 34, 15, 45, 1};
printf ("Array without sorting\n");
display(a, n);
// sorting using stl;
sort(... |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x35a7, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
add $26289, %r15
mov $0x6162636465666768, %r13
movq %r13, %xmm3
movups %xmm3, (%rsi)
nop
nop
xor %r15, %r15
lea addresses_WC_ht+... |
; A270870: a(n) = n^6 + 5*n^5 + 19*n^4 + 44*n^3 + 72*n^2 + 69*n + 5.
; 5,215,1311,5531,18329,50775,122675,266411,531501,989879,1741895,2923035,4711361,7335671,11084379,16315115,23465045,33061911,45735791,62231579,83422185,110322455,144103811,186109611,237871229,301124855,377829015,470182811,580644881,711953079,86714487... |
page ,132 ; ;
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
;***************************************************************************** ;
;***********************************************... |
.code
pal_execute_write_cr4 proc
mov cr4, rcx;
ret;
pal_execute_write_cr4 endp
end
|
#programa que pide un numero y muestra por pantalla desde 1 hasta ese numero.
.data
cadena1:.asciiz "Introduce un numero: "
.text
li $v0, 4
la $a0, cadena1
syscall
li $v0, 5
syscall
move $t2, $v0
li $t1, 1
inicio_bucle:
bgt $t1, $t2, fin_bucle
li $v0, 1
move $a0, $t1
syscall
addi $t1, $t1, 1
j inicio_bucl... |
db "EGG@" ; species name
db "If even one is"
next "separated from the"
next "group, the energy"
page "bond between the"
next "six will make them"
next "rejoin instantly.@"
|
.size 8000
.text@48
jp lstatint
.text@100
jp lbegin
.data@143
c0
.text@150
lbegin:
ld a, ff
ldff(45), a
ld b, 42
call lwaitly_b
ld a, 40
ldff(41), a
ld a, 02
ldff(ff), a
xor a, a
ldff(0f), a
ei
ld a, 44
ldff(45), a
.text@1000
lstatint:
ld a, 00
ldff(ff), a
ld a, 30
ldff(00), a
ld a, 01
ldff(4... |
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "google_apis/gaia/oauth2_access_token_manager.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.