text stringlengths 3.08k 12.5k |
|---|
/*
* instr_t.cpp
*
* Created on: Apr 23, 2022
* Author: mad
*/
#include <mmx/vm/instr_t.h>
#include <cstring>
#include <stdexcept>
#define OPCODE_INFO(op, num) g_opcode_info[op] = {#op, num}
namespace mmx {
namespace vm {
opcode_info_t g_opcode_info[256] = {};
const struct global_init_t {
global_init... |
/*Copyright {2015} {<NAME>}
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 writing,... |
/*=============================================================================
* This is a part of the yLib Software Development Kit.
* Copyright (C) 1998-2000 YEAsoft Inc.
* All rights reserved.
*=============================================================================
* This program is free software; you ca... |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
// <NAME> - 250201042 - CENG391 HW1
#include <cstdlib>
#include <iostream>
#include <vector>
#include <fstream>
#include "image.hpp"
using std::cerr;
using std::clog;
using std::endl;
using std::ofstream;
using std::string;
using std::vector;
using ceng391::Image;
using ceng391::uchar;
// Ideally these test should ... |
/*******************************************************************************
* src/IncFDFS.cpp
* Implementation of the FDFS algorithm.
*
* Part of Project: Incremental-DFS-Experimental:
* https://github.com/shahbazk/IncDFS-Experimental
*
* Copyright (C) 2017 <NAME> <<EMAIL>>
*
* All right... |
#include <iostream>
#include <vector>
#include <string.h>
#include <queue>
#include <bitset>
#include <sstream>
#include <unordered_map>
#include <bitset>
#include <algorithm>
using namespace std;
const int maxn = 3005;
const int oo = 0x3f3f3f3f;
struct edge {
int x, flow, cap;
edge(int _x, int _cap, int _flow) {
... |
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS... |
/*
* Copyright 2002-2021 oZ/acy (名賀月晃嗣)
* Redistribution and use in source and binary forms,
* with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions an... |
#pragma once
#include <stack>
#include <string>
#include <map>
#include <variant>
#include <vector>
#include <functional>
#include "ParsingException.hpp"
#include "StatementException.hpp"
#include "CalculationException.hpp"
/**
* @brief Main calculator class.
*/
class Calculator
{
public:
using NumberType = do... |
// SciTE - Scintilla based Text Editor
/** @file LexAVE.cxx
** Lexer for Avenue.
**/
// Copyright 1998-2001 by <NAME> <<EMAIL>>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg... |
/*
* Copyright (c) 2009-2021, <NAME>
* 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 an... |
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cassert>
#include <set>
#include <vector>
#include "yask_kernel_api.hpp"
/* Stencil compile time definition
u( {t, x, y} )
*/
using namespace std;
using namespace yask;
#define SIZE 10
#define STEPS 100
// Pretty prints as 2D Matrix
void print_arra... |
// Copyright 2017 Google Inc.
//
// 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... |
/* Copyright 2020 The Mapnn Team. 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
* ... |
/**
* Inothi.cpp
* Purpose: Main operation of the app
* @author <NAME>
* @version 1.0 15/11/1
**/
#include <boost/date_time.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <iostream>
#include <fstream>
#include <ctime>
#include <locale>
#in... |
#include "Common/Log.h"
#include "Base/GLWindow.h"
#include "Base/SceneView.h"
#include "Math/Math.h"
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <stdlib.h>
static void OnGLFWErrorCallback(int32 error, const char* description)
{
LOGE("Glfw Error %d: %s\n", error, description);
}
GLWindow::GLWindow... |
#include <bits/stdc++.h>
using namespace std;
const int N = 2111;
int a[N][N];
int dp[N][N][2];
void solve() {
int n, k;
cin >> n >> k;
memset(a, 0, sizeof a);
for (int i = 1; i <= n; i++) {
string s; cin >> s;
for (int j = 1; j <= n; j++) {
a[i][j] += a[i][j-1] + (s[j-1... |
#include "Bridge.hpp"
#include <iostream>
#include <unordered_map>
#include <vector>
#include <lcm/lcm-cpp.hpp>
#include <drc_utils/LcmWrapper.hpp>
#include <drc_utils/Clock.hpp>
#include <lcmtypes/drc/message_rate_t.hpp>
struct Bridge::Imp {
struct Binding {
drc::LcmWrapper::Ptr mDestLcmWrapper;
BindingSp... |
#include "Objects.h"
#include <stdexcept>
#include <iostream>
#include <vector>
#include "common/FileSystem.h"
#include "utils/ParseUtils.h"
#include "utils/StringUtils.h"
namespace
{
bool parseFile(std::string const & path, std::string const & filename, mod::Objects & objects)
{
std::vector<parser::inf::Entry> en... |
#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include "library.h"
using namespace std;
void printPage1();
void inBox();
void outBox();
int main(){
int z = 95, counter = 1;
char key;
SetConsoleTitle("About System");
background(z);
outBox();
... |
#include "cache.hpp"
Cache::Cache(Context* context) {
myContext = context;
s = 2; // 2 set bits, i.e. 4 sets in total
E = 4; // 4 lines every set
b = 9; // block bits, i.e. each line has 64 byte
t = 64 - s - b;
S = (int)pow(2,s);
cache = (cache_line**)malloc(S * sizeof(cache_line*));
... |
#pragma once
#include <EssaGUI/gui/NotifyUser.hpp>
#include <GL/glew.h>
#include "math/Transform.hpp"
#include "pyssa/WrappedObject.hpp"
#include <EssaGUI/gui/Widget.hpp>
#include <EssaGUI/util/Constants.hpp>
#include <EssaGUI/util/Matrix.hpp>
#include <EssaGUI/util/Vector3.hpp>
#include <SFML/Graphics.hpp>
#include ... |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
#include "Camera.h"
#include "Mesh.h"
#include "Application.h"
#include "Glew\include\glew.h"
#define ASPECT_RATIO 1.78f
Camera::Camera(GameObject * parent) : Component(parent, COMPONENT_TYPE::CAMERA)
{
frustum.type = FrustumType::PerspectiveFrustum;
frustum.pos = float3::zero;
frustum.front = float3::unitZ;
fr... |
#include<GL\glew.h>
#include<src\SOIL.h>
#include<GLFW\glfw3.h>
#include<thread>
#include<assert.h>
const GLchar* vertexSource =
"#version 150 core\n"
"in vec2 position;"
"in vec3 color;"
"in vec2 texcoord;"
"out vec3 Color;"
"out vec2 Texcoord;"
"void main()"
"{"
" Color = color;"
" Texcoord = texcoord;"
" g... |
#include <RenderWindow.h>
#include <Utils.h>
#include <RenderWindowCallbacksManager.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
RenderWindow::RenderWindow()
: BasicWindow("Simple OBJ Viewer")
, objectPosition(0, 0, 0)
, cameraPosition(0, 0, 8)
, lightPosition(1, 1, 8)
... |
/*
* Copyright (c) 2012 Research In Motion Limited.
*
* 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 l... |
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... |
/*
==============================================================================
This file is part of the dRowAudio JUCE module
Copyright 2004-13 by dRowAudio.
------------------------------------------------------------------------------
dRowAudio is provided under the terms of The MIT License (M... |
#include "bell_reducer.h"
static long long mask = 0x1;
static string bitstr(long long bits) {
int i = 0;
stringstream s;
while (i < 5) {
s << (bits & 1) << " ";
bits >>= 1;
i++;
}
return s.str();
}
static void BitsColoring(vector<int>& coloring, vector<long long>& bits,
... |
///
/// Copyright (C) 2014-2017, Cyberhaven
/// Copyright (C) 2014, Dependable Systems Laboratory, EPFL
///
/// 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, includin... |
/*
DS1804.cpp - a library for controlling a DS1804 Nonvolatile Trimmer Potentiometer
http://datasheets.maximintegrated.com/en/ds/DS1804.pdf
The MIT License (MIT)
Copyright (c) 2016 tom-dudman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documenta... |
/*
* Copyright (c) 2019 dividiti Ltd.
* Copyright (c) 2019 Arm Ltd.
*
* SPDX-License-Identifier: MIT.
*/
#include "includes/detect.hpp"
using namespace std;
using namespace CK;
Settings settings;
BenchmarkSession session(&settings);
int main(int argc, char *argv[]) {
try {
init_benchmark();
... |
#include "LiteMath.h"
#include <iomanip>
#include <iostream>
#include <cstdint>
#include <algorithm>
#include <cmath>
#include "clad/Differentiator/Differentiator.h"
using LiteMath::M_PI;
using LiteMath::float3;
static inline float minD(float x, float y) { return x < y ? x : y; }
static inline float maxD(float x, f... |
#include "vm.hpp"
#include "vm/error.hpp"
#include "base/log.hpp"
#include <evmc/loader.h>
#include <boost/process.hpp>
#include <filesystem>
#include <set>
namespace bp = ::boost::process;
namespace
{
std::tuple<std::string, std::string> parseInfoLine(const std::string& path)
{
constexpr std::size_t DELIM_... |
// Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
#include "Jit/dict_watch.h"
#include "Jit/codegen/gen_asm.h"
#include "Jit/inline_cache.h"
#include "Jit/pyjit.h"
#include <set>
#include <unordered_map>
namespace jit {
namespace {
// For every watched dict, this map contains a map from... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
#include <list>
#include <string>
#include <iostream>
#include <fstream>
#include "rewriter.hpp"
#include "json/json.h"
using namespace std;
void parseConditions(const Json::Value& conditions, std::list<Condition>& r_conditions) {
for (const auto& condition : conditions){
Condition r_condition;
r_... |
/* comp.c - by <NAME>, SGI */
/* Porter/Duff compositing operations using OpenGL alpha blending. */
/* NOTE: This program uses OpenGL blending functions that need the frame
buffer to retain a destination alpha component. Examples of such
hardware: O2, IMPACT, RealityEngine, and InfiniteReality. */
#incl... |
// Copyright 2017 The Abseil Authors.
//
// 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 agre... |
void called(int a);
int gen();
struct Foo {
static int static_var;
int field_var;
};
int Foo::static_var = 0;
void foo() {
int a = 5;
called(a + gen() + Foo().field_var + Foo::static_var);
}
/*
OUTPUT:
{
"includes": [],
"skipped_ranges": [],
"usr2func": [{
"usr": 4259594751088586730,
... |
#include <iostream>
#include <iomanip>
#include <string>
#include <cassert>
#include <fstream>
#include <vector>
#include <map>
#if WITH_MPI
#include <mpi.h>
#endif
using std::cout;
using std::endl;
using std::string;
MPI_Comm COMM_LOCAL = MPI_COMM_WORLD;
int main(int argc, char** argv)
{
cout << "Hello world." <... |
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve L... |
#pragma once
#include "routing/cross_mwm_ids.hpp"
#include "routing/cross_mwm_index_graph.hpp"
#include "routing/router.hpp"
#include "routing/segment.hpp"
#include "routing/vehicle_mask.hpp"
#include "routing_common/num_mwm_id.hpp"
#include "routing_common/vehicle_model.hpp"
#include "geometry/tree4d.hpp"
#include... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
#include "rodsPath.h"
#include "rodsErrorTable.h"
#include "rodsLog.h"
#include "regUtil.h"
#include "miscUtil.h"
#include "checksum.hpp"
#include "rcGlobalExter... |
// -*- C++ -*-
//===-- reduce_by_segment_sycl.pass.cpp --------------------------------------------===//
//
// Copyright (C) 2019-2020 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// This file incorporates work covered by the following copyright and permission
// notice:
//
// Part... |
// $Id: receiver.cpp 82226 2008-06-30 15:07:33Z sma $
#include "receiver.h"
#include "ace/Get_Opt.h"
static FILE *output_file = 0;
// File handle of the file into which received data is written.
static const ACE_TCHAR *output_file_name = ACE_TEXT ("output");
// File name of the file into which received data is writt... |
#include<bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using ii = pair<int,int>;
using vii = vector<ii>;
using vvi = vector<vi>;
using ll = long long;
using llu = unsigned long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vvd = vector<vd>;
using vll = vector<ll>... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetVerticalSync(true);
nPts = 0;
rotateAmount = {0, 0, 1};
speedOfRotation = ofDegToRad(0.5f);
ofBackground(255,255,255);
glm::vec3 center(ofGetWidth()/2, ofGetHeight()/2, 0);
xAxisMin = {-100, 0, ... |
/*
* Copyright (c) 2012-2020 MIRACL UK Ltd.
*
* This file is part of MIRACL Core
* (see https://github.com/miracl/core).
*
* 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... |
#include <exceptions.h>
#include <stdio.h>
#include <cpu.h>
#include <ints/ints.h>
const char* exception_messages[34] = {
"Division By Zero",
"Debug",
"Non Maskable Interrupt",
"Breakpoint",
"Into Detected Overflow",
"Out of Bounds",
"Invalid Opcode",
"No Coprocessor",
"Double Faul... |
/*
Copyright (c) 2011-2014 University of Zurich
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, m... |
/*************************************************************************/
/* udp_server.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include <string>
#include "error_handling.h"
#include "game.h"
#include "scrolls.h"
#include "command.h"
#include "io.h"
#include "traps.h"
#include "daemons.h"
#include "fight.h"
#include "move.h"
#include "misc.h"
#include "level.h"
#include "player.h"
#include "wand.h"
#include "rogue.h"
#include "os.h"
#include "... |
//
// LaneDetector.cpp
// LaneDetector
//
// Created by <NAME> on 14.01.22.
//
#include "LaneDetector.hpp"
using namespace cv;
using namespace std;
double getAverage(vector<double> vector, int nElements) {
double sum = 0;
int initialIndex = 0;
int last30Lines = int(vector.size()) - nElements;
... |
#include <stdio.h>
#include "decode.h"
#include "jtag_dtm.h"
#include "debug_module.h"
#include "debug_defines.h"
#if 0
# define D(x) x
#else
# define D(x)
#endif
enum {
IR_IDCODE=1,
IR_DTMCONTROL=0x10,
IR_DBUS=0x11,
IR_BYPASS=0x1f
};
#define DTMCONTROL_VERSION 0xf
#define DTMCONTROL_ABITS (0x... |
/*
* Copyright (c) 2014, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of condit... |
#include "rclcpp/rclcpp.hpp"
#include <iostream>
#include <cstdio>
#include <sensor_msgs/msg/image.hpp>
#include <stereo_msgs/msg/disparity_image.hpp>
#include <camera_info_manager/camera_info_manager.hpp>
#include <functional>
// Inludes common necessary includes for development using depthai library
#include "dept... |
/*
* File: Pixel.cpp
* File Created: August 7th 2020
* ––––––––––––––––––––––––
* Author: <NAME>, 'Pokoi', Villar (<EMAIL>)
* ––––––––––––––––––––––––
* MIT License
*
* Copyright (c) 2020 Pokoidev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associa... |
// Puzzle.cpp : Defines the entry point for the console application.
//
#include <list>
#include <vector>
class State {
private:
int _i; // zero position
int _f; // f value
int num[9];
public:
int _parent;
State() {
for (int i = 0; i < 8; i++) num[i] = i;
_i = 0;
_f ... |
// 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 writing, software
// distributed under the ... |
//<NAME>: <EMAIL>
#include <chrono>
#include <iostream>
#include <CL/sycl.hpp>
#define random_float() (rand() / double(RAND_MAX))
using namespace std;
using namespace sycl;
#define tileY 2
#define tileX 2
// return execution time
double gpu_kernel(float *A, float *B, float *C,
int M, int N, in... |
//===- Utils.cpp - Utilities to support the Linalg dialect ----------------===//
//
// Copyright 2019 The MLIR Authors.
//
// 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.... |
/*
* Copyright (c) 2012-2013 Stanford University
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTH... |
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkRTree.h"
SkRTree::SkRTree(SkScalar aspectRatio) : fCount(0), fAspectRatio(aspectRatio) {}
SkRect SkRTree::getRootBound() const {
if (fCount) {
return... |
/*
Copyright (c) 2011,2015 <NAME>
Copyright (c) 2019 <NAME>
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, m... |
// $Id$
#include "ace/config-lite.h"
#include "ace/OS_NS_string.h"
#include "ace/Get_Opt.h"
#if (ACE_NTRACE != 1)
#include "ace/Trace.h"
#endif /* (ACE_NTRACE != 1) */
#include "JAWS/Server.h"
#include "JAWS/Data_Block.h"
#include "JAWS/Concurrency.h"
#include "JAWS/Jaws_IO.h"
#include "JAWS/IO_Handler.h"
#include "... |
/*
* Copyright (C) 2007 <NAME> <EMAIL>
* (C) 2009 <NAME>
* (C) 2009 INdT, Instituto Nokia de Technologia
* (C) 2009-2010 ProFUSION embedded systems
* (C) 2009-2010 Samsung Electronics
*
* This library is free software; you can redistribute it and/or
* modify it und... |
#include "QUrl"
#include "SmartHomeServer.h"
#include "QThread"
#include "QDateTime"
#include "QNetworkRequest"
#include "QNetworkReply"
#include "QTimer"
#include "QEventLoop"
#include "QJsonDocument"
#include "QJsonArray"
#include "QJsonValue"
#include "QJsonObject"
#include "QVariantMap"
#define API_URL "http://12... |
#include <iostream>
//#include <fstream> <--- questa non serve
#include <stdint.h>
/**********************************************************************
eXtended Tiny Encryption Algorithm (XTEA)
algorithm: en.wikipedia.org/wiki/XTEA
course: Progettazione di Sistemi Embedded (2... |
/*
* Copyright (c) 2008, <NAME>, Inc.
* 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 ... |
//
// author <NAME>
//
#include <glm/glm.hpp>
#include <ohm/Aabb.h>
#include <ohm/MapLayer.h>
#include <ohm/MapSerialise.h>
#include <ohm/OccupancyMap.h>
#include <ohmutil/OhmUtil.h>
#include <chrono>
#include <csignal>
#include <cstddef>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#... |
#include <stdio.h>
#include <memory.h>
#include <yangstream/YangVideoStreamCapture.h>
#include <yangutil/sys/YangEndian.h>
YangVideoStreamCapture::YangVideoStreamCapture() {
m_videoBufs = NULL;
m_videoBuffer = NULL;
videoTimestamp = 0, baseTimestamp = 0;
curVideotimestamp = 0;
preTimestamp = 0;
m_src=NULL;
... |
/*
* Copyright (c) 2019-2020, <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list ... |
#include "cb_command.h"
#include <bitset>
#include <cassert>
#include <sstream>
#include "bit_command.h"
#include "cpu.h"
#include "mmu.h"
#include "utils.h"
uint8_t bitForRowColumn(uint8_t startingRow, uint8_t row, uint8_t column) {
uint8_t times = ((row - startingRow) * 16 + column) / 8;
assert(times < 8);
u... |
#include "file_io.hpp"
// unsigned int nonnoise_cnt = 0;
// distance computation
float computation_distance(pt& p, pt& q) {
float dist = 0;
for (unsigned int i = 0; i < dimensionality; ++i) dist += (p[i] - q[i]) * (p[i] - q[i]);
return sqrt(dist);
}
// kd-tree init
void kdtree_build() {
sta... |
// Generated from /POI/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java
#pragma once
#include <fwd-POI.hpp>
#include <java/lang/fwd-POI.hpp>
#include <org/apache/poi/hssf/record/fwd-POI.hpp>
#include <org/apache/poi/util/fwd-POI.hpp>
#include <org/apache/poi/hssf/record/SubRecord.hpp>
#include <java/lan... |
/*******************************************************************************
* Copyright (c) 2012, 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accom... |
//http://docs.ros.org/kinetic/api/librealsense2/html/rs-pcl-color_8cpp_source.html
// include the librealsense C++ header file
#include <librealsense2/rs.hpp>
#include <pcl/io/pcd_io.h>
#include <pcl/io/ply_io.h>
#include <pcl/point_cloud.h>
#include <pcl/console/parse.h>
#include <pcl/common/transforms.h>
#include <pc... |
// triangle.cpp
#include "headers.h"
#include "triangle.h"
#include "main.h"
#include "texture.h"
// Compute plane/ray intersection, and then the local coordinates to
// see whether the intersection point is inside.
bool Triangle::rayInt( vec3 rayStart, vec3 rayDir, int objPartIndex, float maxParam,
vec3 ... |
#pragma ident "$Id$"
//============================================================================
//
// This file is part of GPSTk, the GPS Toolkit.
//
// The GPSTk is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free S... |
/**************************************************************************
***
*** Copyright (c) 1995-2000 Regents of the University of California,
*** <NAME>, <NAME> and <NAME>
*** Copyright (c) 2000-2010 Regents of the University of Michigan,
*** <NAME>, <NAME>, <NAME> and
*** ... |
#include <stdio.h>
#include <stdlib.h>
#include <nt.h>
#include <ntrtl.h>
#include <nturtl.h>
#include <ntioapi.h>
#include <windows.h>
#include <fcntl.h>
#include <string.h>
#include <assert.h>
#include "..\..\filter\sis.h"
void usage(void)
{
fprintf(stderr,"usage: refcount CommonStoreFileName... |
// Copyright 2016 The Arken Platform 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 <lua/lua.hpp>
#include <arken/base>
#include <arken/cache>
#include <arken/mvm>
#include <memory>
char * json_lock_encode(lua_State *L)... |
/*__________________________________________________________________________________________
(c) Hash(BEGIN(Satoshi[2010]), END(Sunny[2012])) == Videlicet[2014] ++
(c) Copyright The Nexus Developers 2014 - 2019
Distributed under the MIT software license, see the accompanying
... |
/*
* This file is open source software, licensed to you under the terms
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. You may not use this file except in compliance with the License.
*
* You may ... |
/*
* Copyright 2012 <NAME>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the standard MIT license. See COPYING for more details.
*/
//#include <arpa/inet.h>
#ifdef __GNUC__
#include <arpa/inet.h>
#endif
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h... |
/*
PhotonPWM.cpp - Library for enabling 16-Bit PWM output on the Particle Photon
Created by <NAME>, <NAME>, 2016.
Released into the public domain.
*/
#include "application.h"
#include "PhotonPWM.h"
#include "math.h"
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; //Time base structure for timer 3
TIM_OCInitTypeD... |
#include "platform/platform.hpp"
#include "platform/socket.hpp"
#include "coding/file_reader.hpp"
#include "base/exception.hpp"
#include "base/file_name_utils.hpp"
#include "base/logging.hpp"
#include "base/macros.hpp"
#include "base/scope_guard.hpp"
#include <algorithm>
#include <functional>
#include <initializer_... |
//----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2019, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following c... |
/*************************************************************************/
/* cp_player_data_filter.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include "ModuleCollision.h"
static bool collisionTestOverSeparatingAxis(
vec2 a1, vec2 a2, vec2 a3, vec2 a4, // Points in box a
vec2 b1, vec2 b2, vec2 b3, vec2 b4, // Points in box b
vec2 axis) // Separating axis test
{
float pa1 = dot(a1, axis);
float pa2 = dot(a2, axis);
float pa3 = ... |
#include "template_parser.hpp"
#include <map>
using namespace std;
int TemplateParser::lastParserNum = 0;
const std::string localTemplate(const int parserNum) {
return "local" + std::to_string(parserNum) + ".html";
}
TemplateParser::TemplateParser(string _filePath) {
filePath = _filePath;
variableCount = 0;
p... |
#include <cstdio>
#include <cmath>
#include <cstring>
#include <map>
#include <vector>
#include <omp.h>
#include <fstream>
using namespace std;
struct Node
{
int index;
double p_t0;
double p_t1;
vector<int> links;
int outLinkNo;
};
// Number of nodes
int N;
// Convergence threshold and algorithm's parameter beta... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "Combo.cuh"
#include "Classifier.h"
#include <Windows.h>
#include <direct.h>
#define MAX_LEN 1024
int ComputeCombo(int argc, char** argv)
{
string modelDir... |
/*
Copyright (C) 2021 hidenorly
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 w... |
/*
* Copyright 2009-2017 Alibaba Cloud 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... |
// Copyright (c) 2015-2022, Lawrence Livermore National Security, LLC.
// See top-level LICENSE file for details.
#include "caliper/caliper-config.h"
#include "caliper/ChannelController.h"
#include "caliper/ConfigManager.h"
#include "caliper/common/Log.h"
#include "caliper/common/StringConverter.h"
#include "../../... |
#include<iostream>
#include<vector>
using namespace std;
class Node{
private:
int cost;
int value;
vector<int> items;
int level;
int upperbound;
Node* lchild;
Node* rchild;
public:
Node(int value,int cost,int level,Node* parent){
this->cost=cost;
this->value=value;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.