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 |
|---|---|---|---|---|---|---|---|---|
5bc2f41fd52e16e2321ef0dddb03bae21460c55f | f0e36bd0f2010667d641990c49935be56ea59964 | midnight-miner/minecoin-dev | /src/amount.cpp | C++ | cpp | 885 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "amount.h"
#include "tinyformat.h"
CFeeRate::CFeeRate(const CAmount& nFeePa... |
548e66667b27882a12876d973ca14b6e04dbe05e | 83bff5ceae6e7d2c91afe6e77e3442dc13daece4 | verbof/simplesparsedense | /src/RealMath.cpp | C++ | cpp | 32,893 | no_license | #include "config.hpp"
#include "RealMath.hpp"
#include "timing.hpp"
#include "CSRdouble.hpp"
#include "ParDiSO.hpp"
#include "shared_var.h"
#include <cassert>
#include <cstring>
#define mesh(i,j,k) mesh[nx*ny*((k)-1) + nx*((j)-1)+(i)-1]
#define nzvals(i) nzvals[(i)-1]
#define rowind(i) rowind[(i)-1]
#def... |
901ca969411181c1cdedf011df03714886e2aa58 | 488facd066d39664e3b3385dc595f509f32116b3 | blusno1/chromium-1 | /base/metrics/histogram.cc | C++ | cc | 45,805 | permissive | // Copyright (c) 2012 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.
// Histogram is an object that aggregates statistics, and can summarize them in
// various forms, including ASCII graphical, HTML, and numerically (as... |
408014c8ef8c32091e11988683acc6b206964932 | 08dd851ea738311d45d9290b092f673c3d61c08e | Tkappa/18-cum-Laude | /View/Mappa/Mappa.cpp | C++ | cpp | 19,242 | no_license | //
// Created by Igor Ershov on 05/04/2017.
//
#include "Mappa.h"
//Definizioni per la tipologia di mappa speciale
#define SHOP 1
#define LAUREA 2
//Decommentare per vedere i messaggi di debug della creazione della mappa
//#define debugMap
//#define debugMapVerbose
struct posStanza{
int x... |
123d61104b4ed43b8d704d3025e96ea5ede767ce | bbbaeb29d2bed0e57d0c7414234214b11acc8b8f | loimu/k3b | /libk3b/projects/datacd/k3bdatadoc.cpp | C++ | cpp | 49,212 | no_license | /*
SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl>
SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "k3bdatadoc.h"
#include "k3bfileitem.h"
#include "k3bdataitem.h"
#include "k3bdiritem.h"
#include "k3bsessionimportitem... |
50ccd71ab955973b313a0c93752c25f12f981696 | 3a8a5e21f156b549f890db69fb606cca39fe8ee4 | bjoern79de/LoRaLib | /src/SX1272.cpp | C++ | cpp | 6,813 | permissive | #include "SX1272.h"
SX1272::SX1272(int nss, Bandwidth bw, SpreadingFactor sf, CodingRate cr, int dio0, int dio1) {
_nss = nss;
_dio0 = dio0;
_dio1 = dio1;
switch(bw) {
case BW_125_00_KHZ:
_bw = SX1272_BW_125_00_KHZ;
break;
case BW_250_00_KHZ:
_bw = SX1272_BW_250_00_KHZ;
break... |
dae43aaf8f3a5468701946001f2c335824c3304f | 03f076f0dc6cee05a26055e69ca1e8dbe5d06de5 | zanzo420/SoT-Python-Offset-Finder | /SDK/OOSLetter_ExclusionEntitlement_Campaign028_functions.cpp | C++ | cpp | 602 | no_license | // Name: SoT, Version: 2.2.1.1
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//----------------------------------------------------... |
fdf2afe6414a7fe825dc1df3d11c47caf20156d3 | d0abbc610ea75af58b13bb4393c9838c59abc176 | eklenske/phd2 | /cam_firewire_OSX.cpp | C++ | cpp | 13,340 | permissive | /*
* cam_firewire_OSX.cpp
* PHD Guiding
*
* Created by Craig Stark.
* Copyright (c) 2007-2010 Craig Stark.
* All rights reserved.
*
* This source code is distributed under the following "BSD" license
* Redistribution and use in source and binary forms, with or without
* modification, are per... |
bab05914edb342ef87803e25531f0f94c903e2c5 | 66fa615e5b9892286668d5f5243cd9ed419783c9 | akinobu-fujikura/Tetris | /ソースコード/map.cpp | C++ | cpp | 2,001 | no_license | // MAP.CPP
#include "stdafx.h"
#include <stdio.h>
#include "tetrisSDI.h"
#include "Common.h"
// ブロックがない状態を表す
Block *EMPTY = new Block(-1, -1, 0);
Map::Map()
{
int x, y;
for (y = 0; y < YMAX; y++) {
lineCount[y] = 0;
for (x = 0; x < XMAX; x++) {
map[x][y] = EMPTY;
}
}
}
// マップ上にブロックがなけ... |
46070c26468681ef7461470b3eb7ce8763ab8609 | dad683a6c0f894adaab68c742e3a112afc2909af | scholardew/teamProgram | /Levine-Assn4-Funcs.cpp | C++ | cpp | 4,010 | no_license | //*********************************************************************
// CODE FILENAME: Levine-assn4-funcs.cpp
// DESCRIPTION: Contains assigned sort and main functions
// CLASS/TERM: CS 372 - 2014 Spring 8 Week 1
// DESIGNER: Josh Levine
// FUNCTIONS: selectionSort - Perform a selection sort
// q... |
b819535a44078be5cca829fc3b46fcd8ec410e7c | 35764058cefdeb4998fbb8db4d36cf833a5ab04c | inglada/otbtf | /app/otbTensorflowModelTrain.cxx | C++ | cxx | 22,580 | permissive | /*=========================================================================
Copyright (c) Remi Cresson (IRSTEA). All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright ... |
31e97f0d55ba74ec6ec991bc9c93ebcb48f9717c | fec228eff47195da8eefe443d46e750deedc14b9 | Biller17/Codigos-Tercer-Semestre | /Prof Templates/AVL_Tree/AVL_Tree_Start/Test_Tree.cpp | C++ | cpp | 2,463 | no_license | #include <iostream>
#include "AVLTree.h"
void main_menu()
{
AVLTree<int> num_tree;
int num;
char ans = 'a';
while (ans != 'q')
{
std::cout << "\nAVL TREE MENU" << std::endl;
std::cout << "\ta. Add new number" << std::endl;
std::cout << "\tr. Remove a number" <<... |
84cbc7965783960ce217736b3ffaf2863d96a774 | ff65c71b87d4ac019e1d8925edbab5e317585ac1 | lewdif/Portfolio | /framework/Armedroids/Shark.cpp | C++ | cpp | 7,854 | no_license | #include "Shark.h"
#include "Transform3D.h"
#include "RigidBody.h"
#include "InputManager.h"
#include "GameCharecter.h"
#include "SharkAttackState.h"
#include "SharkChaseState.h"
#include "SharkPatrolState.h"
namespace CompEngine
{
void Shark::dameged(int weaponType)
{
int damege = 0;
if (weaponType == WEAPON... |
c15e9d8d6a400105fc021860b3486dbbbb3df131 | 6014913b9a3cceb71039aa358725a0ef3990f58e | Raznoo/CPP_Projects | /vunmo/network_helpers.hh | C++ | hh | 1,153 | no_license | #pragma once
#include <arpa/inet.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sched.h>
#include <sys/resource.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#inclu... |
663a36b1c47273f95222b8721cdc9924da0bddb9 | 9654f2795536f0dbeb8a32ccd7527e072471878c | novaquark/aws-sdk-cpp | /aws-cpp-sdk-backup/source/model/CreateBackupPlanResult.cpp | C++ | cpp | 1,755 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
5d50ef9abbef71f996748f85113721526432f454 | 6339595ad5495cfe86824a8e7a31ef259f51f450 | kodypeterson/hiphop-php | /hphp/runtime/eval/debugger/cmd/cmd_run.cpp | C++ | cpp | 2,799 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
+---------... |
c313c2ca61c83365637acdbbe9dc368ba122a226 | cdfa83dc66fe6e9c697bdf510943ef90d78e7e12 | Jason-LLL/LeetCode-Algorithm | /BalancedBinaryTree.cpp | C++ | cpp | 629 | 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:
bool isBalanced(TreeNode* root) {
if(root==NULL)
return true;
int left=height(root->left);
int ... |
22aeffb630c8dd876715fceba1d569ed8ed22686 | 7a1e81b4e673ac4d20891d80d24f8616e7460e58 | frendylio/EE205 | /Final Project/EE205 _ FInal Project/keygen.cpp | C++ | cpp | 1,939 | no_license | // keygen.cpp : This file contains the 'main' function. Program execution begins and ends there.
//unsigned int means that int can only be positive. So we don't have to sorry about negative numbers
// Using starcraft keygen model
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include "sr... |
61e2685016cbdc0df1e30ee9ab37d6c100301666 | bfb0520ff192c21ebb23498e2e6e2c80b9e95f98 | Slava/competitiveProgramming | /more-source/Graph/152_postroeniye.cpp | C++ | cpp | 549 | no_license | #include <iostream>
using namespace std;
int n,m,a[101][101]={0},i,j,t;
bool u[101];
int dfs(int x,int k)
{
u[x]=1;
for(int i=0;i<n;i++)
if(a[x][i])
if(!u[i])dfs(i,k);
else if(i==k){cout<<"No";exit(0);}
}
int main()
{
freopen("input.txt","r",stdin);
f... |
4b67238972a3d10a4f79ef4c386a9f0b9a87d3fb | a79f3624e8327bb7d2abc305b050baaf3f1405cf | ghelanikirtan/Competitive-Programming | /Codechef/January_Cook-Off_2021/Distinct_Pair_Sums.cpp | C++ | cpp | 356 | no_license | // // ? https://www.codechef.com/COOK126C/problems/MANYSUMS
// #include<bits/stdc++.h>
// using namespace std;
// int main(){
// return 0;
// }
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t>0){
int l;
int r;
cin>>l>>r;
cout<<2*(r-l)... |
e078a2120019e7ee0f6c47f7576bbbc512ff785e | 13922d028a3cc2ddc141afef34b9b5b0bba4a932 | clium/clium | /src/utils/src/libs/qtc/tests/test_qtc.cpp | C++ | cpp | 11,536 | no_license | #include <cstdlib>
#include <ctime>
#include <error/error.h>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <map>
#include "print_type_name.hpp"
#include <qtc/qtc.hpp>
#include <sstream>
#include <unordered_map>
namespace fs = std::filesystem;
#define RESET "\033[0m"
#define BLUE "... |
c3936d17ba53135e3a13976113c4b90c1f3b49bd | a08c96fbf0aa3a606314fc9c5d39f63ed72c882e | AzorAhoy/ConsoleApplication2 | /VD1/VD1.cpp | C++ | cpp | 665 | no_license | // VD1.cpp : Defines the entry point for the console application.
//
#include "pch.h"
#include <iostream>
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include "winsock2.h"
#include "ws2tcpip.h"
int main()
{
WSADATA wsa;
WORD version = MAKEWORD(2, 2);
if (WSAStartup(version, &wsa) == 0)
{
printf("Khoi tao thanh c... |
198a2208c39056d6d438f24a218553dc47e62616 | b6fcdf3a86756da649daec133b2a9a6c80e6b262 | ViteFalcon/godot | /modules/roklegend/blib/wm/widgets/ScrollPanel.cpp | C++ | cpp | 9,165 | permissive | #include "ScrollPanel.h"
#include <glm/gtc/matrix_transform.hpp>
#include <blib/wm/WM.h>
#include <blib/Texture.h>
#include <blib/SpriteBatch.h>
#define CLIPPING
namespace blib
{
namespace wm
{
namespace widgets
{
ScrollPanel::ScrollPanel()
{
internalHeight = 1000;
internalWidth = 1000;
scro... |
adb0387385e962932de73b3d9a6c0473eed1982a | 80c058f5aec3464cd6b247e9326ba0772afeac0c | ccdxc/logSurvey | /data/crawl/squid/old_hunk_3103.cpp | C++ | cpp | 706 | no_license | int count;
if (argc < 2) {
fprintf(stderr, "%s| %s: Error: No proxy server name given\n",
LogTime(), PROGRAM);
exit(99);
}
if (argc == 3) {
count = atoi(argv[2]);
while (count > 0) {
Token = (const char *) squid_kerb_proxy_auth(argv[1]);
... |
a6a11cfd23c63933e6d6c178ca68554231ee04f9 | 84476053e9d74496e66b196225c40ba72ce93c11 | JHYOOOOON/Collection | /baekjoon/13913.cpp | C++ | cpp | 1,276 | no_license | #include <iostream>
#include <queue>
#include <vector>
#define MAX 100001
using namespace std;
int before[MAX];
bool visited[MAX];
vector<int> tmp;
int main() {
int n, k;
cin >> n >> k;
queue<pair<int, int>> q;
q.push({n, 0});
visited[n] = 1;
int idx, time;
while (!q.empty()) {
i... |
d4014e8c0cbf556811020edb294b530b61a1f208 | 197d63719e3e113ee1ae6dac7f54b3b207161781 | Kto-ya123/Rational | /main.cpp | C++ | cpp | 3,735 | no_license | #include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <vector>
using namespace std;
class Rational {
public:
Rational() {
this->_numerator = 0;
this->_denominator = 1;
}
Rational(long numerator, long denominator) {
if(denominator == 0){
throw... |
86bcdf1f441c0cf08a29e138cc4632c962062b83 | 6ecc8e0719f248270b915acf02865e068fb0d36c | redpanda-data/redpanda | /src/v/resource_mgmt/cpu_profiler.cc | C++ | cc | 4,414 | no_license | /*
* Copyright 2023 Redpanda Data, Inc.
*
* Use of this software is governed by the Business Source License
* included in the file licenses/BSL.md
*
* As of the Change Date specified in that file, in accordance with
* the Business Source License, use of this software will be governed
* by the Apache License, Ve... |
7e41e38da04dc516e1bacf199c048d4428e29645 | ebff525a64916991f67ff0ccb663e4158d58afd0 | Lord-KA/phisics-emulator | /src/interface.hpp | C++ | hpp | 1,084 | no_license | #ifndef INTERFACE_H
#define INTERFACE_H
#include <QApplication>
#include <QWidget>
#include <QPushButton>
#include <QCheckBox>
#include <QTimer>
#include <QGridLayout>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
#include <QLineEdit>
#include <QShortcut>
#include "universe.hpp"
#include "canvas.h... |
74d1ee63fb0843398129b1c7f8c1d4400ccd8079 | 0bd5ae222c09cf96cd6219f2f42837b7f5014674 | linehill/phsa-runtime | /src/Devices/CPU/CPUKernelAgent.hh | C++ | hh | 4,902 | permissive | /*
Copyright (c) 2016 General Processor Tech.
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, ... |
e5b99cebad2197491dd374b7a91e1733eff5e314 | 6096a727bcaaf27f2497359f35e9ee7d66f93de6 | longvd336/ds-algo | /tonghop/19.cpp | C++ | cpp | 929 | no_license | #include <stdio.h>
#include <stdlib.h>
struct node {
int info;
node *next;
};
struct list {
node *dau, *cuoi;
};
void khoitao(list &l) {
l.cuoi = l.dau = NULL;
}
void themdau(list &l) {
int x;
scanf("%d", &x);
node*p = (node*)malloc(sizeof(node));
p->info = x;
p->next = NULL;
if(l.dau == NULL) {
l.dau =... |
0331868cefda02e59fb889eadf8252128d4356ce | a2b715b1311a9ff03d38801de684dbef33466766 | programminggp/2DLV1 | /OC_3DAcePilot_Finish/GameProgramming/CMap.cpp | C++ | cpp | 2,470 | no_license | #include "CMap.h"
CMap::CMap()
{
//地面
mCollider[0].SetTriangle(this, CVector(200.0f, 0.0f, 200.0f), CVector(200.0f, 0.0f, -200.0f), CVector(-200.0f, 0.0f, 200.0f));
//前壁
mCollider[1].SetTriangle(this, CVector(135.0f, 0.0f, 135.0f), CVector(-135.0f, 0.0f, 135.0f), CVector(-110.0f, 110.0f, 110.0f));
mCollider[2].S... |
ee62d6230bfa99dff67ead8a5a0ee0824d86983d | 44801ac47097175bea36012775860b34be57354d | treeman/ld33 | /src/statusbar.cxx | C++ | cxx | 326 | no_license | #include "engine/butler.hxx"
#include "statusbar.hxx"
Statusbar::Statusbar(string s, FPoint pos) {
txt = create_txt("consola.ttf", 14, s);
txt.setPosition(pos);
txt.setColor(sf::Color(0x362E0EFF));
}
void Statusbar::update(const sf::Time &dt) {
}
void Statusbar::draw(sf::RenderWindow &w) {
w.draw(txt... |
0e870485c9c527194bef70ea6671fdd34eb9a755 | f2364279732910cc3db9c6b8b2c25fe69a4f3ec3 | MedicaicloudLink/Rosetta | /main/source/src/protocols/protein_interface_design/movers/PrepackMover.cc | C++ | cc | 10,875 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
b24ba61e39e1690e14d40c64addd32a36fb382a2 | d3d9f96d99f6844691db61610e5078a2f95d9753 | PDFxy/hihocoder | /solutions/1014.cpp | C++ | cpp | 1,134 | no_license | #include <bits/stdc++.h>
using namespace std;
const int maxchild = 26, maxnode = 1000010;
struct Trie {
int graph[maxnode][maxchild], cnt[maxnode], val[maxnode], sz;
Trie() { sz = 1; memset(graph, 0, sizeof(graph)); memset(val, 0, sizeof(val)); memset(cnt, 0, sizeof(cnt)); }
int idx(char s) { return s - 'a'... |
8d2cd42a0a37bcd519619aad47ba431c15ab44f4 | f5b0f210bde818f0ef5a500b9f2d02c7f9a4a761 | shunsunsun/gmum.r | /tests/cpp/cec/parametrized_tests.cpp | C++ | cpp | 7,140 | no_license | #include "tests_fixture.hpp"
#include "clustering_comparator.hpp"
#include "cec.hpp"
#include <utility>
using namespace gmum;
TEST_P(EnergyTests, IsEnergyCorrect)
{
int number_of_times_acceptable = 0;
for (unsigned int i = 0; i < times; ++i)
{
CecConfiguration conf;
conf.set_params(param... |
329aeab17d80ac6f5ee4d1d1a6e558be99807212 | 3103dfd8adadb362b51233483d7eb5b42ec8d2c2 | xvjiarui/comp4411-Tracer | /src/SceneObjects/Box.cpp | C++ | cpp | 4,159 | no_license | #include <cmath>
#include <assert.h>
#include "Box.h"
bool intersectionParallel(double A, double B, double C, double D, const ray&r)
{
vec3f pn = vec3f(A, B, C);
vec3f d = r.getDirection();
return (pn.dot(d) < RAY_EPSILON && pn.dot(d) > -RAY_EPSILON);
}
double intersectQuadrilaterals(double A, double B, double C,... |
0f25a2fc13099a43372947db2798f652c31b8d97 | bb8116b38176ed85d33b78e513378c487a018959 | mkacz91/hiab | /src/render.cpp | C++ | cpp | 15,116 | no_license | #include "render.h"
#include "scene.h"
#include "shaders.h"
#include "math.h"
#include <iostream>
namespace hiab {
void init_renderer(Renderer* r)
{
r->viewport = { 0, 0, 0, 0 };
r->viewport_changed = true;
r->avg_layers_per_pixel = 3;
r->programs.object = new ObjectProgram;
r->programs.layer0 ... |
4204210951635e43616e5cf00f3d2d0857a4d5aa | 471aa25ec265a8492ba3b4b08536a0fa5e187ee3 | njoy/lipservice | /src/lipservice/GROUPR/Card1/Npend/test/Npend.test.cpp | C++ | cpp | 1,598 | permissive | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "lipservice.hpp"
using namespace njoy::njoy21::lipservice;
SCENARIO( "npend output values",
"[GROUPR],[Card1], [Npend]"){
GIVEN( "valid npend tape values" ){
std::vector<int> validValues{-20, 20, 42, 99, -99};
WHEN( "the nendf value is valid... |
85e5453c5bbb07aa22ea6cd0dd283d0d6e35078a | a24fbeb63e6e7d948d9d25288127354892f75845 | shuai1126/keshe | /keshe/train/moc_selorder.cpp | C++ | cpp | 3,573 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'selorder.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
************************************************************... |
404ad251a7353972914925e44893e62ad3754599 | 7de3d0022b8206d2fe24d7d5d9e2c7438e028fb4 | YessicaSD/Edu-Game-Engine | /Source/PhysBody3D.cpp | C++ | cpp | 1,036 | permissive | #include "Globals.h"
#include "PhysBody3D.h"
#include "glmath.h"
#include "Bullet/include/btBulletDynamicsCommon.h"
using namespace std;
// ---------------------------------------------------------
PhysBody3D::PhysBody3D(btRigidBody* body) : body(body)
{}
// ---------------------------------------------------------
... |
2697105c95eb9b81729bc83f70d9b4f9ec721e9b | b35d3f3bfb8d7cadda4151eb6a1d66116f2de3ee | jim-bcom/xpcf | /src/PropertyMap.cpp | C++ | cpp | 8,013 | permissive | /**
* @copyright Copyright (c) 2017 B-com http://www.b-com.com/
*
* 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... |
f3a64134eab79da221705816a52050116b7a6f27 | 061a4854df18b0b60fbfdee3b39af8f825a9146b | morsalin80/algo_DS | /lightoj solve/1307 - Counting Triangles .cpp | C++ | cpp | 4,276 | no_license | /// Bismillahir Rahmanir Rahim
/* Mohammad Morsalin
Dept of ICE, NSTU
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define endl "\n"
#define int ... |
767a69ace5c640ab0e0f387acb99e048c15e2ab9 | 3cd4abcb2b43bdd796385c81c89db25685cf0b88 | fatemehhadi/cplusplus_linked_list_class | /linkedlist.cpp | C++ | cpp | 4,011 | no_license | # include <iostream>
#include "linkedlist.h"
using namespace std;
LinkedList::LinkedList()
{
tail = NULL;
head = NULL;
length = 0;
NDmode = NORMAL;
};
LinkedList::LinkedList(mode state)
{
tail = NULL;
head = NULL;
length = 0;
NDmode = NORMAL;
if ( state == DEBUG)
NDmode = ... |
6557ebbee8667a1b4d73cd7fec112ad36fe1e689 | 8426e95327330f549c2987763a3a007a66840286 | whyhhr/homework2 | /Intermediate/Build/Win64/Netshoot/Inc/AIModule/AIPerceptionStimuliSourceComponent.gen.cpp | C++ | cpp | 20,497 | no_license | // Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
769410f3fa3162c2593ee5c1306f644196ac6d76 | 1380e72b074ed7ede3f7fdb17f7cc0c4fa755096 | zfxu/color | /src/color/hsl/category.hpp | C++ | hpp | 1,480 | permissive | #ifndef color_hsl_category
#define color_hsl_category
namespace color
{
namespace category
{
namespace _internal
{
struct hsl_bool {};
struct hsl_uint8 {};
struct hsl_uint16 {};
struct hsl_uint24 {};
struct hsl_uint32 {};
struct hsl_uint48 {};
struct h... |
8e5fd8880ae34d85fdc1c05c37e92b96c01a37f6 | e2c9743c02e7fe99637117c18ff589ffb6bbd077 | 20021456/ltnc | /test.cpp | C++ | cpp | 749 | no_license | #include <iostream>
#include <cmath>
#include <queue>
using namespace std;
int KTSNT(int n) {
if (n < 2) return 0;
int count = 0;
for(int i = 2; i <= sqrt(n); i++){
if(n % i == 0){
count++;
}
}
if(count == 0){
return 1;
}else{
return 0;
}
}
int m... |
73517cfd0151bf7711cb0a976743ae332920cc71 | e5cf71d953a50271f205b5f3dc6d562ebb3b4eef | push-pop/ofxWindowedApp | /example/ofxWindowedAppDemo/src/MultiPongApp.cpp | C++ | cpp | 22,170 | no_license | #include "MultiPongApp.h"
#define CHOOSE_PLAYER 0
#define PLAY 1
#define WIN 2
#define MAX_BALL_SPEED 6
#define MIN_BALL_SPEED 2
#define PADDLE_WIDTH 10 // In reference to the left and right paddles
#define PADDLE_HEIGHT 200 // In reference to the left and right paddles
#define PADDLE... |
c295a18368dd5ad0a640cef7ded10921d5b1bd18 | 476200d043b320349d686e113bfd9a7cf85be731 | 23michael45/DDRLocalServer | /DDR_LocalClient/Client/LocalClientUdpProcessor.cpp | C++ | cpp | 2,070 | no_license | #include "LocalClientUdpProcessor.h"
#include <memory>
#include "src/Utility/DDRMacro.h"
#include "src/Utility/CommonFunc.h"
#include "thirdparty/asio/include/asio.hpp"
#include "LocalTcpClient.h"
#include "GlobalManager.h"
using namespace DDRFramework;
using namespace DDRCommProto;
LocalClientUdpProcessor::LocalClie... |
ecb6dd5d3d8763e0d8ae3c8d01dead39ef0c54f7 | 58e481005ca32b1cf40288d01ef17c9568d561d3 | MasterBlck/cpp-programs | /Arreglos/main.cpp | C++ | cpp | 555 | no_license | #include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include "Arreglo.h"
int main() {
Arreglo *a = new Arreglo(8);
Arreglo b(28);
Arreglo *resultado = new Arreglo();
a->obtenerValoresAlatorios();
b.obtenerValoresAlatorios();
cout << "Contenido del Arreglo A:" << endl;
c... |
432a1dc9d6ed2c68f3ce22c8bdddfaea36afe47d | a3be3267ee9bec10e7ce39c571d76f5a1c049727 | jjzhang166/BOSS_ExternalLibs | /geant4/G4OpenGLXmSliderBar.hh | C++ | hh | 3,669 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
c6097c28c7a89ad29265113706625da35c614381 | c6071b78ff4b995ca2acd7654fca9d6bec5fc505 | harsh503/AdvancedDataStructures-Code | /RedBlackTree.cpp | C++ | cpp | 4,184 | no_license | #include<bits/stdc++.h>
using namespace std;
struct node
{
int v,c;
node *l, *r, *p;
node(int v)
{
this->v = v;
l = r = p = NULL;
}
}*root=NULL;
struct node * CreateNode(int v)
{
struct node *temp = (struct node *)malloc(sizeof(struct node *));
temp->l = temp->r = temp->... |
728c6af9e9b5bb7d68aa833436a7aa248aa32f95 | d3bac2c74e83c1b776956039b56648a3ee2e67ac | newrelic/newrelic-dotnet-agent | /src/Agent/NewRelic/Profiler/Sicily/SicilyTest/MethodTypeTest.cpp | C++ | cpp | 6,052 | permissive | // Copyright 2020 New Relic, Inc. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
#include <CppUnitTest.h>
#include "UnreferencedFunctions.h"
#include "TestTemplates.h"
#include "../ast/Types.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace sicily
{
namespace ast
{
... |
bf855cbb10faf8a5db41ab0e5d7b277a4ebf3754 | 21f9bb33bd22c9be33079007359f8443481ed1d8 | 15831944/TRiAS | /TRiAS/TRiAS/Extensions/BasicScript2/runebobs.cpp | C++ | cpp | 50,890 | no_license | #include "bscriptp.hxx"
#include "bscript.h" // ResourceKonstanten
#include "version.h"
#include <new>
#include <iobjman.h>
#include "macrguid.h"
#include "iscrprop.h"
#include "conststr.h"
#include "projscr.h"
#include "runscorg.h"
#include "relscrpt.h"
#include "runerr.h"
#include "runebobs.h"
#in... |
e72948fd2a01b3d18c606e61c30ced2725d51fd7 | a7dbfce49af4f449c7110cad71bc2568274b4c97 | szkjch/CS-Client-SDK | /CppChatClient/message/CreateGroupNotificationContent.cpp | C++ | cpp | 2,130 | no_license | //
// CreateGroupNotificationContent.cpp
// ChatClient
//
// Created by Hao Jia on 2020/1/31.
// Copyright © 2020 WF Chat. All rights reserved.
//
#include "CreateGroupNotificationContent.h"
#include "../JsonTools.h"
namespace WFCLib {
CreateGroupNotificationContentPrototype CreateGroupNotificationContent::sProt... |
692771c687fa68d4f49edeef0d26214791af233a | c9153552333e7d9e2877c1d5657eb6e522888af8 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-lookoutvision/source/model/StartModelResult.cpp | C++ | cpp | 1,339 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lookoutvision/model/StartModelResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws... |
65411cd4cc9f299b8f3a61419ebb85f0c52b3fcf | 78cd5390f3cb1cb9e1e6fb0aefd694b4092dfea1 | intelzombi/ProceduralContentRenderingFramework | /extern/FractalSphere/SphereGrammar.cpp | C++ | cpp | 12,714 | no_license | // Copyright © 2008 Intel Corporation
// All Rights Reserved
//
// The sample source code contained or described herein and all documents
// related to the sample source code ("Material") are owned by Intel Corporation
// or its suppliers or licensors. Title to the Material remains with Intel Corporation
// or its sup... |
87ed2ea9ff480ba138c77317f38d70e136dd1ea0 | 9c7c7d02ab591d8d827f96bc4b9f16ddb6efdea9 | x3sphiorx/r3e | /RGE/TSI.hpp | C++ | hpp | 921 | no_license | #ifndef TSI_HPP
#define TSI_HPP
#include "File.hpp"
#include "ScopedPointer.hpp"
#include "Array.hpp"
#include "Rect.hpp"
#include "StringMap.hpp"
#include "IRender.hpp"
namespace ROSE {
class TSI {
public:
struct Graphic {
short mOwner;
Rect mRect;
char mName[0x20];
IImage* mImage;
... |
aa9d63b35ac6fbcaecf0dc030d5e8af273a6bfe9 | 6c467edb1bc1c0a60765f5844522e4bb7ec7f73e | waleoyediran/CarND-Path-Planning | /src/main.cpp | C++ | cpp | 11,173 | permissive | #include <uWS/uWS.h>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "helpers.h"
#include "spline.h"
#include "json.hpp"
// for convenience
using nlohmann::json;
using std::string;
using std::vector;
using namespace std;... |
76c07613cfd27e009a82368c41b5418caf940511 | 8790481aa700137c30b2e6c3bc99239224612942 | MinghuiGao/chromium | /components/network_hints/renderer/web_prescient_networking_impl.cc | C++ | cc | 1,639 | permissive | // Copyright 2014 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 "components/network_hints/renderer/web_prescient_networking_impl.h"
#include "base/logging.h"
#include "content/public/renderer/render_frame.h"
... |
7db09e875c57be6b9057c27c478b67390736cf77 | 75c36bbc65ae64e492c9b3f9b30db2f1130ef8f9 | YongGame/opengl4-tutorials-mbsoftworks | /common_classes/HUDBase.cpp | C++ | cpp | 2,254 | permissive | // STL
#include <mutex>
// Project
#include "HUDBase.h"
#include "shaderManager.h"
#include "shaderProgramManager.h"
#include "samplerManager.h"
// GLM
#include <glm/gtc/matrix_transform.hpp>
const std::string HUDBase::DEFAULT_FONT_KEY = "default";
const std::string HUDBase::ORTHO_2D_PROGRAM_KEY = "ortho_2D";
const ... |
a5b77b9d1e78b99e5c262a9df487e7d81b55ea9c | d41320f7e48cf98a95499ec7282514915e2c4bbb | SunHoJeong/algorithm | /1463.cpp | C++ | cpp | 722 | no_license | //
// 1463.cpp
// Algorithm_2017
//
// Created by 수노 on 2017. 1. 23..
// Copyright © 2017년 수노. All rights reserved.
//
#include <iostream>
using namespace std;
int value[1000001];
int df(int x){
if(x==1){
return 0;
}
if(value[x]>0){
return value[x];
}
value[x] = df(x-1) +... |
efeb5e93e7feb14dbb4b24b2addfa67eac4c6f46 | c4ac4647bfbb68874aad93a76917e3a501a19488 | alejolp/programming-exercises | /leetcode/cpp/160.cpp | C++ | cpp | 935 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
int listSize(ListNode *L) {
int n = 0;
while (L) {
L = L->next;
++n;
}
return n;
... |
47dde249911f1a6c251611728087def96a97f237 | c148502dc0dec225f2481d290e0f8fe20d781340 | thinkpad20/cplusplus | /homework6/6.3.PSMatrix.cpp | C++ | cpp | 3,376 | no_license | #include <iostream>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <numeric>
#include <boost/progress.hpp>
using namespace std;
// g++ on Cygwin appears to define a macro named "minor"
// This helps illustrate why namespaces are good and macros are bad
#undef minor
template<typename ... |
b74c730006b8959c9d67d87bb66308173a5887b3 | 29506bbe2f9df4181fa67297b11397d90a613f71 | gavinsyw/LeetCodeCheck | /9.cpp | C++ | cpp | 360 | permissive | // 16ms, 8.1MB
class Solution {
public:
bool isPalindrome(int x) {
if (x < 0)
return false;
long long reversex = 0, cpx = x;
while (cpx != 0) {
reversex *= 10;
reversex += cpx%10;
cpx /= 10;
}
if (reversex == x)
ret... |
8a9ee56e8aeb5fbf396cbccd2309bd005fb8f653 | 939f0e78227ffb3a2d9ba11f7efc284ab5eb5cbf | hauska7/one | /src/vmm/VirtualMachineManager.cc | C++ | cc | 53,693 | permissive | /* -------------------------------------------------------------------------- */
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... |
e6d495f3ea8dfebe5d0adfa2640171a2926e07f2 | 6402650d6c94a682b87df30ccb6154fd06adfda0 | K-Wu/libcxx.doc | /test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp | C++ | cpp | 1,415 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
b56ca1fa07eab839257daa70ba6929c67d187390 | 7a5eeba3a68a9cf158145d1400bd326acc13800a | sunblaze-ucb/eVSS | /Virgo/src/VPD/fft_circuit_GKR.cpp | C++ | cpp | 40,402 | permissive | #include <cstdio>
#include "linear_gkr/prime_field.h"
#include <vector>
#include "linear_gkr/polynomial.h"
#include <chrono>
class circuit
{
public:
std::vector<prime_field::field_element*> circuit_val;
std::vector<int> size;
}C;
prime_field::field_element rou, inv_rou;
prime_field::field_element inv_n;
pri... |
c524b55016a8b6b07abb03eebd318106f1aa7ac3 | d6ad9dc9320e385924eef624fefec6ac75895b88 | chvck/kv_engine | /daemon/protocol/mcbp/dcp_noop_executor.cc | C++ | cc | 1,605 | no_license | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2017 Couchbase, 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
*
* ... |
b87e1cf5484def00aa0d7ff3a280907a32f6f029 | 13bb47b665f5cd8aa2087350ba19459ae9f8745d | nuraiman/intel-qs | /unit_test/include/two_qubit_register_test.hpp | C++ | hpp | 7,797 | permissive | #ifndef TWO_QUBIT_REGISTER_TEST_HPP
#define TWO_QUBIT_REGISTER_TEST_HPP
#include "../../include/qureg.hpp"
//////////////////////////////////////////////////////////////////////////////
// Test fixture class.
class TwoQubitRegisterTest : public ::testing::Test
{
protected:
TwoQubitRegisterTest()
{ }
// just... |
2e4607cce804b473e585599bf64cea0fc641c40a | d64aa7d43fad8aaab7b4de0e11efd0c1d36f8ceb | vanish87/CGG | /cgg07_Octrees/Renderer3DRaycasting.cpp | C++ | cpp | 2,168 | no_license | #include "Renderer3DRaycasting.h"
#include "Color.h"
#include "Scene3D.h"
#include "Mathtools.h"
#include "Ray.h"
#include "Object3D.h"
#include "Shader.h"
#include "Light.h"
#include <iostream>
Renderer3DRaycasting::Renderer3DRaycasting() : Renderer3D()
{
}
Renderer3DRaycasting::Renderer3DRaycasting(Camera3D& cam... |
9ca4c5ddaa2a76f7203f6aa9314ddc977139dc10 | 6af0e713475266c02d953d72996622673d76037d | chmodawk/fboss | /fboss/agent/hw/bcm/BcmCosQueueManager.cpp | C++ | cpp | 23,387 | permissive | /*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
02e9f785550bdaccb8af65b8401eeaaaa713a809 | 68ffe2f08713d70b021774a0dfa7c7e71ac9fb91 | imnate/Paper | /Statistics/SamplingCpp/Prime/1031538.cpp | C++ | cpp | 435 | no_license | #include <iostream>
using namespace std;
int main()
{
int interger, prime, c;
cout << "Please input an integer for listing all the primes less than the integer: " ;
cin >> interger ;
cout << "Primes less than " << interger << " are" ;
for(prime=2;prime<interger;prime++)
{
for (c=2;c<=prime;c++)
{
if (pri... |
02b4c72ae6cebbed336e699eb5644e8d5261116b | 7d8eaa14a7dc27cc9c6dad262f65f8c2c499f66f | cjpl/mdaq-midas | /roody/addons/main_el.cxx | C++ | cxx | 3,785 | no_license | //
// main.cxx
//
// $Id$
//
#include <cstdlib>
#include <iostream>
#include <string>
#include <getopt.h>
using std::cout;
using std::endl;
using std::cerr;
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#ifdef OS_UNIX
#include <unistd.h>
#endif
#ifdef OS_WINNT
#include <process... |
c5f1d2832d19334f7b812a71af7315840fc2738c | d3dd72c732b7a5535b8a45ffc82d383d7fd82086 | samdogangs91/BlackBoss | /BlackBoss_Server/src/Langage/Adjectif.cpp | C++ | cpp | 11,828 | no_license | #include "../../include/Langage/Adjectif.h"
#include "../../include/Langage/Mot.h"
#include "../../include/Database/Database.h"
#include "../../include/Database/DatabaseFun.h"
#include "../../include/Database/DatabaseMot.h"
#include "../../include/IA/phrase.h"
//#include "../../include/IA/BlackIa.h"
using na... |
327ad0f2c018ed632fb65f1927a19d5f9f12b74c | db7c1cd46d3447f3937d9e3998290b183cdefdf6 | CinusMinus/eol-cloth | /src/external/ArcSim/util.hpp | C++ | hpp | 6,808 | permissive | /*
Copyright ©2013 The Regents of the University of California
(Regents). All Rights Reserved. Permission to use, copy, modify, and
distribute this software and its documentation for educational,
research, and not-for-profit purposes, without fee and without a
signed licensing agreement, is hereby granted, provided tha... |
dc00e82564487e52cf16781430e8eb45c8d828f0 | 8c96ba250619b88fddba212b811921734fa98c80 | ShadyF/Competitive-Programming-Problems | /UVa/11933.-.Splitting.Numbers.cpp | C++ | cpp | 489 | no_license | #include <limits.h>
#include <cstdio>
using namespace std;
int n, a, b;
bool flag;
int main()
{
while(scanf("%d", &n) == 1)
{
if(n == 0)
return 0;
a = 0, b = 0, flag = true;
for(int i = 1, k = 1; k <= n && i < 32; k = 1 << i++)
{
if (k & n && flag)
{
f... |
3c7be4b74294eb6042fd4b8a651c6e980823ffe4 | 2faf3db048e9c4f359ce1b89f26ff6d3ba94ae6f | ecorman/WiiWhiteboard | /Calibration.cpp | C++ | cpp | 1,506 | permissive | // Calibration.cpp
// Implements the Calibration class representing the wiimote-to-screen calibration data
#include "Globals.h"
#include "Calibration.h"
////////////////////////////////////////////////////////////////////////////////
// Calibration::Mapping:
bool Calibration::Mapping::isUsable() const
{... |
bc4780d323bfc4c9693c5a9d9077d72ed975ac6d | 9bc067a9eac447fae342a6fc1413afe2964475c0 | strikersix23/ndk-arm32 | /ndk/renderscript/slang/slang_rs_reflection_state.cpp | C++ | cpp | 41,059 | permissive | /*
* Copyright 2017, The Android Open Source Project
*
* 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 applica... |
0462f9f6b3a12db7926346d45158ba49d9cb8927 | b0b4f353460ae451158999ed281170c2720fba58 | profornnan/Problem-Solving | /BOJ/강한 연결 요소/2150-Strongly Connected Component.cpp | C++ | cpp | 1,197 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
using namespace std;
constexpr int MAX_V = 10000;
int V, E, dcnt, dfsn[MAX_V + 1];
vector<int> adj[MAX_V + 1];
bool finished[MAX_V + 1];
vector<vector<int>> scc;
stack<int> st;
int dfs(int now) {
int nowMinDfsn = dfsn[now] = ++dcnt;
st.pus... |
2fafba17db894c788ce6941cd8a181a15168b1e8 | 641ae82dcd9096d942e7ab0679d583a3a09b09d8 | Abius-Dev/B4DB4B3-RAT | /B4B3-RAT/Stub/WinMain.cpp | C++ | cpp | 7,512 | permissive | /*
MIT License
Copyright (c) 2020 4B4DB4B3
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... |
af406daab12242809eb344ed8007090b073cd9ca | 2630ea6a3d89522afbdf604ea9465de67571353f | ishine/neuralLOGIC | /C++/lbann/include/lbann/layers/transform/concatenation.hpp | C++ | hpp | 11,113 | permissive | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... |
555c95bc775b7776524ff42364754c096f2c3739 | c5dd583ee3b034d86ac8f24690addcb5974c975c | ljw-LAB/Network_Programming_win | /Part2/ex18_1/thread1_win.cpp | C++ | cpp | 1,690 | no_license | // #pragma comment( lib, "ws2_32" )
// #include <stdio.h>
// #include <stdlib.h>
// #include <Windows.h>
// #include <process.h>
// DWORD WINAPI ThreadFunction(void* arg);
// int main(int argc, char** argv)
// {
// HANDLE hThread;
// DWORD dwThreadID;
// hThread = (HANDLE)_beginthreadex(NULL, 0, ThreadFu... |
f847f54ac049600406f2d08be2446fb5e9b04d4f | 721851bc8f4c2bd8475165164fe4b44f4dc893af | skarthik0196/VolumetricLighting | /Source/VolumetricLightingDirectX/Frustum.cpp | C++ | cpp | 3,330 | no_license | #include "pch.h"
#include "Frustum.h"
namespace Rendering
{
Frustum::Frustum()
{
}
Frustum::~Frustum()
{
}
void Frustum::ConstructFrustum(float farPlane, const DirectX::XMFLOAT4X4& projectionMatrix, const DirectX::XMFLOAT4X4& viewMatrix)
{
auto localProjectionMatrix = projectionMatrix;
float zMinimum =... |
0630739b31ea1abeedf260c0a7cf9f1772f4319c | 9c2430b28ea44d20f7f065ce729fe288ed001b8f | chkob/forked-blaze | /blazetest/src/mathtest/smatdmatschur/LCaUDb.cpp | C++ | cpp | 4,185 | permissive | //=================================================================================================
/*!
// \file src/mathtest/smatdmatschur/LCaUDb.cpp
// \brief Source file for the LCaUDb sparse matrix/dense matrix Schur product math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// Thi... |
a2de15c493fa113d4ce068b737a52b78283d83ac | 123f943a246ce17893069162e5f1cea17e2807c9 | utk-team/utk | /include/utk/metrics/Spectrum.hpp | C++ | hpp | 13,766 | permissive | /*
* Coded by Hélène Perrier helene.perrier@liris.cnrs.fr
* and Bastien Doignies bastien.doignies@liris.cnrs.fr
* and David Coeurjolly David.coeurjolly@liris.cnrs.fr
*
* Copyright (c) 2023 CNRS Université de Lyon
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* ... |
c5c2026a85a32a8a8d4bab376dc0628f9e77d4ee | 0e46b4fff2d2db8298cc0786a8b7ada69a176e9f | martinlindelof/ofxUtils | /src/PointUtil.cpp | C++ | cpp | 3,488 | no_license | #include "PointUtil.h"
namespace utils{
//--------------------------------------------------------------
float Point::angle( ofPoint p0 ){
// get the angle
return (atan2(p0.y, p0.x));
};
//--------------------------------------------------------------
float Point::angleBetween( ofPoint p0, ofPoint p1 ){
... |
d18240806debafe9d3269a5d23350f233451d144 | 1fe0d70705e05535a502d68a9fdf0c4fa5f9dfa0 | jhnaldo/problem-solving | /acmicpc/cpp/2587.cc | C++ | cc | 524 | no_license | #include <stdio.h>
void sort(int arr[], int size){
int i, j;
for (i = 0; i < size; i++){
int min = i;
for (j = i+1; j < size; j++){
if (arr[min] > arr[j])
min = j;
}
int tmp = arr[i];
arr[i] = arr[min];
arr[min] = tmp;
}
}
int mai... |
5f3c570f5d6ec9d702aa68a418361dbc2060d9cd | 9c991c1c343393caeb4521ae2ce3443e0920ef04 | JeromeVaglienti/HackNSlash | /Source/HacknSlash/HacknSlashPlayerController.cpp | C++ | cpp | 5,154 | no_license | // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "HacknSlashPlayerController.h"
#include "Blueprint/AIBlueprintHelperLibrary.h"
#include "Runtime/Engine/Classes/Components/DecalComponent.h"
#include "HeadMountedDisplayFunctionLibrary.h"
#include "Skill/SkillManagerComponent.h"
#include "Kismet/Kis... |
e4aa4d9b25e34f5112c93ca4498302d5841114a0 | e3af156bc3f07be37fa92c10d18152fb83997de7 | TeamVault/tauCFI | /C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-4917.cpp | C++ | cpp | 2,893 | no_license | struct c0;
void __attribute__ ((noinline)) tester0(c0* p);
struct c0
{
bool active0;
c0() : active0(true) {}
virtual ~c0()
{
tester0(this);
active0 = false;
}
virtual void f0(){}
};
void __attribute__ ((noinline)) tester0(c0* p)
{
p->f0();
}
struct c1;
void __attribute__ ((noinline)) tester1(c1* p);
struct c1
{
bool ac... |
dc149bce13704b3e2a08930b42dff9079be74254 | 3f085e89a97d60f6963985628b0de9b205b43437 | phyBrackets/CSES-PROBLEM-SET | /number spiral.cpp | C++ | cpp | 595 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
ll r, c;
cin >> r;
cin >> c;
ll ans = 0;
ll z = max(r, c);
ll z2 = (z - 1) * (z - 1);
if (z % 2 == 0)
{
if (z == c)
{
ans = z2 + r;
}
else
{
ans = z2 + 2 * z - c;
}
}
else {
if (r == ... |
34f35da577bfa8e5d4ded248e53b5744a48aeac5 | fdb7d7b7b36ebb155aa5f0b88165323c89e285d3 | RetronixTechInc/android-retronix | /hardware/broadcom/wlan/bcmdhd/wifi_hal/wifi_hal.cpp | C++ | cpp | 33,483 | no_license | #include <stdint.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
#include <linux/rtnetlink.h>
#include <netpacket/packet.h>
#include <linux/filter.h>
#include <linux/errqueue.h>
#include <errno.h>
#include <linux/pkt_sched.h>
... |
793276a069440d80c2d9de331acf26b4f8eb4aef | f444e45a6c07f18f9ef113a3470fe59e27a077f1 | snhill2005/sdl_core | /src/components/application_manager/test/commands/hmi/simple_requests_to_hmi_test.cc | C++ | cc | 13,720 | no_license | /*
* Copyright (c) 2016, Ford Motor Company
* 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 condit... |
47db5e26a35e89649a1288f8c32dc9ac319c9a11 | 3fe4436e1e97e2714b794ced126750c0639248ff | fiskercui/testcommon | /third/boost/boost/mpl/set/set20.hpp | C++ | hpp | 1,184 | permissive |
#ifndef BOOST_MPL_SET_SET20_HPP_INCLUDED
#define BOOST_MPL_SET_SET20_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.tx... |
3c045440910dafaffb657f5bc675dc1499d68af4 | 53fad60fd75bc71ab8470f62c01b3867b7a3df61 | metux/chromium-suckless | /third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp | C++ | cpp | 8,399 | permissive | /*
* Copyright (C) 2013 Google 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 conditio... |
cdaeaa77a22859e7e52e2151aa9d216dfabfb789 | 378b907546809151470a16e90ad8fe29c8812a15 | DerBaer0/CastXML | /src/Detect.cxx | C++ | cxx | 7,726 | permissive | /*
Copyright Kitware, 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, sof... |
97546bdb16d5672fd2839db4c9bf6f9e94b41635 | 46535c3831d9a4215d128a9065e8acfb8184f16a | prprprpony/oj | /zj/b837.cpp | C++ | cpp | 556 | no_license | #include <bits/stdc++.h>
using namespace std;
int f[64];
int main()
{
ios_base::sync_with_stdio(false);
f[1] = 1;
int n;
for (n = 2; (f[n] = f[n-2] + f[n-1]) <= 1e6; ++n);
int t;
cin >> t;
while (t--) {
int a, b;
cin >> a >> b;
if (a > b)
swap(a, b);
... |
b9b2fa8162455b5bdf28ea672a759f9a307c1891 | 2964fdf66e4850c45e0db41f12b34c5ff9e6127d | Cola20150301/chain33-qt | /src/menu/editaddressdialog.cpp | C++ | cpp | 6,791 | no_license | #include "editaddressdialog.h"
#include "ui_editaddressdialog.h"
#include "addresstablemodel.h"
#include "guiutil.h"
#include "enumtype.h"
#include "base58.h"
#include "basefuntion.h"
#include <QDataWidgetMapper>
#include <QMessageBox>
#include <QPushButton>
EditAddressDialog::EditAddressDialog(EditAddressDialogMode... |
b22311f8f81578d725a2030e2bfff77a0912d6c6 | f6352602be5d3206ed9256d8e73a08745e9332e7 | zhuguoliang/heterogeneity-aware-lowering-and-optimization | /tests/unittests/lit_cases/test_tensorrt/test_argmin_no_keepdims_random_tensorrt.cc | C++ | cc | 1,506 | permissive | //===-test_argmin_no_keepdims_random_tensorrt.cc-----------------------------------------------------------===//
//
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You m... |
3d3a412d55544f9fd195d5550a30da894e22374a | 8e0eca02ce607f052a667b16c6bf1613a1fc361c | obs145628/ai-cpp | /include/ai/graphics/gui-lib.hh | C++ | hh | 1,170 | permissive | #pragma once
#include "color.hh"
#include "bim/img.hh"
namespace guilib
{
void clear();
void draw_pixel(int x, int y, const Color& c);
void draw_line(int x1, int y1, int x2, int y2, const Color& c);
void draw_circle(int x1, int y1, int r, const Color& c);
void fill_circle(int x1, int y1, int r, c... |
4a79cf0bb18a853f618b402279d26bf7480197d6 | 4f665c8af56af4162a50d066b56c5517439e60a2 | zowhair/chromium | /chrome/browser/profiles/profile_impl.cc | C++ | cc | 54,182 | permissive | // Copyright (c) 2012 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 "chrome/browser/profiles/profile_impl.h"
#include <stddef.h>
#include <memory>
#include <set>
#include <utility>
#include <vector>
#includ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.