blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
c31d9344c87c998349882fba454f1c8d01d5c561
0e85dfa8aac484c82cdb30910315a1fade541371
aclapolli/p4c
/midend/flattenInterfaceStructs.cpp
C++
cpp
6,860
permissive
/* Copyright 2018 VMware, 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 writing, software di...
04d327182509f2b0324c5bd79ca7e5b52e911d8f
54bc4aa66b7a1f1159f59c77eb73d435eccb0dcb
zhangboyang/PAL3patch
/src/PatchConfig/BadFiles.cpp
C++
cpp
1,130
no_license
#include "stdafx.h" #ifdef BUILD_FOR_PAL3A void CheckBadFilesForPAL3A() { const char *main_exe = "PAL3A.exe"; static const char *bad_files[] = { #ifndef _DEBUG "BugslayerUtil.dll", "CollidePackage.dll", "dbghelp.dll", "MSVCP60.DLL", "MSVCRTD.DLL", "PAL3A.pdb", #endif NULL // EOF }; ...
6946df1253479369308407dce87744e682713c36
56a5945684a3f08f2885d4f06d12cae9d022edc3
jjbayer/gecko
/lib/compiler/scope.cpp
C++
cpp
597
no_license
#include "scope.hpp" #include "functionkey.hpp" #include "functions/function.hpp" namespace ct { void Scope::setFunction(std::unique_ptr<Function> function) { const auto key = FunctionGroupKey { function->name(), function->numTypeParameters(), function->numArguments() }; ...
3f8ae8f3f97966a97037886de10888b263e2c5ba
ba956a879b73c1b5b662f722db466d3c33fe0351
ssh352/ml2cpp
/bench/ml2cpp-demo/SVC_sigmoid/iris/ml2cpp-demo_SVC_sigmoid_iris.cpp
C++
cpp
15,591
permissive
// ******************************************************** // This C++ code was automatically generated by ml2cpp (development version). // Copyright 2020 // https://github.com/antoinecarme/ml2cpp // Model : SVC_sigmoid // Dataset : iris // This CPP code can be compiled using any C++-17 compiler. // g++ -Wall -Wno...
f64ebbf1900ff29d99aa248b5321208ac8a165c5
215a76d386c66ed02b9d085a28ae39f5bf24540b
l1nxy/OJ-solution
/code-forces/cf-629/a.cxx
C++
cxx
1,181
no_license
/* * a.cxx * * Copyright 2020 linxy <l1nxy.zy@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ...
38aba087c3e2931f3445639469ce4e4fa1fb8f96
5dd55886971c52b3900c45a2166c33cf7af2fb2f
cfacoin/CFA-Coin
/src/qt/cfacoingui.cpp
C++
cpp
36,380
permissive
// Copyright (c) 2018 The CFAcoin Developers // Copyright (c) 2014 The Okcash Developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include <QApplication> #include <QtGui> #include "cfacoingui.h" #include "transacti...
ff2c693f40f45f2b6bac9340278b7d4c14b7b64d
4ce40eb2c3ecffdf90df3523c33a8e8189bb4c1c
Kawser-nerd/CLCDSA
/Source Codes/CodeJamData/16/32/4.cpp
C++
cpp
1,017
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long; void Solve() { int n; ll m; scanf("%d%Ld", &n, &m); if (m > (1ll << (n - 2))) { printf("IMPOSSIBLE\n"); return; } printf("POSSIBLE\n"); if (m == (1ll << (n - 2))) { printf("0"); for (int i = 1; ...
93f1721325eecd3e7c5ad4c42f5a1bcc619b525e
2ae33c7b28118c3b09af6cb1d387e6c1b226032b
fafrd/bsha3
/src/qt/test/test_main.cpp
C++
cpp
2,870
permissive
// Copyright (c) 2009-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <chainparams.h> #include <qt/test/rpcnestedtes...
c14c8bfb7d7b04712a5ba6d0e1a87a551522bd4f
121bc6a33b7cddb5794606e606b35bbc76ca51e7
sdl-research/sdl-externals
/Shared/cpp/range-v3/include/range/v3/detail/config.hpp
C++
hpp
2,872
no_license
/// \file // Range v3 library // // Copyright Eric Niebler 2013-2014 // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://github.com/ericniebler/ra...
9cf6a4b4dc82551373d3ad90020c9c1f846e1b30
ddb35825460b99500f81b0d32289836ef9077cfb
bigbangcore/BigBang
/src/crypto/crypto.cpp
C++
cpp
16,075
permissive
// Copyright (c) 2019-2020 The Bigbang developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "crypto.h" #include <iostream> #include <sodium.h> #include <sys/mman.h> #include "curve25519/curve25519.h" #includ...
27cfd1b20fe28cb9b7c7658f7856dac1fa38173b
0980ecb142fb96644b777678c5459287234cbbc1
aleksrutins/app
/RunCmd.cpp
C++
cpp
1,277
no_license
#include <iostream> #include <iomanip> #include <cstdlib> #include <libconfig.h++> #include "util.h" using namespace std; using namespace libconfig; namespace RunCmd { int run(int argc, char **argv, string name, const Setting &cfgRoot, string env) { for (int i = 0; i < cfgRoot["scripts"].getLength(); i++) ...
4696aa77e19556d945fe8fa49d3a33545a8949af
e4f405d4052753505ea2560d7d6b762f862729fa
4AI-Vault/Infoarena-Solutions
/VArena/semipalindrom.cpp
C++
cpp
496
no_license
#include <iostream> #include <fstream> #include <string> using namespace std; ifstream in("semipalindrom.in"); ofstream out("semipalindrom.out"); string solve(string nr) { if(nr.size()%2 == 0) { for(size_t i = 0,n = nr.size(); i < n/2; ++i) if(nr[i]!=nr[i+n/2])return nr.substr(0,1); } else { for(size_t i = ...
23d680bf339727f5a45a603b59c9df9eea9ae76e
af0d21ffd8e2616caf56150a78bb74124e15df0b
cwolsen7905/UbixOS
/lib/objgfx/ogPixCon.cpp
C++
cpp
5,635
no_license
#include "objgfx.h" #include "ogPixCon.h" // ogPixCon constructor ogPixCon::ogPixCon(ogPixelFmt srcPixFmt, ogPixelFmt dstPixFmt) { uInt8 channelIdx[4]; uInt8 srcFieldSize[4]; uInt8 srcFieldPos[4]; uInt8 dstShifters[4]; uInt8 tmpb; int32 i, j; channelIdx[0] = 0; channelIdx[1] = 1; channelIdx[2] = 2;...
0463d40760652f6b33999d094cd6b2c58ca9a4bf
21d1bdc9700392c504470a0746f5b28bce79c96b
hellowod/templete-builder
/bin/output/cpp/HaloCfg.cpp
C++
cpp
1,542
no_license
/*** * HaloTbl.cpp * HaloCfg.cpp * * @Author: abaojin */ namespace Config { public struct HaloTbl { // #主键 public int Id; // 带有光环的怪物名称尾部需要使用括号包含该文字内容 public string NameSuffix; // 程序不需要使用的描述字段 public string Des; // 光环效果类别1冰2火3毒4吸5移动加速 public int Type; // 光环效果的数值, 表示万分之 public int Value; ...
885c322ea6f36b487a617de85901985b37ac3901
bf89bb1169b128440f8566aaa1b771971efb36c5
Pseudopode/uniskpnet
/SDK_WIN_x64_2020-1-229/samples/TextureMapping/main.cpp
C++
cpp
3,667
no_license
#include <SketchUpAPI/common.h> #include <SketchUpAPI/geometry.h> #include <SketchUpAPI/initialize.h> #include <SketchUpAPI/model/entities.h> #include <SketchUpAPI/model/geometry_input.h> #include <SketchUpAPI/model/material.h> #include <SketchUpAPI/model/model.h> #include <SketchUpAPI/model/texture.h> #include "../co...
e6a9743010c44a338f1cbd92b7ee5da23f559d62
f804f83d999d08b4393945544f4a370a682b894b
cms-sw/cmssw
/RecoParticleFlow/Benchmark/src/PFJetBenchmark.cc
C++
cc
33,480
permissive
#include "RecoParticleFlow/Benchmark/interface/PFJetBenchmark.h" #include "RecoParticleFlow/PFTracking/interface/PFTrackAlgoTools.h" #include "DataFormats/TrackReco/interface/Track.h" // preprocessor macro for booking 1d histos with DQMStore -or- bare Root #define BOOK1D(name, title, nbinsx, lowx, highx) \ h##name ...
225230702d9e1112bb6ea2fdcd5e2f0f7b0942d7
bef4f71d1abc9832140d414e0e1bc75e5b8ee503
csJd/oj-codes
/uva/maxsum.cpp
C++
cpp
633
no_license
#include <bits/stdc++.h> using namespace std; const int N = 10000; int a[N], s[N], n; int maxs(int l, int r) { if(l == r) return a[r]; int m, ret, ls, rs; m = (l + r) >> 1; ret = max(maxs(l, m), maxs(m + 1, r)); ls = a[m], rs = a[m + 1]; for(int i = m; i >= l; --i) ls = max(ls, s[m] - s[i - 1])...
965255fe580d2fda53dd8fe1124997798b718bed
95e0fa3d43a1d2e86a38de481baea2b276d52424
LeeMyeungJun/INHAstudy
/HomeStudy/galspans/stdafx.cpp
C++
cpp
319
no_license
// stdafx.cpp : source file that includes just the standard includes // galspans.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file GameManager * g_GameManager;
51016dc154093c46dd2f65b1619484fa685fafc7
02893eaeecc3d3aedbd21698656fab242f64cf77
Svalorzen/DESOLATOR
/BWAPI_4.0.0/DesolatorClient/include/AIToolbox/MDP/Types.hpp
C++
hpp
289
no_license
#ifndef AI_TOOLBOX_MDP_TYPES_HEADER_FILE #define AI_TOOLBOX_MDP_TYPES_HEADER_FILE #include <vector> #include <AIToolbox/Types.hpp> namespace AIToolbox { namespace MDP { using ValueFunction = std::vector<double>; using QFunction = Table2D; } } #endif
f9f44caa4336f1ad2cad6a3b97f7eec290b02539
721dc53eacd497fdd5e13a4f6ede84a897ed0ffc
aaaaxiaofei/lc_lock
/lc635.cpp
C++
cpp
2,462
no_license
635. Design Log Storage System You are given several logs that each log contains a unique id and timestamp. Timestamp is a string that has the following format: Year:Month:Day:Hour:Minute:Second, for example, 2017:01:01:23:59:59. All domains are zero-padded decimal numbers. Design a log storage system to implement th...
6b6861003704ee47eb008cd0a331ac7baa4f95ee
2fe56573a47aac22f69ea6f7a66042eb02fa5889
chanfool21/Competitive-Coding
/summer_love/string/rabin_karp.cpp
C++
cpp
1,203
no_license
#include<bits/stdc++.h> using namespace std; int hash_fnc(char a[], int ll,int hh, int p) { int h = 0; for(int i = ll; i < hh; i++) { h = h + (int)a[i]*pow(p,i); } return h; } int main() { char text[100]; char pattern[100]; /* fgets(text,sizeof(text),stdin); fgets(pattern...
ae2b466de701c55b721a17add38988919639320c
616502ab8f7b76064bf340f81638ecb2b0790bd8
DnaBoss/leetcode
/tree/110. Balanced Binary Tree.cpp
C++
cpp
1,313
no_license
/* Given a binary tree, determine if it is height-balanced Example 1: Input: root = [3,9,20,null,null,15,7] Output: true Example 2: Input: root = [1,2,2,3,3,null,null,4,4] Output: false Example 3: Input: root = [] Output: true 題意:給一顆二元樹,判斷他是不是平衡二元樹 思路:dfs走訪節點 每一個節點都去判斷自已的左子樹和右子樹的高度差是否大於1 回傳自已的最大子樹深度 +1,給自已的父節點去做判斷...
cf49734158a57dfe87280bf537c24cc164279bb1
a39f48b5ca97e930e4a6279ff344774d4fe4f922
benjamin-weiss/libadm
/tests/xml_parser_unresolved_references_tests.cpp
C++
cpp
795
permissive
#include <catch2/catch.hpp> #include <sstream> #include "adm/parse.hpp" #include "adm/errors.hpp" std::string formatFilepath(const std::string& filename) { std::stringstream ss; ss << "xml_parser/unresolved_references/" << filename << ".xml"; return ss.str(); } TEST_CASE("xml_parser/unresolved_references") { ...
9a48a00c7198d6bce6edb9af7a35b0d02b4db337
486a4bcda6f1707ab530fa996590596150fe09de
dhrush/sdeInterviewQues
/Arrays/mergeIntervals.cpp
C++
cpp
549
no_license
class Solution { public: vector<vector<int>> merge(vector<vector<int>>& intervals) { if(intervals.size()<=1) return intervals; vector<vector<int>> op; sort(intervals.begin(), intervals.end()); op.push_back(intervals[0]); for(int i=1; i<intervals.size();...
540de40d204ef02b4296c8fada123b2d442fa47b
e8de5f5f9dc3c3a7c7a84419b05e2698c8e77849
kellyvasquez/examen_cotecnova
/examen.cpp
C++
cpp
2,223
no_license
#include <stdio.h> #include <stdlib.h> void menu(char *, int *); void realizar_examen(char *, int *); int validacion(int *); void calificar_examen(); void repetir_examen(); void anular_examen(); void salir(); int main(){ char nombre[30]; int estado = 0; //0 => verdadero y 1 => falso char *pnombre = nombre; int *p...
654dc82f072a9b81d223557c1f9514d66eff982b
6f0cf3ebb10b2f884585550159ab7cf4ad0867cd
materia-project2/materia
/src/test/addrman_tests.cpp
C++
cpp
17,463
permissive
// Copyright (c) 2012-2015 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 "addrman.h" #include "test/test_materia.h" #include <string> #include <boost/test/unit_test.hpp> #include "hash.h" #...
b6433210d6eed642898afc13bee7b475beb46dc9
16ff3acc52661f9cebc1d20f72c9f6c5c89adb27
ruslashev/supvime
/source/editor.cpp
C++
cpp
1,123
permissive
#include "editor.hpp" void Editor::Load(File *nfp) { fp = nfp; mode = NORMAL; quit = false; curs.x = curs.y = oldColumn = 0; lines.reserve(fp->lines.size()); for (std::string &str : fp->lines) lines.push_back(Line { /* dirty: */ true, /* str: */ str }); } void Editor::ProcessKey(int key) { switch (mode) { ...
9f926e208232185a8d91774398a45b62c6663b69
da24407fd192b47a6a99cca8cab1ec5ed80c2ec8
r-lyeh-forks/AGE
/GameEngine/GameEngine/Engine/AssetManagement/Instance/MaterialInstance.hh
C++
hh
606
permissive
#pragma once #include <string> #include <vector> #include <memory> //#include <map> #include <Render/Key.hh> #include <Threads/RenderThread.hpp> #include <Render/Properties/Properties.hh> namespace AGE { class AssetsManager; struct MaterialInstance { std::vector<std::shared_ptr<Property>> _properties; }; str...
1df725f7c0ec5b2461c6d6b9fb9102ef7ffa0c7a
803d060c1b3da25f379de7b0de7cf33c62340ef9
Vuean/ThinkingInCPlusPlus
/2. Making & Using Objects/Exercise/ex3.cpp
C++
cpp
271
no_license
#include <iostream> #include <fstream> using namespace std; int main(int argc, char* argv[]) { fstream in(argv[1]); string word; int count = 0; while(in >> word) count++; cout << "Words in the file: " << count << endl; return 0; }
76b90f64eacc5206729bdabd6f822b29c3fdb913
0e4d3903b340e90ce4cfa3943e6e38a82be9e9f7
devang191/algorithms_competitions
/codeforces/problem_set/467B.cpp
C++
cpp
1,083
no_license
#include <vector> #include <bitset> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cm...
391c3cc23043e5b30b06fa5e7a5fab2d4fd037a3
71a24a3c11593ff08928c6887d49580bdf33d334
wangfeng012316/RISCV-VP-1
/platform/src/sysc/prci.cpp
C++
cpp
5,200
permissive
/******************************************************************************* * Copyright (C) 2017, 2018 MINRES Technologies GmbH * 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. R...
18e1a42478a1a39140e9aed9e9b8187a2734f11c
9344fd5f37b05273f480ff0d5a24a35347c5cdfb
GypsyBaron/Coursera
/Course 4/week 1/Task_2 (2).cpp
C++
cpp
1,586
no_license
#include <iostream> #include <vector> using namespace std; bool visited[10001]; vector<pair<int, char>> graph[500002]; void DFS(int v) { visited[v] = true; for (int i = 0; i < graph[v].size(); i++) { cout << v << "->" << graph[v][i].first << ":" << graph[v][i].second << endl; DFS(graph[v][i].first); } } voi...
c491d8b06343d549c9be8b940128a73f14a30987
21c59ea53e76c79ee51b66a6211c77cdc7048cde
Cccmm002/my_leetcode
/203-remove-linked-list-elements/remove-linked-list-elements.cpp
C++
cpp
861
no_license
// Remove all elements from a linked list of integers that have value val. // // Example: // // // Input: 1->2->6->3->4->5->6, val = 6 // Output: 1->2->3->4->5 // // /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NU...
631099551c23c2b69c824c2113a835e851d5292e
ee8f35463725eda1f42a445ff3ced1311b776f2c
purnimamehta/Articles-n-Algorithms
/Competitive Programming/binary tree sorting and searching.cpp
C++
cpp
1,137
no_license
// Binary tree sorting and searching... #include<stdio.h> static int a=0; int n,k,value; struct tree { int n,pos; tree *l; tree *r; } *head=NULL,*temp,*t,*x; void check(int v,int x) { if(head==NULL) {a++; head=new tree; head->n=v; head->pos=x; ...
73f99b3e6aca0ff6807af75c2613d5f84bbe7360
fdf9add47a55da17662264f6e6e74eb3930633c4
Pentagon03/competitive-programming
/petrozavodsk-training-camp/2020-winter/300iq-contest-3/E.cc
C++
cc
959
no_license
#include <cstdio> #include <vector> const int N = 1 << 21; int cnt[N]; int main() { int n; scanf("%d", &n); for (int i = 0, x; i < n; ++i) { scanf("%d", &x); cnt[x] ^= 1; } for (int i = n; i >= 0; --i) cnt[i] ^= cnt[i + 1]; std::vector<int> ret(n + 1); for (int b = 0; b < 20; ++b) { int m =...
6e9f347f83bdae70d502c52572a0704e4c00d5ac
89e9ca521edcf3360740c8924f7ff5c64894c47f
sravankaruturi/Vermin
/Engine/EngineDeps/Deps/third_party/Imgui/imgui_impl_opengl3.cpp
C++
cpp
16,403
no_license
// ImGui Renderer for: OpenGL3 (modern OpenGL with shaders / programmatic pipeline) // This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..) // (Note: We are using GL3W as a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easi...
b2428c1ff7372c5fa5958b270c0f94bef9aa1732
bcc46fcf7396cfdcd0de6e837d0c8bd2413f8066
apache/trafficserver
/iocore/net/quic/qlog/QLogFrame.cc
C++
cc
7,999
permissive
/** @file * * A brief file description * * @section license License * * 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...
055447479d2f0421c1b64f99b8ffcc8654e9eaed
b3ff4b792dabc44be7541035fd2c1e5dd410723b
97kovacspeter/EVA1_3
/Hunting/savegamewidget.cpp
C++
cpp
1,048
no_license
#include "savegamewidget.h" #include <QVBoxLayout> #include <QHBoxLayout> SaveGameWidget::SaveGameWidget(QWidget *parent) : QDialog(parent) { setFixedSize(300, 200); setWindowTitle("Hunter save"); _listWidget = new QListWidget(); _okButton = new QPushButton("Ok"); _cancelButton = new QPushButt...
f381ab5fc06385bff99861d79679ecb147e5bc26
4708b7636cbef972b68015b13b70abc8758bf853
nakjun/QTClothSimulation
/QTClothSimulation/ClothObject.cpp
C++
cpp
17,060
no_license
#pragma warning(disable:4996) #pragma once #include "Include.h" #include "Cloth.h" #include "Barycentric.h" #include <math.h> #include <Eigen/Eigen/Dense> int totalMass = 10; // Object 전체의 질량 float dt = 0.00005; int currFrame22 = 0; CCloth::CCloth(float st, float sh, float be, float kd, int n, int m, float offset, int...
f4ccdc090cf11c1e65e946024e8349127fd6b375
81d09410c35070ffa0b5dfd8117c8ecac855bcaf
aquaEngineer/atcoder
/abc-173/A.173.cpp
C++
cpp
883
no_license
#include <iostream> #include <algorithm> #include <math.h> #include <vector> #include <string> #include <queue> #include <map> #include <utility> #include <iomanip> // std::setprecision() using namespace std; using ll = long long; #define rep(i,a,b) for(int i=(a); i<(b); i++) #define YES cout << "YES" << endl; #define...
46f5d5f6b9156b34a0b3e1f1d0c8fb2f9c80ebae
6731b80e349bb566cc8965984e0baa972a6a46eb
mickeyouyou/OpenICV
/Sensors/Mobileye/CanFrame439.hpp
C++
hpp
817
no_license
#ifndef __CanFrame439_h__ #define __CanFrame439_h__ #include "structureCanMobileye.h" #include "CanDecoder.h" class CanFrame439 { public: CanFrame439(){}; ~CanFrame439(){}; void decode(){ data_.id = mobileyeDecodeCAN(d_.frame.data,0,0,8,0); data_.y = mobileyeDecodeCAN(d_.frame.data,0,8,12,0)*0.0625; data_.x...
c072957bad238db0834c6a48334105c8d91aab6a
e645f68fad59599fa816d31738f89f76b4125cca
ignacio-rocco/pytorch_cuda_extension
/extension.cpp
C++
cpp
467
no_license
#include <torch/torch.h> #include "kernel.h" using namespace at; Tensor my_function(const Tensor& a,const Tensor& b, const Tensor &c) { auto N = a.size(0); auto d = a.clone(); call_custom_kernel(a.data<float>(), b.data<float>(), c.data<float>(), d.data<float>(), N); return d; } PYBIND11_MODULE(TORCH...
81deeba42dc230013c5f38506600358e77929a4d
8979ee33c2033fb4c48ea0b58ae69a0dd1fa0246
hackerlank/code-2
/Projects/Logic/Client/Src/CQuestPlayerCharacter.cpp
C++
cpp
1,221
no_license
//*************************************************************************************************// #include "stdafx.h" #include "CQuestPlayerCharacter.h" #include "CClan.h" //*************************************************************************************************// namespace MG { //----------------------...
ac5e50ebc54ef366522e309cc71623c6ddb0cb82
1d2db78a5ca89c77fc7f4b70c65c390b1ad1fef9
itstepP12814/Lutsevich_Cpp
/HW C_++ 22 Method const, Overload operators/22-1 Class Date - simple realization.cc
C++
cc
2,548
no_license
/*Создайте класс Date, который будет содержать информацию о дате (день, месяц, год). С помощью механизма перегрузки операторов, определите операцию разности двух дат (результат в виде количества дней между датами), а также операцию увеличения даты на определенное количество дней.*/ #in...
eda503ef41c5f66cac866052e9c3317772b4a925
a847159b03dffc26f584790b74804cf82ac595c1
ChandanKSingh/detectorgraph
/src/statesnapshot.cpp
C++
cpp
4,062
permissive
// Copyright 2017 Nest Labs, 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 t...
cda210100ceb5068c02b7b55175a04184ec692de
9e6aaaff01a9b6180c31f0a40bb11eeedefab625
beatcrypto/beat
/src/init.cpp
C++
cpp
91,894
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017 The BeatCoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or...
7d01ddd70abd6914c0779d28735e050716fb0515
bb7e90e2caddf839bd0e446669859716bb7049f9
chunlinsun/peercode
/hw0/Graph_894.hpp
C++
hpp
12,418
no_license
#ifndef CME212_GRAPH_HPP #define CME212_GRAPH_HPP /** @file Graph.hpp * @brief An undirected graph type */ #include <algorithm> #include <vector> #include <cassert> #include "CME212/Util.hpp" #include "CME212/Point.hpp" /** @class Graph * @brief A template for 3D undirected graphs. * * Users can add and retri...
fef19a82f497e64a8c255e6cca881d3fab888dac
0e1dc2a4513c58c714ebe2f361aca14130f2c80d
louisdem/IMKit
/tags/imkit-r682/utils/InfoPopper/utils/MDR/src/InfoPopperDisplay.MDR.3.x/InfoPopperDisplay.cpp
C++
cpp
7,241
permissive
/* Match Header - performs action depending on matching a header value ** ** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved. */ #include <DataIO.h> #include <Node.h> #include <String.h> #include <Entry.h> #include <Path.h> #include <Query.h> #include <TranslationUtils.h> #include <VolumeRoster.h> #inclu...
9f2dd509c324a673b66965af744acb9065de405d
0b1e06d64f58e577ceec83652618608214b2b3d8
BhuwaneshNainwal/DSA
/Recursion and Backtracking problems/tiling_problem.cpp
C++
cpp
8,526
no_license
/* ॐ JAI SHREE RAM Hare Krishna Hare Krishna Krishna Krishna Hare Hare Hare Rama Hare Rama Rama Rama Hare Hare ॐ */ //Written by Bhuwanesh Nainwal #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace s...
6a8eaf0b0bbdd7093e6f19619a965411480ccaf0
0e7845d09938eccb4cb4ec47043038f2ac59135b
tomstream/MyClass
/unsigned_long_128bit.cpp
C++
cpp
2,844
no_license
// // test_type_func.cpp // cppprogram // // Created by thomas on 15/5/7. // Copyright (c) 2015年 thomas. All rights reserved. // #include <iostream> //#include <numeric> //#include <string> //#include <cstdio> //#include <vector> //#include <algorithm> #include <iomanip> #include <cmath> using namespace std; /* t...
77e3e718a542b6a4bd023e0684a90085f48aebad
f9b87245b6c0284327596f35dcc71c0ba766f793
tianluo-code/tianluo
/unitest/bp_manager_test.cpp
C++
cpp
3,734
permissive
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved. miniob is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/Mulan...
215969b68e40cdee235884c73eb7a316795b96f0
ff3cfc99eff7321a71d07562e7e5e6ef48ca86f7
iridium-browser/iridium-browser
/v8/src/execution/local-isolate.cc
C++
cc
2,641
permissive
// Copyright 2020 the V8 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. #include "src/execution/local-isolate.h" #include "src/bigint/bigint.h" #include "src/execution/isolate.h" #include "src/execution/thread-id.h" #includ...
63a44c489ba266f50cf4040b33d6aae398f054fa
6459fa0da3b1e8fd8ee0efc52048f2cf783cb85e
AlfonsoRReyes/matrices-cpp-r-
/src/convolve.cpp
C++
cpp
332
no_license
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] NumericVector convolveCpp(NumericVector a, NumericVector b) { int na = a.size(), nb = b.size(); int nab = na + nb - 1; NumericVector xab(nab); for (int i = 0; i < na; i++) for (int j = 0; j < nb; j++) xab[i + j] += a[i] * b[j]; return ...
b0091f882088f944af34403e9546895e95c3d963
fff67a43e5e0a8812500a575c21c3908f7fdf155
jaimeleonh/cmssw
/IOPool/Streamer/src/StreamerInputSource.cc
C++
cc
19,848
permissive
#include "IOPool/Streamer/interface/StreamerInputSource.h" #include "IOPool/Streamer/interface/EventMessage.h" #include "IOPool/Streamer/interface/InitMessage.h" #include "IOPool/Streamer/interface/ClassFiller.h" #include "FWCore/Framework/interface/EventPrincipal.h" #include "FWCore/Framework/interface/FileBlock.h" ...
6778a4147045770f73b7b12b9a438a315421fa4e
a45bd1497924ad34ce04272e2485444e489a67f9
lokedhs/apl-sqlite
/ArgListBuilder.hh
C++
hh
1,311
no_license
/* This file is part of GNU APL, a free implementation of the ISO/IEC Standard 13751, "Programming Language APL, Extended" Copyright (C) 2014 Elias Mårtenson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
7c7b4e3853e0981d68bed0b01b997e35b2e1e221
90d06c54fbf591b82758baedfd55999a34d30761
hroncok/pythran
/third_party/xsimd/types/xsimd_neon_uint16.hpp
C++
hpp
10,976
permissive
/*************************************************************************** * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and * * Martin Renou * * Copyright (c) QuantStack * * ...
c2fdd3ba51c584445d8015a17dff711f2b79290c
7316bd7456181d821c15d12f69a0ec327daac58e
J65mesW/RedPitaya
/Examples/Bazaar/ws_app/LEDapplication/src/main.cpp
C++
cpp
8,122
permissive
#include "main.h" #include <limits.h> #include <math.h> #include <stdio.h> #include "version.h" #include <sys/types.h> #include <sys/sysinfo.h> #include <sys/mman.h> #include <fcntl.h> #include <unistd.h> /********************************************** * * * This part for...
201473c98e2bd57195c811d34ae89e8e39695e0d
dd76e232e476dc3fa0e12dd8fade8dff1aa0c0e5
niekbouman/MOTION
/src/test/test_conversions.cpp
C++
cpp
26,742
permissive
// MIT License // // Copyright (c) 2019 Oleksandr Tkachenko // Cryptography and Privacy Engineering Group (ENCRYPTO) // TU Darmstadt, Germany // // 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 Soft...
d0fb6b7ff1c0983c5a4bd19b1552af68e95599a1
aacec5088fbe6a596d4123cb576ba4684424d1a1
kainzhang/kz-algo-cpp
/CSP/201912-2.cpp
C++
cpp
838
no_license
// // Created by Kain Zhang on 2020/9/1. // #include <bits/stdc++.h> using namespace std; map<pair<int, int>, int> mp; vector<pair<int, int> > vec(1005); vector<int> res(5); void func(int x, int y) { if (mp[make_pair(x, y + 1)] && mp[make_pair(x, y - 1)] && mp[make_pair(x + 1, y)] && mp[make_pair(x - 1, y)]) { ...
381405d479f55e9e11bffa99d1710a2d52195f2c
748faffef29486ec58be336b3e64ba19dab2e4e0
ATM006/acm_problem_code
/poj/1326/7139806_AC_0MS_368K.cc
C++
cc
554
no_license
#include <cstdio> #include <cstring> char str[30], tem[30], mod[4]; int solve(int d){ int ans=0; if(mod[0]=='F'){ ans=2*d; } else if(mod[0]=='B'){ ans=d+(d+1)/2; } else if(mod[0]=='Y'){ if(d<500)ans=500; else ans=d; } return ans; } int main(){ while(scanf("%s", str), strcmp(str,...
44a6807960d7db0c23d97def72885d546b9a68a7
72885cb3ebb2e646cd3b35ef6a4f0839863e6405
RobotLocomotion/drake
/manipulation/kuka_iiwa/test/iiwa_status_sender_test.cc
C++
cc
3,625
permissive
#include "drake/manipulation/kuka_iiwa/iiwa_status_sender.h" #include <Eigen/Dense> #include <gtest/gtest.h> #include "drake/common/test_utilities/eigen_matrix_compare.h" namespace drake { namespace manipulation { namespace kuka_iiwa { namespace { using Eigen::VectorXd; constexpr int N = kIiwaArmNumJoints; class I...
c3c1a46d30ed14a71d43dd9396af898b88ec4f51
63e354c55e29d3591d9f11d9f477f6ce73d56c57
fucora/mini-framework
/MiniFramework/utils/Mixer.cpp
C++
cpp
4,831
no_license
#include "Mixer.h" #pragma comment(lib, "winmm.lib") namespace utils { BOOL Mixer::Open(DWORD type, HWND callbackWindow) { BOOL result = FALSE; if (hMixer_) { mixerClose(reinterpret_cast<HMIXER>(hMixer_)); hMixer_ = nullptr; } if (mixerGetNumDevs() > 0) { MMRESULT r = mixerOpen(reinterpret_cast<LPHM...
209e45f57b3ae1677dfb5f953803b8b2234626d0
f0f7cf34b5e899d7be4358b39adf02acbec23362
Isa-rentacs/kyopro_educational_90
/attempts/020.cpp
C++
cpp
232
no_license
#include <iostream> using namespace std; int main(){ long long a, b, c; cin >> a >> b >> c; long long c_to_b = 1; for(int i=0;i<b;++i){ c_to_b *= c; } cout << (a < c_to_b ? "Yes" : "No") << endl; }
a17c1416f7a9961e41a9333001a8fcaefb667501
948052f63fa8184ddfc09012368a38c19afee6ea
cfoust/leetcode-problems
/problems/diameter-of-binary-tree/solution.cpp
C++
cpp
285
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int diameterOfBinaryTree(TreeNode* root) { } };
244d3c2fbe04daf2eed197be32534e3d5ef5631f
616240fda8f308ba284a482cce5d5c9a02c3f4b4
gnthibault/tensorflow
/tensorflow/contrib/libsvm/kernels/decode_libsvm_op.cc
C++
cc
6,980
permissive
/* Copyright 2015 The TensorFlow 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 applicable law or a...
e821a9eafbe96ee8d37c25badc1dc675ece6e751
bde5b95f42a802211eb5c95f30d9aa8a13204390
isaacsaffold/opengl
/bouncing_ball.cpp
C++
cpp
4,017
no_license
#include <windows.h> #include <GL/glut.h> #include <cmath> #include <array> using point_t = std::array<double, 2>; constexpr double k_twoPi = 6.283185307179586; constexpr int k_xMin = -200, k_xMax = 400; constexpr int k_yMin = 170, k_yMax = 470; class Ball { private: point_t m_start; point_t m_center; point_t...
85f3b8cb6f614c837db05bc090b1ae2afd2acdb9
7d1e5be1218a269e8168ebe18db3bd44ba909529
anonymouslucky/COMPITITIVE-CODING
/codeforces/165C.cpp
C++
cpp
721
no_license
#include<bits/stdc++.h> #define lli long long int #define pb push_back #define INF 1e18 #define N 100010 #define tol 1e-12 #define P pair #define mk make_pair #define rep(i,lower,upper) for(i=lower;i<=upper;i++) using namespace std; lli freq[200010]; int main() { ios_base::sync_with_stdio(false); ...
5dece5638f2833c2515ea99567f8307bf4063803
43166e595feb4b630c2df24310a58af969ccf922
hanji91/stratus_20210201
/to_addr_gen/bdw_work/wrappers/pw_weight_addr_gen_wrap.cpp
C++
cpp
36,262
no_license
/**************************************************************************** * * Copyright (c) 2015, Cadence Design Systems. All Rights Reserved. * * This file contains confidential information that may not be * distributed under any circumstances without the written permision * of Cadence Design Systems. * ******...
6b20977c42f2f86437c5423b4b81ef659781cd6d
158e78fd2f78a79b8886983c6c7efaac1ec9ee76
sysfce2/MAME-Plus-Plus-Kaillera
/mameppk/3rdparty/bx/tests/unordered_set_copyctor.cpp
C++
cpp
1,674
permissive
/*- * Copyright 2012-2015 Matthew Endsley * All rights reserved * * Redistribution and use in source and binary forms, with or without * modification, are permitted providing that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of co...
f57c0547d389c25fbec2e0eea4f0e09d83582e7f
134bda6fe72dc6ac605d7819f16c33b9441a82c5
IAIK/sweb
/common/source/ustl/sostream.cpp
C++
cpp
4,202
permissive
// This file is part of the uSTL library, an STL implementation. // // Copyright (c) 2005 by Mike Sharov <msharov@users.sourceforge.net> // This file is free software, distributed under the MIT License. #include "mistream.h" // for istream_iterator, referenced in utf8.h #include "sostream.h" #include "ustring.h" #incl...
81172b5440505f9353952dde98efdb60a2a8d8a4
e1fea701d92de4a895f66b3a1159163f16491af1
JohnnyXiaoYang/ToDoList_7.2
/Interfaces/ImportExportComboBox.cpp
C++
cpp
3,859
no_license
// tdlimportexportcombobox.cpp : implementation file // #include "stdafx.h" #include "importexportcombobox.h" #include "..\shared\GraphicsMisc.h" #include "..\shared\Misc.h" #include "..\shared\DialogHelper.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif //////////...
57c6116e9d8f7d197adca9c26609898c3a95c45e
cc97d53fa8a7cd08c5331b5069469aac08334c0b
huaweicodelabs/ShareEngine
/Windows-cn/MyShareListener.cpp
C++
cpp
5,076
no_license
#include "locale.h" #include "MyShareListener.h" #include "Synergy/SynergyServiceImpl.h" extern WinShareKit::HwShareDevice g_sharedevice; extern int isDeviceFound; std::wstring UTF8ToUnicode(const std::string& str) { std::wstring rt; if (str.length() > 0) { int unicodeLen = ::MultiByteToWideChar( ...
3bebc6aead599ba305feebcff463e994e823564b
81a735014330877ae405d8d888df57e25b6b5ee3
zhangwenbo123/CYY
/43.cpp
C++
cpp
216
no_license
#include"iostream.h" void main() { int n,i; i=0; cout<<"输入一个整数n:"<<endl; cin>>n; for(;n>1;) { if(n%2==0) {i++; n=n/2;} else {i++; n=n*3+1;} }cout<<i<<endl; }
30a34435ad34dc219b84d54f67ebe1ee7eaaedeb
01bbbb9a13e8bd3e3a2b9679e7e5249e9b38879e
openigtlink/ROS-IGTL-Bridge
/src/rib_converter_transform.cpp
C++
cpp
3,657
no_license
/*========================================================================= Program: Converter Class for Transform Language: C++ Copyright (c) Brigham and Women's Hospital. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FIT...
c7b4a86ea7209ec77ba717e555e45fee59a3980a
a47fb9c2f6fb956cb6aed3fc4c9b232d0205306a
wangzhaopeng/temkrec
/video/video_mng.cpp
C++
cpp
7,845
no_license
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <iostream> #include <fstream> #include <vector> using namespace std; #include <unistd.h> #include "cam_h264.h" #include "toollib.h" #include "mymp4.h" #include "snd_pcm.h" #include "myaac.h" #include "frame_mng.h" #include "pcm_aac.h" #include "vi...
6f133c9fe4596fdfb8148869cf4d46b3c40f30e4
341d9da2b1929a92d93c6a421c312a128b69cb41
NitinMadhukar/competitive-programming
/CF_722_Div2/C.cpp
C++
cpp
2,652
no_license
/* Nitin Madhukar */ #include<bits/stdc++.h> #include <algorithm> #define ll long long #define mp make_pair #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define big(x) greater<x>() #define sp fixed<<s...
ff2c9879c97a284ea562e8baa5c04c241c687897
67e4cbf362f0d18e1aab29ca2a4848d6fdc3a4f7
loganek/gstcreator
/src/Commands/UnlinkCommand.cpp
C++
cpp
810
permissive
/* * gstcreator * UnlinkCommand.cpp * * Created on: 12 lut 2014 * Author: Marcin Kolny <marcin.kolny@gmail.com> */ #include "UnlinkCommand.h" using namespace Gst; using Glib::RefPtr; UnlinkCommand::UnlinkCommand(const RefPtr<Pad>& model) : Command(model) { } void UnlinkCommand::run_command() { RefPt...
125d5e01016e10609806d72e069f57c6f03dc715
6505652b5a4c0ee9a27008d7a330c04d5bea7804
PopCap/GameIdea
/Engine/Source/Runtime/Core/Private/HAL/IPlatformFileProfilerWrapper.cpp
C++
cpp
3,324
permissive
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "CorePrivatePCH.h" #include "IPlatformFileProfilerWrapper.h" #if !UE_BUILD_SHIPPING bool bSuppressProfiledFileLog = false; DEFINE_LOG_CATEGORY(LogProfiledFile); DECLARE_STATS_GROUP(TEXT("File Stats"), STATGROUP_FileStats, STATCAT_Advanced); DECLA...
2bf1aca2fb9cc63dc7456bae1c1c9cd1166fd8d8
738c61d0a6478e57d93f51f10250cd00246d3a83
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE590_Free_Memory_Not_on_Heap/s02/CWE590_Free_Memory_Not_on_Heap__delete_class_placement_new_02.cpp
C++
cpp
3,559
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__delete_class_placement_new_02.cpp Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete.pointer.label.xml Template File: sources-sink-02.tmpl.cpp */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: placemen...
3b71b8f80b57e8b7eb7ed9cc99a4d8ed9d49c859
3d953d547374d269d183107fae70d89660c86aff
kiranrh/innoket-master
/src/governance-votedb.cpp
C++
cpp
2,579
permissive
// Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2017-2018 The Innoket Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "governance-votedb.h" CGovernanceObjectVoteFile::CGovernanc...
148585c0edcc4037c6b20b8825ecfe17bef8280c
7fb81868246f45e7a81ce530c8acbb4ee0124370
SeaCanFly/CODE
/Study/C++/Code/Str.cpp
C++
cpp
2,050
no_license
#include<cstdio> #include<iostream> #include<cstring> #include<memory.h> #include<cstdlib> using namespace std; int StrLen(const char* str) { int i = 0; while (*str) { str++; i++; } return i; } char* StrCpy(char* d, const char* s) { d = (char*)malloc(StrLen(s) + 1); char* temp = d; while (*temp++ = *s++); ...
59098cca34890731b561d6044fa52f4e7646863a
741cbd199ae32ca25d2917168fdc0c64f0833fa0
NguyenTheAnhBK/CTDLGT
/Stack/EncodeString.cpp
C++
cpp
541
no_license
#include<bits/stdc++.h> using namespace std; //Encode string //Mã hóa theo số lần xuất hiện một ký tự liên tiếp trong chuỗi string EncodeString(string s){ stack<char> st; string result; st.push(s[0]); s += '@'; for(int i = 1; i < s.length(); i++){ if(s[i] != st.top()){ result += st.top(); re...
6e50eab62391bac225fc19449f6ffa3aecf62e96
c1568d99de6201ff54175866120d6dda28bfe035
swift-nav/json
/doc/examples/operator_serialize.cpp
C++
cpp
426
permissive
#include <json.hpp> using json = nlohmann::json; int main() { // create JSON values json j_object = {{"one", 1}, {"two", 2}}; json j_array = {1, 2, 4, 8, 16}; // serialize without indentation std::cout << j_object << "\n\n"; std::cout << j_array << "\n\n"; // serialize with indentation ...
8476ed7bb26597eb7176dfd6fb38e5f1fe28bf12
5081c1c9d20b0da899481b81d9b0c347afe5cb96
dongdong331/test
/external/libchrome/base/debug/activity_tracker.cc
C++
cc
69,834
permissive
// Copyright 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 "base/debug/activity_tracker.h" #include <algorithm> #include <limits> #include <utility> #include "base/atomic_sequence_num.h" #include "base/...
5d5528ea503d3aea76d0b7e2ffd37bc3d756fc14
fafb89754229f15aa2d850a95a9e8a456070cb6e
CPayne6/CISC454
/a1/main.cpp
C++
cpp
3,569
no_license
// Missile defence game #include "headers.h" // Window and world dimensions #define WINDOW_X_POS 100 #define WINDOW_Y_POS 50 #define WINDOW_WIDTH 600 #define WINDOW_HEIGHT 400 #define WORLD_LEFT -0.02 // The world lives in a [0,1] x [0,1] box #define WORLD_RIGHT 1.02 // with a small (0.02) border all...
a46d8b7f9ad40869ebf935b64bf098b955732bba
a27fdeb31291551987725682b9ac89b38f3aa1a2
sujin-philip/VTKmUsersGuide
/examples/EnvironmentModifierMacros.cxx
C++
cxx
1,116
no_license
#include <vtkm/Types.h> #include <vtkm/testing/Testing.h> namespace { //// //// BEGIN-EXAMPLE EnvironmentModifierMacro.cxx //// template<typename ValueType> VTKM_EXEC_CONT ValueType Square(const ValueType &inValue) { return inValue * inValue; } //// //// END-EXAMPLE EnvironmentModifierMacro.cxx //// //// //// BEG...
ebc13c69d9155499710714dc8f4e0459e383be96
f273544deb52df84d4ab4d0f018b969114aaca64
Xershoo/BM-Client
/Class8/main/src/multimedia/AudioDeviceDetect.cpp
C++
cpp
7,215
no_license
#include "AudioDeviceDetect.h" #include "./common/macros.h" #include "./common/Util.h" #include <QtCore/QMutexLocker> #include <QtCore/QTimerEvent> #define VOLUME_MAX (32767) #define MAX_CALC_BUF_LEN (8000) static int ComputeLevel(short* pcmData, int sample) { signed short ret = 0; if (sample > 0){ int sum = ...
335f4223cdd1978a0fb1656ee436ab964f31ef33
cde8e71e91839b7aec9f573eb9669648e704c88a
chiahsun/problem_solving
/UVA/CP1/10360 - Rat Attack/solve2.cc
C++
cc
1,115
no_license
#include <cstdio> #include <cassert> #include <cstring> #include <algorithm> const int M = 1025+5; int S[M][M]; int main() { int nCase, strength, nPopulation; scanf("%d", &nCase); while (nCase--) { scanf("%d%d", &strength, &nPopulation); memset(S, 0, sizeof(S)); int vmax = 0, vmax_x...
b9fe9364edf8827caf993b3a55382b9044eabd3a
332cdde99936d4feb18581fa84cb3e16ea3e4691
edwinsun98/Competitive-Programming-Solutions
/Atcoder/ABC139_E.cpp
C++
cpp
4,142
permissive
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define f first #define s second #define all(vec) begin(vec), end(vec) #define pf push_front #define pb push_back #define lb lower_bound #define ub upper_bound #define mk make_pair using namespace std; using namespace __gnu_pbds; typedef long long ll; ty...
3a34e7693077d59e7331442da262109c5c3884b6
1c8141e186181546dc7b92e9186a18f26a9b74b6
sallecta/tjsi
/src/tjsi.cpp
C++
cpp
3,114
permissive
/* * TinyJS * * A single-file Javascript-alike engine * * Authored By Gordon Williams <gw@pur3.co.uk> * Additional Coding By Marco Lizza <marco.lizza@gmail.com> * * Copyright (C) 2009 Pur3 Ltd * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated d...
d041c921ea60e1aa568c951e112263ff4cb4b092
e36b74b3053fa09b8603ca04ebef456e191e097c
mingxingren/QGraphicsGobang
/bggraphicsitem.cpp
C++
cpp
3,798
no_license
#include "bggraphicsitem.h" #include <QDebug> #include <QGraphicsLineItem> #include <QEvent> #include <QPainter> #include <QGraphicsSceneMouseEvent> #include "gamelogic.h" CBgGraphicsItem::CBgGraphicsItem(int _iWidth, int _iHeight) : m_iHeight(_iHeight), m_iWidth(_iWidth) { m_imgBackground = QImage(":/backgro...
9ea6394bdb5ee99c1379809116f3a68502ad4ea7
3a15af255e5bce4118a23120b1c5c9293817ed65
Shixiaowei02/Paddle
/paddle/fluid/inference/tensorrt/convert/test_op_converter.cc
C++
cc
2,284
permissive
/* Copyright (c) 2018 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 by applicable law or...
87245bdf424553b249724b12df1a7cc576c093ec
487e6255a394ab420bdb60b8a650a2c1703740da
Wojcik98/proi-2
/tests/testMath.cpp
C++
cpp
1,714
no_license
// // Created by Wojcik98 on 01.04.18. // #include <cassert> #include <cmath> #include "testMath.h" #include "../Math.h" #define FEQUAL(a, b) (fabs((a)-(b))<0.0000001) /** * @brief testMath::testOperators * Tests if methods related to operators work properly. */ void testMath::testOperators() { assert(Math::i...
add6d7d3dc1ce910ffa35a4d4482e60c9783eeab
cbc62bf3932cd1efbe1ed6c7de9889552bf31eec
arp1561/competitive-programming
/codechef/smpair.cpp
C++
cpp
413
no_license
#include<bits/stdc++.h> #define int long long using namespace std; signed main() { int T; cin>>T; while(T>0) { int n; cin>>n; vector<int> a; for(int i=0;i<n;i++) { int x; cin>>x; a.push_back(x); } ...
3350b66fda074363341e4fa946fb05b5ec4ea0d4
7bbb467737f2f174218ed824516546f060d89745
RaccoonH/messenger
/client/ui/clientlabel.cpp
C++
cpp
2,173
no_license
#include "clientlabel.h" #include <QDebug> ClientLabel::ClientLabel(unsigned int id, ClientInfo *clientInfo, QWidget *parent) : QWidget(parent) { setAutoFillBackground(true); _layout = new QVBoxLayout(this); _label = new QLabel(this); _layout->addWidget(_label); _clientInfo = clientInfo; _idC...
94f6899e3d086d3a18efe46ed0b97983c61a72b4
0a4d2152566f9b6812ede7be77e57c3535cc382e
yuan-energy/small_tensor
/smalltensor/test/integral/test_contraction/test_tensor3.cpp
C++
cpp
592
no_license
#include "../include_small_tensor.h" #include <iostream> using namespace std; using namespace smalltensor; int main(int argc, char const *argv[]) { tensor2<double, 3,3> obj1; tensor2<double, 3,3> obj2; tensor4<double, 3,3,3,3> obj3; tensor4<double, 3,3,3,3> obj4; obj2(2,2) = 2.; obj1(2,2) = 2.; eindex<'i'> i;...
e4e69e18af7de2e59d035fe3793e182e8e7660c2
19e54e79fce41ce797c81ece5f83c3ac26784218
Luckick/xgboost
/src/tree/updater_skmaker.cc
C++
cc
15,663
permissive
/*! * Copyright 2014 by Contributors * \file updater_skmaker.cc * \brief use approximation sketch to construct a tree, a refresh is needed to make the statistics exactly correct * \author Tianqi Chen */ #include <xgboost/base.h> #include <xgboost/tree_updater.h> #include <vector> #include <algorithm> #i...
11c23dcda7f0f0ed162acf707fd78aa5dd74d58d
98d3e979487a75e39162a038fa961293646094aa
ImageGuidedTherapyLab/ExLib
/staple/crkit_build/crkit/release-1.5.2/tools/code/crlIndexOfMaxComponent3d.cxx
C++
cxx
4,592
no_license
#include <itkImage.h> #include <itkImageFileReader.h> #include <itkImageFileWriter.h> #include <itkExtractImageFilter.h> #include <itkImageRegionIteratorWithIndex.h> #include <iostream> int main(int argc, char *argv[]) { static int const InImageDimension = 3; static int const OutImageDimension = 2; typedef ...
95100da754f37396c25c4490bc4e22ee6d4e8202
b95bb0941daf29b148ec6c96298e9d1eb31c23b3
aaronbrown/project
/siftpp/sift.cpp
C++
cpp
43,229
no_license
// file: sift.cpp // author: Andrea Vedaldi // description: Sift definition // AUTORIGHTS // Copyright (c) 2006 The Regents of the University of California // All Rights Reserved. // // Created by Andrea Vedaldi (UCLA VisionLab) // // Permission to use, copy, modify, and distribute this software and its ...
a84dbc6e9c23c0c9a7424f9589de8821d73aaa0e
42a3736c81f876bddc019f988a10214a10115081
POETSII/Orchestrator
/Generics/DumpChan.cpp
C++
cpp
602
no_license
#include "DumpChan.h" #include <string> using namespace std; FILE * DumpChan::dfp = stdout; //============================================================================== void DumpChan::Dump(unsigned off,FILE * fp) { string s = string(off,' '); const char * os = s.c_str(); fprintf(fp,"%sDumpChan ++++++++++++++++++...