text stringlengths 1 1.05M |
|---|
###############################################################################
# Copyright 2018 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... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include "IO/Observer/Tags.hpp"
#include "Parallel/Reduction.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TypeTraits.hpp"
namespace observers {
namespace detail {
template <class ObservingAction, class = std::void_t<>>
struc... |
/*
* Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* 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 applicable... |
; A212968: Number of (w,x,y) with all terms in {0,...,n} and w>=range{w,x,y}.
; 1,5,17,38,75,127,203,300,429,585,781,1010,1287,1603,1975,2392,2873,3405,4009,4670,5411,6215,7107,8068,9125,10257,11493,12810,14239,15755,17391,19120,20977,22933,25025,27222,29563,32015,34619,37340
lpb $0
mov $2,$0
sub $0,1
seq $2,212... |
; A016250: Expansion of 1/((1-x)(1-7x)(1-9x)).
; 1,17,210,2290,23411,230307,2210020,20850980,194384421,1796538997,16498405430,150792530070,1373280939031,12472565630087,113044350922440,1022937980063560,9245213572903241,83478324422447577,753204735666257050,6792141332045915450,61222362965760453051,551652903533274575467,49... |
lc r4, 0x80000000
lc r5, 0xfffffffe
gts r6, r4, r5
halt
#@expected values
#r4 = 0x80000000
#r5 = 0xfffffffe
#r6 = 0x00000000
#pc = -2147483628
#e0 = 0
#e1 = 0
#e2 = 0
#e3 = 0
|
0x0000 (0x000000) 0x100C- f:00010 d: 12 | A = 12 (0x000C)
0x0001 (0x000002) 0x2924- f:00024 d: 292 | OR[292] = A
0x0002 (0x000004) 0x2118- f:00020 d: 280 | A = OR[280]
0x0003 (0x000006) 0x2925- f:00024 d: 293 | OR[293] = A
... |
; A232867: Positions of the negative integers in the sequence (or tree) of complex numbers generated by these rules: 0 is in S, and if x is in S, then x + 1 and i*x are in S, where duplicates are deleted as they occur.
; 8,12,19,30,45,64,87,114,145,180,219,262,309,360,415,474,537,604,675,750,829,912,999,1090,1185,1284,... |
[bits 32]
movd eax, mm0
movd mm0, eax
movd [0], mm0
movd mm0, [0]
movd eax, xmm0
movd xmm0, eax
movd [0], xmm0
movd xmm0, [0]
movq [0], xmm0
movq xmm0, [0]
movq xmm0, xmm1
movq xmm1, xmm0
movq [0], mm0
movq mm0, [0]
movq mm0, mm1
movq mm1, mm0
|
//
// Copyright (c) 2013-2021 Christoph Malek
// See LICENSE for more information.
//
#ifndef RJ_GAME_EDITOR_BACKGROUND_EDITOR_HPP
#define RJ_GAME_EDITOR_BACKGROUND_EDITOR_HPP
#include <rectojump/game/background/background_manager.hpp>
#include <rectojump/global/config_settings.hpp>
#include <rectojump/shared/utils.h... |
// 3Sum Closest
// 先排序,然后左右夹逼//
// Time Complexity: O(n^2), Space Complexity: O(1)
class Solution {
public:
int threeSumClosest(vector<int>& nums, int target) {
int result = 0;
int min_gap = INT_MAX;
sort(nums.begin(), nums.end());
for (auto a = nums.begin(); a != prev(nums.end(), ... |
; A169162: Number of reduced words of length n in Coxeter group on 5 generators S_i with relations (S_i)^2 = (S_i S_j)^27 = I.
; 1,5,20,80,320,1280,5120,20480,81920,327680,1310720,5242880,20971520,83886080,335544320,1342177280,5368709120,21474836480,85899345920,343597383680,1374389534720,5497558138880,21990232555520,87... |
; A020333: Numbers whose base-5 representation is the juxtaposition of two identical strings.
; 6,12,18,24,130,156,182,208,234,260,286,312,338,364,390,416,442,468,494,520,546,572,598,624,3150,3276,3402,3528,3654,3780,3906,4032,4158,4284,4410,4536,4662,4788,4914,5040,5166,5292,5418,5544,5670,5796,5922,6048,6174,6300,642... |
;
; ZX 81 specific routines
; by Stefano Bodrato, Oct 2007
;
; Copy a variable from basic
;
; int __CALLEE__ zx_getstr_callee(char variable, char *value);
;
;
; $Id: zx_getstr_callee.asm,v 1.5 2016/06/26 20:32:08 dom Exp $
;
SECTION code_clib
PUBLIC zx_getstr_callee
PUBLIC _zx_getstr_callee
PUBLIC ASMDISP_ZX_GETSTR... |
#if defined(__ELF__) && !defined(__FreeBSD__)
#include <Functions/IFunctionImpl.h>
#include <Functions/FunctionFactory.h>
#include <DataTypes/DataTypeString.h>
#include <Common/SymbolIndex.h>
#include <Core/Field.h>
namespace DB
{
namespace
{
/** buildId() - returns the compiler build id of the running binary.
*/... |
.data
A: .word 5
B: .word 3
result: .word 0
.text
.globl main
main:
la $s0, A
lw $a0, 0($s0) # $a0 = A
la $s1, B
lw $a1, 0($s1) # $a1 = B
la $s2, result
lw $a2, 0($s2) # $a2 = result
beq $a0, $a1, equality # if(A == B) call equality
bne $a0, $a1, compare # if(A != B) c... |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x17fd0, %rsi
lea addresses_WT_ht+0x1b1c8, %rdi
clflush (%rdi)
nop
nop
nop
nop
add %rbp, %rbp
mov $44, %rcx
rep movsq
nop
sub %rdi, %rdi
lea addresses_WT_ht+0xfd0, %rsi
nop
... |
; A245871: Number of length 2+2 0..n arrays with some pair in every consecutive three terms totalling exactly n.
; 10,45,100,193,318,493,712,993,1330,1741,2220,2785,3430,4173,5008,5953,7002,8173,9460,10881,12430,14125,15960,17953,20098,22413,24892,27553,30390,33421,36640,40065,43690,47533,51588,55873,60382,65133,70120,... |
RESULTS_START EQU $c000
RESULTS_N_ROWS EQU 4
include "base.inc"
; It takes (sample length + 2) ticks from the moment channel 1 is
; enabled until PCM12 is affected. (The read operation itself takes 2
; cycles)
CorrectResults:
db $00, $08, $08, $08, $08, $08, $08, $00
db $00, $08, $08, $08, $08, $08, $08, $00
db $... |
;Copyright (c) 2019 Grzegorz Raczek
;https://github.com/grzracz
;Files available under MIT license
global main
extern printf
extern scanf
section .data
instrukcja: db 'Please enter the number of the field on which the next symbol is to be placed.',10,0
instrukcja2: db 'Current symbol is: %c',10,0 ;%c - char... |
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/ext/boost/mpl/vector.hpp>
#include <boost/hana/assert.hpp>
#include <boost/hana/drop_front_exactly.hpp>
#include <boo... |
;*******************************************************************************
;* TMS320C55x C/C++ Codegen PC v4.4.1 *
;* Date/Time created: Sat Oct 06 06:38:44 2018 *
;****************************************************************************... |
#
# Copyright 2013 Jeff Bush
#
# 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 applicable law or agreed to in writi... |
//////////////////////////////////////////////////////////////////////////////
// nv_screen_code.asm
// Copyright(c) 2021 Neal Smith.
// License: MIT. See LICENSE file in root directory.
//////////////////////////////////////////////////////////////////////////////
// Contains screen related subroutines (and some suppo... |
/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/command_stream/linear_stream.h"
#include "core/command_stream/preemption.h"
#include "core/debug_settings/debug_settings_manager.h"
#include "core/helpers/aligned_memory.h"
#include "core/helpers/cache_policy.h"
#i... |
bits 16
org 0x7c00 ; boot code
start:
jmp do
nop
times 32-($-$$) db 0
do:
nop
xor ax, ax
mov ss, ax
sti
; ax is still zero ^^^
mov al, 0x03
int 0x10
; make background red
mov ax, 0xb800
mov es, ax
mov ax, 0x4020
mov cx, 80 * 25
xor di, di
rep stosw
; write message
mov di, 2000 - 2... |
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Test Delaunay triangulation
* Author: Even Rouault, even.rouault at spatialys.com
*
******************************************************************************
* Copyright (c) 20... |
; A102615: Nonprime numbers of order 2.
; 1,8,10,14,15,16,20,22,24,25,27,30,32,33,35,36,38,39,40,44,46,48,49,50,51,54,55,56,58,62,63,64,66,68,69,70,72,75,76,77,78,80,82,85,86,87,88,90,92,93,94,96,99,100,102,104,105,108,110,111,114,115,116,117,118,120
mov $1,3
lpb $1
seq $0,18252 ; The nonprime numbers: 1 together wi... |
; A099802: Bisection of A000720.
; 1,2,3,4,4,5,6,6,7,8,8,9,9,9,10,11,11,11,12,12,13,14,14,15,15,15,16,16,16,17,18,18,18,19,19,20,21,21,21,22,22,23,23,23,24,24,24,24,25,25,26,27,27,28,29,29,30,30,30,30,30,30,30,31,31,32,32,32,33,34,34,34,34,34
mov $2,$0
add $2,1
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
mul... |
; (this is example how sjasmplus can be exploited as byte-processor over file content)
;
; script to convert 1bpp font (like original ZX ROM font, .ch8 files or .udg files)
; to assembly source form using `DG` directive, so you can see/modify the pixels
; in your text editor while editing code, if you prefer this style... |
; A280513: Index sequence of the reverse block-fractal sequence A001468.
; Submitted by Christian Krause
; 1,2,1,5,4,3,2,1,13,12,11,10,9,8,7,6,5,4,3,2,1,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65... |
; A276855: Beatty sequence for (3 + golden ratio).
; 0,4,9,13,18,23,27,32,36,41,46,50,55,60,64,69,73,78,83,87,92,96,101,106,110,115,120,124,129,133,138,143,147,152,157,161,166,170,175,180,184,189,193,198,203,207,212,217,221,226,230,235,240,244,249,253,258,263,267,272,277,281,286,290,295,300,304,309,314,318,323,327,332,... |
/*******************************************************************************
*
* Copyright (c) 2010 Michael Schulze <mschulze@ivs.cs.uni-magdeburg.de>
* 2010 Andre Dietrich <adietric@ivs.cs.uni-magdeburg.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with o... |
<%
from pwnlib.shellcraft.amd64.linux import syscall
%>
<%page args="file, length"/>
<%docstring>
Invokes the syscall truncate. See 'man 2 truncate' for more information.
Arguments:
file(char): file
length(off_t): length
</%docstring>
${syscall('SYS_truncate', file, length)}
|
; A136326: a(n) = a(n-1) + 4a(n-2) - 4a(n-3).
; 1,2,4,9,17,37,69,149,277,597,1109,2389,4437,9557,17749,38229,70997,152917,283989,611669,1135957,2446677,4543829,9786709,18175317,39146837,72701269,156587349,290805077,626349397,1163220309,2505397589,4652881237,10021590357,18611524949,40086361429,74446099797,160345445717,2... |
;------------------------------------------------------------------------------
;
; Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. Th... |
// Copyright 2006-2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this lis... |
/*
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_container/cmdcontainer.h"
#include "shared/source/command_stream/linear_stream.h"
#include "shared/source/memory_manager/allocations_list.h"
#include "shared/test/common/fixtures/device_fixture.h"
... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
ui->label->setText("Olá");
}
|
//write include statements
#include "dna.h"
#include<string>
#include<iostream>
//write using statements
using std::cin; using std::cout;
/*
Write code that prompts user to enter 1 for Get GC Content,
or 2 for Get DNA Complement. The program will prompt user for a
DNA string and call either get gc content or get dn... |
; A076640: a(1)=1, a(n) = a(n-phi(n)) + 1.
; 1,2,2,3,2,4,2,4,3,5,2,5,2,5,3,5,2,6,2,6,4,6,2,6,3,6,4,6,2,7,2,6,3,7,3,7,2,7,4,7,2,8,2,7,5,7,2,7,3,8,3,7,2,8,4,7,5,8,2,8,2,7,5,7,3,8,2,8,4,8,2,8,2,8,4,8,3,9,2,8,5,9,2,9,5,8,3,8,2,9,3,8,4,8,3,8,2,8,5,9,2,9,2,8,6,9,2,9,2,9,5,8,2,10,5,9,6,9,3,9,3,8,3,8,4,10,2,8,6,10,2,9,4,9,6,9,... |
; A098790: a(n) = 2*a(n-1) + a(n-2) + 1, a(0) = 1, a(1) = 2.
; 1,2,6,15,37,90,218,527,1273,3074,7422,17919,43261,104442,252146,608735,1469617,3547970,8565558,20679087,49923733,120526554,290976842,702480239,1695937321,4094354882,9884647086,23863649055,57611945197,139087539450,335787024098,810661587647,1957110199393,4724... |
/**
* @file liblava/block/descriptor.hpp
* @brief Descriptor definition
* @authors Lava Block OÜ and contributors
* @copyright Copyright (c) 2018-present, MIT License
*/
#pragma once
#include <liblava/base/device.hpp>
namespace lava {
/**
* @brief Descriptor
*/
struct descriptor : enti... |
; A214858: Natural numbers missing from A214857.
; 5,8,12,15,19,22,26,29,32,36,39,43,46,49,53,56,60,63,67,70,73,77,80,84,87,90,94,97,101,104,108,111,114,118,121,125,128,131,135,138,142,145,149,152,155,159,162,166,169,172,176,179,183,186,189,193,196,200
mov $5,$0
add $0,1
mov $2,$0
add $0,1
lpb $0
lpb $0
sub $0,1... |
; A152917: A000169 prefixed by an initial 0.
; 0,1,2,9,64,625,7776,117649,2097152,43046721,1000000000,25937424601,743008370688,23298085122481,793714773254144,29192926025390625,1152921504606846976,48661191875666868481,2185911559738696531968,104127350297911241532841
mov $1,$0
lpb $1
min $0,$1
trn $1,1
add $2,$1
... |
//Printing the prime numbers upto a given number 'n' in O(n log log n) time.
// as it takes O(n) time in iterartive method.
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n + 1];
memset(arr, 0, sizeof(arr)); //Initialising all values with zero
a... |
; A120264: Numerator of Sum[ (-1)^(k+1)/k^k, {k,1,n} ].
; Submitted by Christian Krause
; 1,3,85,5413,16922537,456895999,376274084904457,24659496552164597077,13105067550356276873597957,40953336089635928267832533257,11684464736880059106484670339210887010027
mov $1,1
lpb $0
mov $2,$0
sub $0,1
add $2,1
pow $2,$2
... |
_ln: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
if(argc != 3){
... |
; A137234: Transform of A000292 without the initial 0 by the T_{0,0} transformation (see link).
; 1,5,16,43,107,257,607,1422,3318,7727,17978,41810,97214,226014,525439,1221519,2839710,6601549,15346765,35676927,82938821,192809396,448227496,1042002541,2422362052,5631308596,13091204252,30433357644,70748973053
mov $15,$0
m... |
extern addBCD
extern display4BCD
extern displayTile
extern removeItem
extern score
extern wyz_play_sound
public _animateCoins
public _coinTables
public coinCollision
public currentCoinTable
include "defs.inc"
se... |
//
// Copyright (c) 2017 CNRS
//
#ifndef __pinocchio_python_fcl_contact_hpp__
#define __pinocchio_python_fcl_contact_hpp__
#include "pinocchio/spatial/fcl-pinocchio-conversions.hpp"
#include <hpp/fcl/collision_data.h>
#include <boost/python.hpp>
#include <boost/python/copy_const_reference.hpp>
#include <boost/python... |
; A115716: A divide-and-conquer sequence.
; 1,1,3,1,3,1,11,1,3,1,11,1,3,1,43,1,3,1,11,1,3,1,43,1,3,1,11,1,3,1,171,1,3,1,11,1,3,1,43,1,3,1,11,1,3,1,171,1,3,1,11,1,3,1,43,1,3,1,11,1,3,1,683,1,3,1,11,1,3,1,43,1,3,1,11,1,3,1,171,1,3,1,11,1,3,1,43,1,3,1,11,1,3,1,683,1,3,1,11,1
lpb $0
mul $0,4
dif $0,8
sub $0,1
mul ... |
.file "a30.c"
.text
.globl main
.type main, @function
main:
subl $4, %esp
movl 12(%esp), %eax
movl (%eax), %eax
movl %eax, (%esp)
call toto
.L08048311:
addl $4, %esp
ret
.size main, .-main
# ----------------------
.L08048315:
.p2align 3
# ----------------------
.local ... |
#include <iostream>
using namespace std;
int main() {
int menu;
while (menu != 5) {
cout << "==================" << endl;
cout << "1 - Saldo" << endl;
cout << "2 - Saque" << endl;
cout << "3 - Depósito" << endl;
cout << "4 - Transferência" << endl;
cout << "5 - SAIR" << endl;
cout <<... |
// Copyright (C) 2020-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <stdint.h>
#include "eltwise/eltwise-fma-mod-internal.hpp"
namespace intel {
namespace hexl {
#ifdef HEXL_HAS_AVX512DQ
template <int BitShift, int InputModFactor>
void EltwiseFMAModAVX512(uint64_t* result, co... |
; A169865: The sequence T of a pair S, T generalizing Golomb's sequence A001462 and the pair A093848, A169863. See Comments for definition.
; 2,5,7,9,11,14,16,18,20,22,24,27,29,31,33,35,37,39,41,44,46
mul $0,2
mov $1,$0
sub $1,1
lpb $1
add $0,1
add $2,5
sub $1,$2
trn $1,2
lpe
add $0,2
|
; A092841: Numerator of I(n) = Integral_{x=0..1/(4^n)} (1-sqrt(x))^2 dx; e.g., I(3) = 323/24576. The denominator is b(n) = 96*16^(n-1); e.g., b(3) = 24576.
; 1,11,67,323,1411,5891,24067,97283,391171,1568771,6283267,25149443,100630531,402587651,1610481667,6442188803,25769279491,103078166531,412314763267,1649263247363,65... |
; A309074: a(0) = 1; a(2*n) = 4*a(n), a(2*n+1) = a(n).
; 1,1,4,1,16,4,4,1,64,16,16,4,16,4,4,1,256,64,64,16,64,16,16,4,64,16,16,4,16,4,4,1,1024,256,256,64,256,64,64,16,256,64,64,16,64,16,16,4,256,64,64,16,64,16,16,4,64,16,16,4,16,4,4,1,4096,1024,1024,256,1024,256,256,64,1024,256,256,64
seq $0,80791 ; Number of nonleadi... |
TITLE D:\Kip\AsmBook4\Examples\HLL_Linking\VisualCPP\ArraySum\ArraySum.cpp
.386P
include listing.inc
.model FLAT
PUBLIC ?MySub@@YAXXZ ; MySub
EXTRN __fltused:NEAR
_TEXT SEGMENT
_A$ = -4
_B$ = -8
_name$ = -28
_c$ = -36
?MySub@@YAXXZ PROC NEAR ; MySub, COMDAT
push ebp
mov ebp, esp
sub esp, 100 ; loca... |
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://www.visualizationlibrary.org ... |
;
; Copyright (C) 2021 by Intel Corporation
;
; Permission to use, copy, modify, and/or distribute this software for any
; purpose with or without fee is hereby granted.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHA... |
; @@@ int mikeos_write_file(char *buf, char *filename, int size);
%include "os_vector.inc"
section .text
use16
global _mikeos_write_file
_mikeos_write_file:
push bp
mov bp, sp
mov bx, [bp + 4]
mov ax, [bp + 6]
mov cx, [bp + 8]
mov dx, cx
; XXX libmikeos does not check file size
mov bp, os_write_fil... |
;* * * * * Small-C/Plus z88dk * * * * *
; Version: 15597-fc7bb69c6-20191123
;
; Reconstructed for z80 Module Assembler
;
; Module compile time: Mon Jan 6 15:04:07 2020
MODULE joystick_type_c
INCLUDE "z80_crt0.hdr"
SECTION rodata_compiler
._joystick_type
defw i_1+0
defw i_1+8
defw i_1+15
defw i_1+26
de... |
; A048656: a(n) is the number of unitary (and also of squarefree) divisors of n!.
; Submitted by Christian Krause
; 1,2,4,4,8,8,16,16,16,16,32,32,64,64,64,64,128,128,256,256,256,256,512,512,512,512,512,512,1024,1024,2048,2048,2048,2048,2048,2048,4096,4096,4096,4096,8192,8192,16384,16384,16384,16384,32768,32768,32768,32... |
// Copyright 2016, VIXL authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions ... |
;
; bootstrap:
; this is launched by the (multiboot-compatible) bootloader. it runs in old
; "short" mode (32 bits), initializes the basic hardware, and then loads the
; 64-bit kernel and jumps into it in "long" mode (64 bits).
;
; sometimes multiboot is called a "stage 2 loader", so i guess we are at
; stage 3 now.
;
... |
; A158767: a(n) = 76*n^2 + 1.
; 1,77,305,685,1217,1901,2737,3725,4865,6157,7601,9197,10945,12845,14897,17101,19457,21965,24625,27437,30401,33517,36785,40205,43777,47501,51377,55405,59585,63917,68401,73037,77825,82765,87857,93101,98497,104045,109745,115597,121601,127757,134065,140525,147137,153901,160817,167885,175105,1... |
;;
;; Copyright (c) 2012-2020, Intel Corporation
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
;;
;; * Redistributions of source code must retain the above copyright notice,
;; this list of conditions and... |
SECTION code_clib
SECTION code_l
PUBLIC l_lsr_dehl
INCLUDE "config_private.inc"
; logical shift right 32-bit unsigned long
;
; enter : dehl = 32-bit number
; a = shift amount
;
; exit : dehl = dehl >> a
;
; uses : af, b, de, hl
IF __CLIB_OPT_IMATH_SELECT & $02
EXTE... |
;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license and patent
; grant that can be found in the LICENSE file in the root of the source
; tree. All contributing project authors may be found in the AUTHORS
; file in the root of the sour... |
; A168103: a(n) = sum of natural numbers m such that n - 4 <= m <= n + 4.
; 10,15,21,28,36,45,54,63,72,81,90,99,108,117,126,135,144,153,162,171,180,189,198,207,216,225,234,243,252,261,270,279,288,297,306,315,324,333,342,351,360,369,378,387,396,405,414,423,432,441,450,459,468,477,486,495,504,513,522,531,540,549,558,567,... |
SECTION code_clib
SECTION code_fp_math32
PUBLIC asm_dmulpow10
EXTERN m32_float8, m32_fsmul_callee
EXTERN _m32_exp10f
; multiply DEHL' by a power of ten
; DEHL' *= 10^(A)
;
; enter : DEHL'= float x
; A = signed char
;
; exit : success
;
; DEHL'= x * 10^(A)
; ... |
; C FFI routines.
; Someday we should either make a Real FFI or an inline assembler.
; Until then, this works.
; Except we don't actually use it, since we have no module system, etc...
extern printIntC, printCharC
printInt:
sub esp, 4
mov [esp], ebp
mov ebp, esp
mov eax, [ebp+4]
push eax
call printIntC
pop ea... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x9f19, %rax
add %rsi, %rsi
mov $0x6162636465666768, %r8
movq %r8, %xmm7
movups %xmm7, (%rax)
nop
nop
cmp $4198, %rdi
lea addresses_A_ht+0x11fb9, %rax
nop
nop
and %r15, %r15
mov... |
; File: src\aes128_win.asm
format PE GUI
entry _start
include 'win32a.inc'
section '.text' code readable executable
_start:
; First of all we have to expand the key
; into AES key schedule.
lea esi, [k]
movups xmm1, [esi]
lea edi, [s]
; Copy initial key to schedule
mov ecx, 4
re... |
; A119992: a(n) = n-th positive integer which is coprime to n!.
; 1,3,7,11,17,19,29,31,37,41,47,53,61,67,71,73,83,89,101,103,107,109,127,131,137,139,149,151,163,167,179,181,191,193,197,199,223,227,229,233,241,251,263,269,271,277,283,293,307,311,313,317,337,347,349,353,359,367,379,383,397,401,409,419,421,431,439,443,449... |
; A048740: Product of divisors of n-th composite number.
; 8,36,64,27,100,1728,196,225,1024,5832,8000,441,484,331776,125,676,729,21952,810000,32768,1089,1156,1225,10077696,1444,1521,2560000,3111696,85184,91125,2116,254803968,343,125000,2601,140608,8503056,3025,9834496,3249,3364,46656000000,3844,250047,2097152,4225,1897... |
; A220442: a(n) = 3^n + 6^n + 9^n + 12^n.
; Submitted by Christian Krause
; 4,30,270,2700,28674,315900,3564810,40896900,474714594,5557298220,65464673850,774752404500,9200707298514,109548133495740,1306873625950890,15613382906014500,186740100236842434,2235305215228688460,26773529476526331930,320831460449198190900,3845921... |
; A261898: Values of |G-hat_1(n)|, a sum involving Stirling numbers of the second kind.
; 1,1,4,25,210,2205,27720,405405,6756750,126351225,2618916300,59580345825,1475759335050,39529267903125,1138442915610000,35078272337233125,1151392703775063750,40106845848164720625,1477620636511331812500,57405561728465240915625,234542... |
BITS 64
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
; LD_F80m
;TEST_BEGIN_RECORDING
lea rdi, [rsp-0xc]
mov DWORD [rdi], 0x2168c000
mov DWORD [rdi+0x4], 0xc90fdaa2
mov DWORD [rdi+0x8], 0x00004000
fld TWORD [rdi]
mov edi, 0x0
;TEST_END_RECORDING
|
EXTRN X: byte
PUBLIC exit
SD2 SEGMENT para 'DATA'
Y db 'Y'
SD2 ENDS
SC2 SEGMENT para public 'CODE'
assume CS:SC2, DS:SD2
exit:
mov ax, seg X
mov es, ax
mov bh, es:X
mov ax, SD2
mov ds, ax
xchg ah, Y
xchg ah, ES:X
xchg ah, Y
mov ah, 2
mov dl, Y
int 21h
mov ax, 4c00h
int 21h
SC2 ENDS
END |
#include "EskyWindow.h"
EskyWindow::EskyWindow(SDL_Window* window_handle)
: _window_handle(window_handle) {}
EskyWindow::~EskyWindow() { SDL_DestroyWindow(_window_handle); }
void EskyWindow::onEvent(const SDL_WindowEvent* event) {
switch (event->event) {
case SDL_WINDOWEVENT_SIZE_CHANGED: {
int width... |
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0xeffe, %rcx
nop
nop
nop
nop
nop
sub $23849, %rdi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm7
movups %xmm7, (%rcx)
nop
nop
xor $19542, %rsi
lea addresses_WC_ht+0x1892, %rsi
l... |
#include "IRremote.h"
// Reverse Engineered by looking at RAW dumps generated by IRremote
// I have since discovered that Denon publish all their IR codes:
// https://www.google.co.uk/search?q=DENON+MASTER+IR+Hex+Command+Sheet
// -> http://assets.denon.com/documentmaster/us/denon%20master%20ir%20hex.xls
// Having ... |
; 2009-01-01
%macro getc 1
mov %1,byte [esi]
inc esi
%endmacro
%macro putc 1
mov byte [edi],%1
inc edi
%endmacro
section .text
global _start ;must be declared for linker (ld)
_start:
mov eax,3 ;sys_read
mov ebx,0 ;stdin
mov ecx,indata ;buffer
mov edx,10000000
mov esi,indata ;input pointer
int 0... |
.size 8000
.text@48
jp lstatint
.text@100
jp lbegin
.data@143
c0
.text@150
lbegin:
ld a, 00
ldff(ff), a
ld b, 91
call lwaitly_b
ld a, b1
ldff(40), a
ld a, 03
ldff(4b), a
ld c, 41
ld b, 03
lbegin_waitm3:
ldff a, (c)
and a, b
cmp a, b
jrnz lbegin_waitm3
ld a, 20
ldff(c), a
xor a, a
ldff(0f), a
l... |
; *********************************************************************************
; *********************************************************************************
;
; File: con.raw.asm
; Purpose: con.raw words.
; Date : 5th January 2019
; Author: paul@robsons.org.uk
;
; ************************************... |
; A023889: Sum of the prime power divisors of n (not including 1).
; 0,2,3,6,5,5,7,14,12,7,11,9,13,9,8,30,17,14,19,11,10,13,23,17,30,15,39,13,29,10,31,62,14,19,12,18,37,21,16,19,41,12,43,17,17,25,47,33,56,32,20,19,53,41,16,21,22,31,59,14,61,33,19,126,18,16,67,23,26,14,71,26,73,39,33,25,18,18,79,35,120,43,83,16,22,45,32... |
; int asprintf (char **ptr, const char *format, ...)
SECTION code_stdio
PUBLIC _asprintf
EXTERN asm_asprintf
defc _asprintf = asm_asprintf
|
#include "publisherSH.h"
void PublisherSH::begin(char *uuid, char *endpoint)
{
PublisherSH::doc["sensor"] = uuid; // Specify sensor uuid in json document
Serial.printf("\nPublisher configured with uuid %s", uuid);
PublisherSH::endpoint = endpoint; // Specify endpoint
Serial.printf("\nWill publish on ... |
; Substitute for z80 rld instruction
; aralbrec 06.2007
; CPU Min T Max T
; 8080 201 232
; 8085 197 226
; gbz80 164 188
; r2k 108 125
; z180 18 18
; z80 18 18
; z80n 18 18
SECTION code_crt0_sccz80
PUBLIC __z80asm__rld
__z80asm__rld:
jr nc, dorld
call dorl... |
#include "Portfolio.h"
namespace Chernobyl
{
void Portfolio::UpdateValue()
{
double newValue = 0.0;
for (auto position : positions)
{
newValue += position.second->value.value;
}
portfolioValue.UpdateValue(newValue);
}
void Portfolio::UpdatePosition(std::string symbol, int amount, double price)
{
i... |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x24cd, %rsi
lea addresses_D_ht+0x12c0d, %rdi
sub %r10, %r10
mov $114, %rcx
rep movsl
xor $41075, %rax
lea addresses_WC_ht+0x94cd, %rsi
lea addresses_UC_ht+0xc2cd, %rdi
clflush... |
/**
* @file bfs.cxx Contains the Breadth-First Search implementation
* @brief
* Implementation of Breadth First Search algorithm over a graph.
*
* @author George Heineman
* @date 6/15/08
*/
#include "bfs.h"
/**
* Perform breadth-first search on graph from vertex s, and compute BFS
* distance and pred v... |
; A044720: Numbers n such that string 0,7 occurs in the base 10 representation of n but not of n+1.
; Submitted by Christian Krause
; 107,207,307,407,507,607,707,807,907,1007,1079,1107,1207,1307,1407,1507,1607,1707,1807,1907,2007,2079,2107,2207,2307,2407,2507,2607,2707,2807,2907,3007,3079,3107,3207,3307,3407,3507
seq ... |
; A179596: Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + x)/(1 - 2*x - 11*x^2 - 6*x^3).
; Submitted by Jon Maiga
; 1,3,17,73,351,1607,7513,34809,161903,751783,3493353,16227737,75393055,350251335,1627192697,7559508409,35119644495,163157037671,757987215241,3521419711833,16359641017343,7600282215629... |
; A343936: Number of ways to choose a multiset of n divisors of n - 1.
; 1,2,3,10,5,56,7,120,45,220,11,4368,13,560,680,3876,17,26334,19,42504,1771,2024,23,2035800,325,3276,3654,201376,29,8347680,31,376992,6545,7140,7770,145008513,37,9880,10660,53524680,41,73629072,43,1712304,1906884
mov $2,$0
seq $0,134871 ; a(1) = 1,... |
; A007004: a(n) = (3*n)! / ((n+1)*(n!)^3).
; Submitted by Jon Maiga
; 1,3,30,420,6930,126126,2450448,49884120,1051723530,22787343150,504636071940,11377249621920,260363981732400,6034149862347600,141371511060715200,3343436236585914480,79726203788589122490,1914992149823954412750,46295775130831740013500,1125718321602329678... |
; iNES header
; iNES identifier
.byte "NES",$1a
; Number of PRG-ROM blocks
.byte $01
; Number of CHR-ROM blocks
.byte $01
; ROM control bytes: Horizontal mirroring, no SRAM
; or trainer, Mapper #0
.byte $00, $00
; Filler
.byte $00,$00,$00,$00,$00,$00,$00,$00
; PRG-ROM
.include "tutorprg.asm"
; CHR-ROM
.include ... |
; A191526: Number left factors of Dyck paths of length n and having no hills; a hill is a (1,1)-step starting at level 0 and followed by a (1,-1)-step.
; Submitted by Christian Krause
; 1,1,1,2,4,7,13,24,46,86,166,314,610,1163,2269,4352,8518,16414,32206,62292,122464,237590,467842,909960,1794196,3497248,6903352,13480826... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.