text stringlengths 1 1.05M |
|---|
//
// main.cpp
// Shortest_path
//
// Created by Daniel Fernandez on 10/19/19.
// Copyright © 2019 Daniel Fernandez. All rights reserved.
//
#include <iostream>
#include <string>
#include "Map.hpp"
using namespace std;
//data file
const string DATA_FILE = "./data.map";
//map object
Map map;
//overload operat... |
#include<cstdio>
#include<iostream>
#include<gtkmm.h>
#include"Image.h"
#include "Interface.h"
dialog::~dialog()
{
//dtor
}
dialog::dialog()
{
//ctor
}
void dialog::operate(Image* imag,int i,Gtk::Image *m_image1,int imagestatus1,Gtk::Label* pixlabel)
{
label=pixlabel;
im=imag;
imagestatus=imagest... |
;*****************************************************************************
;* x86inc.asm: x264asm abstraction layer
;*****************************************************************************
;* Copyright (C) 2005-2016 x264 project
;*
;* Authors: Loren Merritt <lorenm@u.washington.edu>
;* Anton Mitrofan... |
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1988 - 1991
; * All Rights Reserved.
; */
PAGE ,132 ;AN000;
TITLE DOS GRAPHICS Command - Command Entry Point
;AN000;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ... |
/**
* @file Encoder.cpp
* @author Raffaele Montella <raffaele.montella@uniparthenope.it>
* @date Wed Nov 30 17:16:48 2016
*
* @brief
*
*
*/
#include "Encoder.h"
#include <cstdio>
#include <iostream>
using namespace std;
Encoder::Encoder() {
CHARS_PER_LINE = 72;
step = step_A;
result = 0;
... |
%include "macros/patch.inc"
%include "macros/datatypes.inc"
;@CLEAR 0x004D3F8A 0x00 0x004D3F8B ; power=0 hard-coded to damage 1 at 0x004D3F84, set it to 00 instead
; hard-coded power=17 for Vinifera at 0x00644DCA
@LJMP 0x0045ED08, _Tiberium_Chain_Reaction_Dont_Crash_With_Power_Zero
_Tiberium_Chain_Reaction_Dont_Cras... |
.ORIG x0000
; the TRAP vector table
.FILL BAD_TRAP ; x00
.FILL BAD_TRAP ; x01
.FILL BAD_TRAP ; x02
.FILL BAD_TRAP ; x03
.FILL BAD_TRAP ; x04
.FILL BAD_TRAP ; x05
.FILL BAD_TRAP ; x06
.FILL BAD_TRAP ; x07
.FILL BAD_TRAP ; x08
.FILL BAD_TRAP ; x09
.FILL BAD_TRAP ; x0A
.FILL BAD_TRAP ; x... |
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int N, r, c, seq = 0;
bool found = false;
void search(int x, int y, int size) {
//cout << x << " " << y << " " << size << " " << seq << endl;
if (found)return;
if (size == 1) {
if (r == x && c == y) {
found = true;
return;
}
e... |
; A184107: n-1+ceiling((n/6)^2); complement of A184106.
; 1,2,3,4,5,6,8,9,11,12,14,15,17,19,21,23,25,26,29,31,33,35,37,39,42,44,47,49,52,54,57,60,63,66,69,71,75,78,81,84,87,90,94,97,101,104,108,111,115,119,123,127,131,134,139,143,147,151,155,159,164,168,173,177,182,186,191,196,201,206
mov $2,$0
add $0,1
lpb $0,1
pow... |
;
; Copyright (c) 2016, Alliance for Open Media. All rights reserved
;
; This source code is subject to the terms of the BSD 2 Clause License and
; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
; was not distributed with this source code in the LICENSE file, you can
; obtain it at ww... |
;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing proje... |
.MODEL SMALL
.STACK 100H
.DATA
SUM DB 0
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
INPUT:
MOV AH,1
INT 21H
INC SUM
CMP AL,20H
JE SPACE
CMP AL,0DH
JNE INPUT
DEC SUM
JMP OUTPUT
SPACE:
DEC SUM
JMP INPUT
OUTPUT:
MOV AH,2
M... |
Name: ISPK-j.asm
Type: file
Size: 5647
Last-Modified: '1992-07-14T15:00:00Z'
SHA-1: 763E3197297D8AEB9BCFF757A63564A86A6E0729
Description: null
|
; features offered by cesium
feater_setup_editor:
res item_renaming,(iy + item_flag)
set item_set_editor,(iy + item_flag)
jr feature_item_rename.setup_name
feature_item_new:
ld a,(current_screen)
cp a,screen_programs
jp nz,main_loop
bit cesium_is_nl_disabled,(iy + cesium_flag)
jp nz,main_loop
res item_set_edi... |
; A036578: Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b.
; 1,0,2,1,2,0,1,0,2,0,1,2,1,0,2,1,2,0,1,2,1,0,2,0,1,0,2,1,2,0,1,0,2,0,1,2,1,0,2,0,1,0,2,1,2,0,1,2,1,0,2,1,2,0,1,0,2,0,1,2,1,0,2,1,2,0,1,2,1,0,2,0,1,0,2,1,2,0,1,2,1,0,2,1,2,0,1,0,2,0,1,2,1,0,2,0,1,0,2
cal $0,29883 ; First differences of Thue-Mors... |
; A296058: Numbers k such that floor((3*k - 1)/2) is prime.
; Submitted by Jamie Morken(s1)
; 2,4,5,8,9,12,13,16,20,21,25,28,29,32,36,40,41,45,48,49,53,56,60,65,68,69,72,73,76,85,88,92,93,100,101,105,109,112,116,120,121,128,129,132,133,141,149,152,153,156,160,161,168,172,176,180,181,185,188,189,196,205,208,209,212,221,... |
; ---------------------------------------------------------------------------
; Sprite mappings - Basaran enemy (MZ)
; ---------------------------------------------------------------------------
Map_Bas_internal:
dc.w @still-Map_Bas_internal
dc.w @fly1-Map_Bas_internal
dc.w @fly2-Map_Bas_internal
dc.w @fly3-Map... |
PROCESSOR 6502
; Compare two decimals on stack for equality
MAC cmpdecimaleq ; @pull @push
cmpwordeq
ENDM
; Compare two decimals on stack for inequality
MAC cmpdecimalneq ; @pull @push
cmpwordneq
ENDM
; Compare two decimals on stack for less than
; older < newer
MAC cmpdecimallt ; @pull @push
cmpword... |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xe13, %r14
add $12677, %rsi
and $0xffffffffffffffc0, %r14
vmovaps (%r14), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdx
nop
nop
nop
nop
and %rcx, %rcx
lea addre... |
bfi2(8) g23<1>UD g22<4,4,1>UD g18<4,4,1>UD g17<4,4,1>UD { align16 1Q };
bfi2(8) g19<1>UD g17<4,4,1>UD g54<4,4,1>UD g7<4,4,1>UD { align16 2Q };
|
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 88
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %68
OpExecutionMode %4 OriginUp... |
_MoltresBattleText::
text "Gyaoo!@@"
_VictoryRoad2BattleText1::
text "VICTORY ROAD is"
line "the final test"
cont "for trainers!"
done
_VictoryRoad2EndBattleText1::
text "Aiyah!"
prompt
_VictoryRoad2AfterBattleText1::
text "If you get stuck,"
line "try moving some"
cont "boulders around!"
done
_VictoryRo... |
; A071232: a(n) = (n^6 + n^3)/2.
; 0,1,36,378,2080,7875,23436,58996,131328,266085,500500,886446,1493856,2414503,3766140,5697000,8390656,12071241,17009028,23526370,32004000,42887691,56695276,74024028,95558400,122078125,154466676,193720086,240956128,297423855,364513500,443766736,536887296,645751953,772421860,919154250,10... |
setrepeat 2
frame 0, 15
frame 3, 15
frame 4, 15
dorepeat 1
endanim
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1993 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: DotMatrix printers
FILE: correctGamma26.asm
AUTHOR: Jim DeFrisco
REVISION HISTORY:
Name Date ... |
.include "defaults_mod.asm"
table_file_jp equ "exe6-utf8.tbl"
table_file_en equ "bn6-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252354A // BR5J
game_code_2 equ 0x42523545 // BR5E
game_code_3 equ 0x42523550 // BR5P
card_type equ 1
card_id equ 52
card_no equ "052"
card_sub equ "Mod Card 052"
card_sub_x ... |
; Stuff HOTKEY buffer 1991 Jochen Merz V0.01
section utility
include dev8_keys_hk_vector
xdef ut_stuff
xdef ut_stufc
xref ut_ushok
xref ut_frhok
;+++
; Stuff a QDOS string into the HOTKEY buffer.
;
; Entry ... |
/******************** (C) COPYRIGHT 2015 STMicroelectronics ********************
* Company : STMicroelectronics
* Author : MCD Application Team
* Description : STMicroelectronics Device Firmware Upgrade Extension Demo
* Version : V3.0.5
* Date : 01-September-2015
*... |
; A040131: Continued fraction for sqrt(143).
; 11,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1
mov $1,$0
cmp $0,0
sub $1,$0
gcd $1,2
add $1,9
add $0,$1
mul $0,$1
sub $0,99
|
; A171739: a(n) = 2^(n*(n-1)/2)*3^(n*(n+1)/2).
; 1,3,54,5832,3779136,14693280768,342764853755904,47976111050506371072,40290721869103654477234176,203018823308689211155302473269248
mov $1,3
mov $2,3
lpb $0
sub $0,1
mul $1,$2
mul $2,6
lpe
div $1,3
mov $0,$1
|
; A038573: a(n) = 2^A000120(n) - 1.
; 0,1,1,3,1,3,3,7,1,3,3,7,3,7,7,15,1,3,3,7,3,7,7,15,3,7,7,15,7,15,15,31,1,3,3,7,3,7,7,15,3,7,7,15,7,15,15,31,3,7,7,15,7,15,15,31,7,15,15,31,15,31,31,63,1,3,3,7,3,7,7,15,3,7,7,15,7,15,15,31,3,7,7,15,7,15,15,31,7,15,15,31,15,31,31,63,3,7,7,15
mov $1,$0
lpb $1
div $0,2
sub $1,$0
lp... |
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 43
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %38
OpExecutionMode %4 OriginUp... |
.include "defaults_mod.asm"
table_file_jp equ "exe4-utf8.tbl"
table_file_en equ "bn4-utf8.tbl"
game_code_len equ 3
game_code equ 0x4234574A // B4WJ
game_code_2 equ 0x42345745 // B4WE
game_code_3 equ 0x42345750 // B4WP
card_type equ 1
card_id equ 16
card_no equ "016"
card_sub equ "Mod Card 016"
card_sub_x ... |
/*
* Copyright 1999-2000,2004 The Apache Software Foundation.
*
* 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 requir... |
; void p_stack_init(void *p)
SECTION code_clib
SECTION code_adt_p_stack
PUBLIC p_stack_init
EXTERN asm_p_stack_init
defc p_stack_init = asm_p_stack_init
|
.386
.model flat,c
.data
intArray DWORD 1h, 2h, 3h, 4h
.code
arraySum proc
mov edi, OFFSET intArray ; sets the destenation array pointer
mov ecx, LengthOF intArray ;initilize the loop counter C = Counter
mov eax, 0 ; sets the accumeltaiver initilize for zerp
LP:
add eax, [edi]
add edi, TYPE intArray
... |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2011-2015 Intel Corporation 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 so... |
; w_array_t *w_array_init(void *p, void *data, size_t capacity)
SECTION code_adt_w_array
PUBLIC _w_array_init
EXTERN asm_w_array_init
_w_array_init:
pop af
pop hl
pop de
pop bc
push bc
push de
push hl
push af
jp asm_w_array_init
|
.386P
; Описание структуры дескриптора сегмента
descr struc
limit dw 0
base_l dw 0
base_m db 0
attr_1 db 0
attr_2 db 0
base_h db 0
descr ends
; Сегмент данных
; use16 - использование 16-битных адресов по умолчанию.
data segment use16
gdt_null descr <0,0,0,0,0,0> ; нулево... |
; ==================================================================
; MATH ROUTINES
; ==================================================================
; ------------------------------------------------------------------
; os_seed_random -- Seed the random number generator based on the current state of registers and... |
; A153893: a(n) = 3*2^n - 1.
; 2,5,11,23,47,95,191,383,767,1535,3071,6143,12287,24575,49151,98303,196607,393215,786431,1572863,3145727,6291455,12582911,25165823,50331647,100663295,201326591,402653183,805306367,1610612735,3221225471,6442450943,12884901887,25769803775,51539607551,103079215103,206158430207,412316860415,82... |
; int fputc_callee(int c, FILE *stream)
INCLUDE "clib_cfg.asm"
SECTION code_clib
SECTION code_stdio
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_MULTITHREAD & $02
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC _fputc_callee
EXTERN asm_fputc
_fputc_callee:
pop af
pop de
pop ix
push af
jp asm_fputc
;... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Epson RX 9-pin printer driver
FILE: eprx9DriverInfo.asm
AUTHOR: Dave Durran, 27 Feb 1990
REVISION HISTORY:
Name Date Description
... |
; A157431: a(n) = 4*n^2 + 73*n + 333.
; 410,495,588,689,798,915,1040,1173,1314,1463,1620,1785,1958,2139,2328,2525,2730,2943,3164,3393,3630,3875,4128,4389,4658,4935,5220,5513,5814,6123,6440,6765,7098,7439,7788,8145,8510,8883,9264,9653,10050,10455,10868,11289,11718,12155,12600,13053,13514,13983,14460,14945,15438,15939,16... |
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r9
push %rax
push %rbp
push %rcx
// Store
lea addresses_WC+0x6f28, %rax
nop
nop
nop
nop
nop
dec %r14
movb $0x51, (%rax)
dec %r10
// Load
lea addresses_PSE+0x4d28, %rbp
nop
nop
xor %r9, %r9
mo... |
; A054868: Sum of bits of sum of bits of n: a(n) = wt(wt(n)).
; 0,1,1,1,1,1,1,2,1,1,1,2,1,2,2,1,1,1,1,2,1,2,2,1,1,2,2,1,2,1,1,2,1,1,1,2,1,2,2,1,1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,1,2,1,2,2,2,1,1,1,2,1,2,2,1,1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,1,2,1,2,2,2,1,2,2,1,2,1,1,2,2,1,1,2,1,2,2,2,2,1,1,2,1,2,2,2,1,2,2,2,2,2,2,3,... |
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r9
push %rax
push %rbx
push %rcx
push %rsi
// Store
lea addresses_WT+0x128f9, %r9
nop
nop
nop
nop
and %rcx, %rcx
mov $0x5152535455565758, %r14
movq %r14, %xmm6
movups %xmm6, (%r9)
inc %rax
// Load
lea ... |
; A037124: Numbers that contain only one nonzero digit.
; 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,200000,300000,400000,500000,600000,700000,800000,900000,1000000,2000000,300... |
SECTION code_clib
SECTION code_fp_math48
PUBLIC _tan
EXTERN cm48_sdccix_tan
defc _tan = cm48_sdccix_tan
|
; A029044: Expansion of 1/((1-x)(1-x^3)(1-x^5)(1-x^12)).
; 1,1,1,2,2,3,4,4,5,6,7,8,10,11,12,15,16,18,21,22,25,28,30,33,37,40,43,48,51,55,61,64,69,75,79,85,92,97,103,111,117,124,133,139,147,157,164,173,184,192,202,214,223,234,247,257,269,283,294,307,323,335,349,366,379,395,413,427,444,463,479,497,518,535,554,577,595,616... |
global switch_to_fiber
section .text
; mov [rbp - 0x8], rdi ; 1. argument
; mov [rbp - 0x4], rsi ; 2. argument
; rax, rcx, rdx are free to use for whatever
; rdi: arg 0
; rsi: arg 1
; rcx: from (^Fiber)
; rdx: to (^Fiber)
switch_to_fiber:
; save registers
mov [rdi + 0 * 8], rsp
mov [rdi +... |
/**
*
* C++ implementation to find the edit distance between two strings
*
* (c) Copyright 2019 Clayton J. Wong ( http://www.claytonjwong.com )
*
**/
#include <iostream>
#include <sstream>
#include <iterator>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
using VI = vector< int >;... |
Button_type equ 0
Button_image equ 4
Button_x equ 8
Button_y equ 12
Button_w equ 16
Button_h equ 20
Button_text equ Component_CLASS_SIZE
Button_onClick equ Component_CLASS_SIZE+4
Button_backingColor equ Component_CLASS_SIZE+8
Button.Create : ; String str, Func onclick, int x, int y, int w, int h
methodT... |
#include "../BlockLocalPositionEstimator.hpp"
#include <systemlib/mavlink_log.h>
#include <matrix/math.hpp>
extern orb_advert_t mavlink_log_pub;
// required number of samples for sensor
// to initialize
static const uint32_t REQ_GPS_INIT_COUNT = 10;
static const uint32_t GPS_TIMEOUT = 1000000; // 1.0 s
void... |
; DRAW XOR SPRITE 2 BYTE DEFINITION ROTATED, ON LEFT BORDER
; 01.2006 aralbrec, Sprite Pack v3.0
; sinclair spectrum version
INCLUDE "clib_target_cfg.asm"
SECTION code_clib
SECTION code_temp_sp1
PUBLIC _SP1_DRAW_XOR2LB
EXTERN _SP1_DRAW_XOR2NR
EXTERN SP1RETSPRDRAW
; following data segment copied into struct sp1_cs... |
// MIT License
//
// Copyright (c) 2020 Piotr Zdanowicz
//
// 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, mod... |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
msvcjmc SEGMENT
__A73354DD_stdlib@h DB 01H
__188180DA_corecrt_math@h DB 01H
__D23EE329_cstdlib DB 01H
__6BC0FD35_vcruntime_new@h DB 01H
__5ECFF36E_type_traits DB 01H
__331E732B_m... |
; A064762: a(n) = 21*n^2.
; 0,21,84,189,336,525,756,1029,1344,1701,2100,2541,3024,3549,4116,4725,5376,6069,6804,7581,8400,9261,10164,11109,12096,13125,14196,15309,16464,17661,18900,20181,21504,22869,24276,25725,27216,28749
mov $1,$0
pow $1,2
mul $1,21
|
; A267536: Decimal representation of the n-th iteration of the "Rule 143" elementary cellular automaton starting with a single ON (black) cell.
; 1,6,25,103,415,1663,6655,26623,106495,425983,1703935,6815743,27262975,109051903,436207615,1744830463,6979321855,27917287423,111669149695,446676598783,1786706395135,7146825580... |
; A132680: Number of ones in binary representation of odious numbers.
; 1,1,1,3,1,3,3,3,1,3,3,3,3,3,3,5,1,3,3,3,3,3,3,5,3,3,3,5,3,5,5,5,1,3,3,3,3,3,3,5,3,3,3,5,3,5,5,5,3,3,3,5,3,5,5,5,3,5,5,5,5,5,5,7,1,3,3,3,3,3,3,5,3,3,3,5,3,5,5,5,3,3,3,5,3,5,5,5,3,5,5,5,5,5,5,7,3,3,3,5,3,5,5,5,3,5,5,5,5,5,5,7,3,5,5,5,5,5,5,7,5,5,5,7,... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1e242, %r11
nop
nop
nop
nop
xor %r15, %r15
mov (%r11), %rdi
nop
nop
nop
dec %rbp
lea addresses_A_ht+0xdfc2, %r13
nop
nop
nop
nop
sub $38848, %r11
movb (%r13), %r12b
... |
#include <iostream>
#include <random>
#include "proximalGradient.hpp"
#include "douglasRachford.hpp"
#include "admmSolver.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
float snr(const Eigen::VectorXf& x_true, const Eigen::VectorXf& x_rec)
{
retur... |
#ifndef TIC_TAC_TOE_GAME_HPP
#define TIC_TAC_TOE_GAME_HPP
#include "game_board.hpp"
#include "game_logic.hpp"
#include "player.hpp"
#include <iostream>
#include <stdlib.h>
namespace tictactoe {
class game {
private:
game_board board_;
game_logic logic_;
int input_x;
int input_y;
bool player_x = true;
pu... |
; A308215: a(n) is the multiplicative inverse of A001844(n+1) modulo A001844(n); where A001844 is the sequence of centered square numbers.
; 0,2,12,11,39,28,82,53,141,86,216,127,307,176,414,233,537,298,676,371,831,452,1002,541,1189,638,1392,743,1611,856,1846,977,2097,1106,2364,1243,2647,1388,2946,1541,3261,1702,3592,18... |
Name: ys_bbbros.asm
Type: file
Size: 99729
Last-Modified: '2016-05-13T04:51:16Z'
SHA-1: 09934E1439642EF05C311E2768351D054E0CDA2C
Description: null
|
#include <iostream>
int main()
{
char response = 'y';
switch (response)
{
case 'y':
// Block of code executes if the value of response is y.
break;
case 'Y':
// Block of code executes if the value of response is Y.
break;
case 'n':
// Block of code execut... |
#include <SFML/Graphics.hpp>
int main( )
{
sf::RenderWindow window( sf::VideoMode( 640, 480 ), "Awesome Game" );
while ( window.isOpen( ) )
{
sf::Event event;
// handle all events
while ( window.pollEvent( event ) )
{
switch ( event.type )
... |
; ===============================================================
; Nov 2013
; ===============================================================
;
; int abs(int j)
;
; Return absolute value of j.
;
; ===============================================================
SECTION code_clib
SECTION code_stdlib
PUBLIC asm_abs
... |
; A144478: Period 9: repeat 1,0,5,7,6,2,4,3,8.
; 1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8
mov $2,1
mov $3,$0
mov $0,2
mov $4,$3
mul $3,2
add $4,$3
mov $5,1
lpb $0,1
sub $4,$2
mov $2,$0
sub $0,1
mul $5,$4
lpe
mod $5,27
add $0,$5
mov $1,$0
div $1... |
#ifndef __STRICT_FSTREAM_HPP
#define __STRICT_FSTREAM_HPP
#include <cassert>
#include <fstream>
#include <cstring>
#include <string>
/**
* This namespace defines wrappers for std::ifstream, std::ofstream, and
* std::fstream objects. The wrappers perform the following steps:
* - check the open modes make sense
* -... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "pch.h"
#include "CopyPasteManager.h"
#include "Common/TraceLogger.h"
#include "Common/LocalizationSettings.h"
using namespace std;
using namespace concurrency;
using namespace CalculatorApp;
using namespace Calcu... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x566f, %rax
nop
nop
nop
nop
add %rbx, %rbx
movw $0x6162, (%rax)
nop
nop
nop
nop
sub $1197, %r13
lea addresses_UC_ht+0xa66f, %r15
nop
nop
cmp $2311, %rdi
mov $0x61626... |
page ,132
title Find ROM Resident Code
comment %
FindROMRes locates COMMAND's ROM-resident code during initialization.
The supplied code handles the cases
o complete COMMAND image below 1 MB
o COMMAND resident code below 1 MB, rest of image somewhere else
The cases are identified by the symbols defined in... |
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1954e, %rsi
lea addresses_WC_ht+0x4748, %rdi
clflush (%rdi)
nop
sub %r14, %r14
mov $52, %rcx
rep movsq
nop
nop
nop
cmp $40788, %rdi
lea addresses_D_ht+0x149ae, %r13
nop
sub %rbp, %rbp... |
processor 6502
include "vcs.h"
include "macro.h"
seg code
org $F000
Start:
CLEAN_START ; macro to safely clear memory and TIA
; Start a new frame by turning on VBLANK and VSYNC
NextFrame:
lda #2 ; same as binary value %00000010
sta VBLANK ; turn on VBLANK
sta VS... |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2011-2015 Intel Corporation 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 s... |
#include "prefix.h"
namespace AntLisp {
VarNamePrefix::VarNamePrefix(
boost::string_view prefix
)
: fullName_(std::move(prefix))
, first_(fullName_)
{
const auto pos = fullName_.find(VarNamePrefix::separator);
if (pos != std::string::npos) {
first_.remove_suffix(fullName_.size() - pos);
... |
print START 0
STA buffer
prtbuf LDA buffer
SUB max . find first power of 10, larger than buffer
COMP #0
JLT found
LDA max
MUL #10
STA max
J prtbuf
found LDA max . divide by 10 and print buffer/max
DIV #10
STA max
COMP #0
JEQ exit
LDA buffer
DIV max
ADD #48 . ASCII 0
WD #1
... |
section .text
global _char, _lchar, _putchar, prints
extern Char, lchar, putchar, _prints
_char:
mov rdi, [rsp+8]
mov rsi, [rsp+16]
jmp Char
_lchar:
mov rdi, [rsp+8]
mov rsi, [rsp+16]
mov rdx, [rsp+24]
jmp lchar
_putchar:
mov rdi, [rsp+8]
jmp putchar
prints:
push qword rdi
call _prints
add rsp, 8
|
; A014176: Decimal expansion of the silver mean, 1+sqrt(2).
; Submitted by Jon Maiga
; 2,4,1,4,2,1,3,5,6,2,3,7,3,0,9,5,0,4,8,8,0,1,6,8,8,7,2,4,2,0,9,6,9,8,0,7,8,5,6,9,6,7,1,8,7,5,3,7,6,9,4,8,0,7,3,1,7,6,6,7,9,7,3,7,9,9,0,7,3,2,4,7,8,4,6,2,1,0,7,0,3,8,8,5,0,3,8,7,5,3,4,3,2,7,6,4,1,5,7,2
mov $2,4
mov $3,$0
mul $3,3
mov ... |
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "kagiseries.h"
// Dispatch interfaces referenced... |
.model small
.386
include task.inc
.data
extrn _curtask : word
extrn _db_state : word
db_running equ 0
db_stopped equ 1
db_stepping equ 2
STACK_SIZE equ 512 ; in 16-bit words
public intstk
public kb... |
/**
* This file specifies the logging utilities for x86 desktop platforms. These logging functions
* just print the error to screen (via stderr).
*/
#include <iostream>
#include <cxxabi.h>
#include <ErrorHandler.hpp>
#include <Message.hpp>
#include <Logger.hpp>
// TODO: Find a way to reduce the number of copies of... |
;
; CTEXT.ASM
;
; (c) Copyright 2005, vbmacher
;
; Part of RTL lib
; console i/o
.model compact
.386
.data
public _attribute
_attribute db 7
x db ?
y db ?
.code
public _gotoxy
public _wherexy
public _cputs
public _cputch
public _textattr
;void gotoxy(int x, int y)
_gotoxy proc c
arg @@... |
;;
;; Copyright (c) 2012-2018, 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... |
/*
* Copyright (c) 2011-2018, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
#ifndef RAYT_KERNELS_RENDER_HPP
#define RAYT_KERNELS_RENDER_HPP
// ...
#include "../camera.hpp"
#include "../common.hpp"
#include "../hit_record.hpp"
#include "../sphere.hpp"
namespace kernels {
// ...
static const auto real_max = std::numeric_limits<real_t>::max();
// TODO: Description
template <int width, int hei... |
;=====================================================================================================================================
;Program Name: input_array.asm *
;Programming Language: x86 Assembly ... |
; A169094: Number of reduced words of length n in Coxeter group on 33 generators S_i with relations (S_i)^2 = (S_i S_j)^25 = I.
; 1,33,1056,33792,1081344,34603008,1107296256,35433480192,1133871366144,36283883716608,1161084278931456,37154696925806592,1188950301625810944,38046409652025950208,1217485108864830406656,389595... |
#include<iostream>
#include<cmath>
#include<memory.h>
#include<string.h>
using namespace std;
//using FFT method to calculate
//Cannot compile in VS2019
typedef long long ll;
typedef double db;
const int N=1e5+10,inf=0x3f3f3f3f;
const db pi=acos(-1);
const ll P[]= {1,10,100,1000,10000};
struct cpl {
db x,y;
cpl... |
_stressfs: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
0: f3 0f 1e fb endbr32
4: 8d 4c 24 04 lea 0x4(%esp),%ecx
8: 83 e4 f0 and $0xfffffff0,%esp
b: ff 71 fc ... |
;------------------------------------------------------------------------------ ;
; Copyright (c) 2016 - 2018, 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 distri... |
frame 0, 04
frame 1, 10
frame 2, 10
frame 1, 10
endanim
|
;随机数生成范例
;幻数设置
FREAD EQU 0x00000001
FWRITE EQU 0x00000002
FILE_OPEN_FAILURE EQU -1
AUE_EXIT EQU 1
AUE_WRITE EQU 4
AUE_OPEN_RWTC EQU 5 ;STD { int open(char *path, int flags, int mode); })
AUE_CLOSE EQU 6 ;STD { int close(int fd); })
STDOUT EQU 1
CPUID_STATUS_SUCCESS EQU 0
CPUID_STATUS_FAILURE EQU... |
[SECTION .data]
;;; Here we declare initialized data. For example: messages, prompts,
;;; and numbers that we know in advance
[SECTION .bss]
;;; Here we declare uninitialized data. We're reserving space (and
;;; potentially associating names with that space) that our code
;;; will use as it executes. Think of these as... |
; void *zx_aaddrcup_fastcall(void *aaddr)
SECTION code_clib
SECTION code_arch
PUBLIC _zx_aaddrcup_fastcall
EXTERN asm_zx_aaddrcup
defc _zx_aaddrcup_fastcall = asm_zx_aaddrcup
|
; A119282: Alternating sum of the first n Fibonacci numbers.
; 0,-1,0,-2,1,-4,4,-9,12,-22,33,-56,88,-145,232,-378,609,-988,1596,-2585,4180,-6766,10945,-17712,28656,-46369,75024,-121394,196417,-317812,514228,-832041,1346268,-2178310,3524577,-5702888,9227464,-14930353,24157816,-39088170,63245985,-102334156,165580140,-267... |
// Time: O(n)
// Space: O(n)
// two pointers
class Solution {
public:
vector<int> pivotArray(vector<int>& nums, int pivot) {
vector<int> result(size(nums), pivot);
int left = 0, right = size(nums) - count_if(cbegin(nums), cend(nums), [&pivot](const auto& x) { return x > pivot; });
for (con... |
;==================================================================================================
; Settings and tables which the front-end may write
;==================================================================================================
; This is used to determine if and how the cosmetics can be patched... |
HasNoItems:
ld a, [wNumItems]
and a
ret nz
ld a, [wNumKeyItems]
and a
ret nz
ld a, [wNumBalls]
and a
ret nz
ld hl, wTMsHMs
ld b, NUM_TMS + NUM_HMS
.loop
ld a, [hli]
and a
jr nz, .done
dec b
jr nz, .loop
scf
ret
.done
and a
ret
TossItemFromPC:
push de
call PartyMonItemName
farcall _CheckTossableI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.