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 |
|---|---|---|---|---|---|---|---|---|
bd7a50853ccba0fb454730d6ec72a829b366aa60 | 5b4a0f44c5ba506c0444b6e083d8c3d5a3ec7710 | bqv/charybdis | /matrix/event_refs.cc | C++ | cc | 4,143 | permissive | // Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice... |
1236023a1c3ab0a31125f2fba4cde494bd3cb877 | de1593129fef7de5e686ae834eab235638997b46 | SBAM/mfmat | /unit-tests/ct_compare_ops.cpp | C++ | cpp | 1,632 | no_license | #define BOOST_TEST_MODULE mfmat
#include <iostream>
#include <boost/test/unit_test.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <mfmat/fwd.hpp>
BOOST_AUTO_TEST_SUITE(ct_compare_ops_test_suite)
BOOST_AUTO_TEST_CASE(integer_compare)
{
auto mat = mfmat::ct_mat<std::int32_t, 2, 3>
({
{ ... |
c1a0de4267dabedb17b40feb0de38892d4d2ee4b | 8b579713bfe5f9779505a45f77f66612c448f286 | Yanpas/ccls | /src/messages/textDocument_signatureHelp.cc | C++ | cc | 7,116 | permissive | /* Copyright 2017-2018 ccls Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
3de922c6ffa9681851fe0d6e4e0a86e79a8db0c1 | 1654cbdf42be9f8c74269368d7e9423c533a11ca | prasannabisen/my-code- | /recursion/count Binary String.cpp | C++ | cpp | 227 | no_license | #include<iostream>
using namespace std;
int binary(int n)
{
if (n == 0)
{
return 1;
}
if (n < 0)
{
return 0;
}
int k = binary(n - 1) + binary(n - 2);
return k;
}
int main()
{
int n;
cin >> n;
cout << binary(n);
} |
b05f8ca11bc82033d0aa52e3603745fb90554bca | f9b2f76a1c3190a9cdfbc77bb9178299d172dbd9 | jgoday/gdal | /gdal/frmts/gtiff/tifvsi.cpp | C++ | cpp | 9,163 | permissive | /******************************************************************************
*
* Project: GeoTIFF Driver
* Purpose: Implement system hook functions for libtiff on top of CPL/VSI,
* including > 2GB support. Based on tif_unix.c from libtiff
* distribution.
* Author: Frank Warmerdam, warm... |
063d9a5c58883076f8305742f18f652c5fbfe713 | aec50585f2eb1fced940b5e1076b0064c3e26489 | artisdom/cppystruct | /tests/pack_test.cpp | C++ | cpp | 2,154 | permissive | #include "cppystruct.h"
#include "constexpr_require.h"
#include <catch.hpp>
using namespace std::string_view_literals;
template <size_t ArrSize>
constexpr bool operator==(const std::array<char, ArrSize>& arr, std::string_view str)
{
// Assumming that str is a string literal
if (ArrSize != str.size()) {
retur... |
6aa3b144488affc2e0ba051ba96c2f7898f5be5d | 0cfaae174140f503431e54f80ef4053f868995d6 | Consortium3000/Consortium | /src/qt/transactiondesc.cpp | C++ | cpp | 14,764 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2019 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "transactiondesc.h"
#i... |
cc15d810b9f603360d9672cf5ccf4be5148aee7e | 8acb0d1540d4633cc235ebc2d1040deaf54ac3b7 | ynctl240398/DoAnGame-castlevania | /Game_16521562_16521454/Castlevania/HeadDracula.cpp | C++ | cpp | 1,087 | no_license | #include "HeadDracula.h"
#include "debug.h"
void CHeadDracula::Update(DWORD dt, vector<LPGAMEOBJECT>* coObjects)
{
CGameObject::Update(dt, coObjects);
x += dx;
y += dy;
if (y <= HEAD_FLY_HEIGHT && state != HEAD_STATE_FLY_AWAY
&& state != HEAD_STATE_INVISIBLE) SetState(HEAD_STATE_IDLE);
}
void CHeadDracula::Ren... |
45fd67315a7efed38372a2cad095286db0b88918 | d79709bb5c4ba603de29a5b68fb444df0f2de3fb | cau-se/sprat-pde-dsl | /pdedsl/proto_matrix.hpp | C++ | hpp | 4,554 | permissive | /*
* Copyright 2014-2015 Arne Johanson
*
* 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... |
eb522f6dae35a3a9ec5f45989566a42cefc2c89a | 70391c738af2092a831982f9481168b000fa5ef6 | Skjz/15P | /Snack/Snack/Drawbase.cpp | C++ | cpp | 1,220 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include"DrawBase.h"
void Write_Char(int x, int y, const char* str, int Color)
{
//用来设置光标具体坐标的pos
COORD pos = { 2*x,y };
//获取句柄
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
//设置光标位置
SetConsoleCursorPosition(hOut,pos);
//设置文本颜色
SetConsoleTextAttribute(... |
ccbd5929fab49600495f88ca5f3460b7e0fc3a4e | 6879863f25e0f21bb442f6f0fe999e5180c06c05 | Dawn-of-gods/Final-Fantasy-Dawn-of-Gods | /Motor2D/MagicBolt.cpp | C++ | cpp | 2,708 | permissive | #include "MagicBolt.h"
#include "j1ModuleCamera2D.h"
#include "j1Input.h"
#include "j1ParticlesClassic.h"
#include "j1AttackManager.h"
#include "j1EntityFactory.h"
MagicBolt::MagicBolt(fPoint pos, fPoint destination, uint speed, const j1Entity* owner)
: Projectile(pos, destination, speed, owner, "MagicBolt", PROJECTIL... |
24574672641823f285f77bb279ae8d3cafee7917 | 055659007c435474d629d0e2c9047c41c8cb2c4c | akhikolla/RcppDeepStateTest | /issuestests/aphid/inst/testfiles/probDNA/libFuzzer_probDNA/probDNA_DeepState_TestHarness.cpp | C++ | cpp | 1,352 | no_license | #include <fstream>
#include <RInside.h>
#include <iostream>
#include <RcppDeepState.h>
#include <qs.h>
#include <DeepState.hpp>
double probDNA(int x, NumericVector probs);
TEST(aphid_deepstate_test,probDNA_test){
static int rinside_flag = 0;
if(rinside_flag == 0)
{
rinside_flag = 1;
RInside R;
} std::... |
dfbe0ef5d1b766b5755fd1a739b34e6e820c9451 | 442ce966b19f2b58b1b1e68a64f52a51d67a8697 | riiji/ComputerGraphics2sem | /Lab1/PNMLab/p5_list.cpp | C++ | cpp | 1,625 | no_license | #include "p5_list.h"
#include <iostream>
#include "operations.h"
#include <tuple>
using namespace std;
p5_list::p5_list(const int width, const int height)
{
if (width <= 0 || height <= 0)
throw exception("invalid height/width value");
this->height = height;
this->width = width;
pixels = vecto... |
76553305b33eeea05f0eee7b9de624591b4fcee1 | 867743636befbd4dc1297028569883689e420ba3 | tryewq/Experiment-3 | /Problem1.cpp | C++ | cpp | 820 | no_license | #include<iostream>
#include<cstring>
#include<conio.h>
using namespace std;
int main()
{
cout << "Enter 10 elements" << endl;
double digits[11], sum = 0, ave, small, large;
for (int a = 1; a < 11; a++)
{
cout << "Entry #" << a << ": ";
cin >> digits[a];
}
for (int a = 1; a < 11; a++)
{... |
a6d073c1fdbeb35b699ab07a12a168f3d169ed1b | cf3d1ed8b6d532fb5967824d99876fd4cb31babb | AugustoDipNiloy/Uri-Solution | /C++/uri1114.cpp | C++ | cpp | 284 | permissive | #include <bits/stdc++.h>
using namespace std;
int main(void)
{
string s;
while(cin >> s){
if(s == "2002"){
cout << "Acesso Permitido" << endl;
break;
}
else
cout << "Senha Invalida" << endl;
}
return 0;
}
|
35986572e75437619d5a7fa0b1ab05e6505e4dda | 1111155ec77a41d9a89967ee8251c132456ba17d | kyduke/Coding | /LeetCode/232_QueueUsingStacks.cpp | C++ | cpp | 1,656 | no_license | // https://leetcode.com/problems/implement-queue-using-stacks/
#include <iostream>
#include <stack>
using namespace std;
class Queue {
private:
stack<int> front;
stack<int> back;
int lastCommand;
void swapStacks() {
if (front.empty()) {
while (!back.empty()) {
front.push(back.top());
back.pop();
... |
6a03df907d0ab17bfbb5c341e23c59b5316895a6 | 6e480ef229d551b4de041ba020b70a3c2e75e838 | fishflying3891/udacity-robotics-software-engineer | /Project1/script/hello.cpp | C++ | cpp | 384 | no_license | #include <gazebo/gazebo.hh>
namespace gazebo
{
class WorldPluginMyRobot : public WorldPlugin
{
public: WorldPluginMyRobot() : WorldPlugin()
{
printf("Welcome to Fei Yu's world!\n");
}
public: void Load(physics::WorldPtr _world, sdf::ElementPtr _sdf)
{
... |
de72efbf2b79a4f10462c3695b2c3cc3ea33abd9 | 41ec987b7cc639c43f655997275aa6843445f72f | Hkiller/workspace | /src/gdpp/utils/FileIdGenerator.cpp | C++ | cpp | 865 | no_license | #include "gd/app/app_context.h"
#include "gdpp/app/Log.hpp"
#include "gdpp/utils/FileIdGenerator.hpp"
namespace Gd { namespace Utils {
FileIdGenerator & FileIdGenerator::instance(gd_app_context_t app, cpe_hash_string_t name) {
gd_id_file_generator_t r = gd_id_file_generator_find(app, name);
if (r == NULL) {
... |
e43ff88b4d39903ff313ce10cd326e7f5e7786f7 | 2abb43cbfc35cf72c1eb793ffdd89a8b6c12793b | chenAsaraf/Assignment-3-CPP | /PhysicalNumberTest.cpp | C++ | cpp | 2,633 | no_license | /**
* Examples of automatic tests for the exercise on physical numbers.
*
* @author Erel Segal-Halevi
* @since 2019-02
*/
#include <iostream>
#include <sstream>
using std::cout, std::endl, std::istringstream;
#include "PhysicalNumber.h"
using ariel::PhysicalNumber, ariel::Unit;
#include "badkan.hpp"
int main() {... |
d8600a2be6d79db4e26a87eb7d102bcf69810961 | eb60a6208b92a38e3804ff1610bdb5f44c82abfa | walter0614/Exercises-C | /9 Ejercicios/Trabajo 1/programa 1.cpp | C++ | cpp | 421 | no_license | #include <iostream>
using namespace std;
int main()
{
int temp;
cout<<"\n\tIngrese la temperatura en grados centigrados\n"<<endl;
cout<<"\t-->\t";
cin>>temp;
if(temp<25)
cout<<"\n\tLa temperatura es Fria\n"<<endl;
if(temp==25)
cout<<"\n\tLa temperatura es Calida\n"<<endl;
if(temp>... |
2e3647289e7c7ace7fb24385d7c8b0261aabeb05 | b678d0756630237b6970f6cd6abd58c14371c960 | 11Takanori/envoy | /test/common/grpc/google_async_client_impl_test.cc | C++ | cc | 4,570 | permissive | #include "envoy/stats/scope.h"
#include "common/api/api_impl.h"
#include "common/event/dispatcher_impl.h"
#include "common/grpc/google_async_client_impl.h"
#include "common/stats/isolated_store_impl.h"
#include "test/mocks/grpc/mocks.h"
#include "test/mocks/tracing/mocks.h"
#include "test/proto/helloworld.pb.h"
#incl... |
eeb810cdb1bc007280f2ca0591c7b73e3b57a2d5 | fffd69cfd20f468ad4f7262c7bc85f449e12bc79 | tryce404/CTCI | /02_LinkedLists/2_2_getFromEnd/main.cpp | C++ | cpp | 859 | no_license | #include "../linkedList.h"
#include <iostream>
#include <set>
using namespace std;
template <typename T>
int list<T>::getSize() {
node<T> *current = new node<T>;
current = head;
int size = 0;
while(current != NULL) {
current = current->next;
size++;
}
return size;
}
template <typename T>
T list<T... |
3102418d4d0a11f17377430f9fddde3b0f32160d | 127fee11c99cf9feadab3bfdc951317533cb7962 | Samsung/Castanets | /storage/browser/fileapi/file_stream_test_utils.cc | C++ | cc | 2,101 | permissive | // Copyright 2019 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 "storage/browser/fileapi/file_stream_test_utils.h"
#include <string>
#include <utility>
#include "net/base/io_buffer.h"
#include "net/base/net_... |
3522a40d585bbbcd1ae4e2e72d888cefdc0d9b14 | 6b395c140720aca5340c767d725dc4c1fb090a12 | jiehuali/ExcelFormat | /src/BasicExcel.hpp | C++ | hpp | 62,775 | permissive | // Created by Yap Chun Wei
// Version 1.0 (20 April 2006)
// Version 1.1 (22 April 2006)
// - Fixed bugs with compound files not being able to write files more than 65535 bytes.
// - Fixed bugs with reading and writing to Excel files containing many strings.
// Version 1.2 (30 April 2006)
// - Added operator<< to p... |
ccca12c604f2ba42bb1161fd71ba28f7e12d9e22 | 46a747b713cd929d51376fe5e1eaacc0edae5a35 | zH4x-SDK/zWeHappyFew-SDK | /SDK/InteractiveDoor_MilitaryBridge_MetalDoor_functions.cpp | C++ | cpp | 948 | no_license |
#include "../SDK.h"
// Name: WeHappyFew, Version: 1.8.8
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------
// Function InteractiveDoo... |
ce789566471bfb3126c8e8d3385e1c141365347f | b893d0031653aafd68922bee52e8944b9beffa31 | LEECHHE/acmicpc | /solved/2357.cpp | C++ | cpp | 1,781 | no_license | #include <cstdio>
#include <algorithm>
#include <vector>
#include <utility>
#include <queue> //priority queue
#include <functional>
#include <cmath>
#include <stack>
#include <iostream>
#include <cstdlib>
#include <limits>
#include <cstring>
#include <map>
using namespace std;
int mintree[300000];
int maxtree[300000... |
1ce5b30d4e8f3a0709d53f98b77a58e8c703121e | 259305c07a663862fe02d1692a3bda50c9969374 | DuraAce/stanford_algo_cpp | /inversions_BF.cpp | C++ | cpp | 1,127 | no_license | #include <bits/stdc++.h>
using namespace std;
vector <int> readFromFile(string FileName)
{
ifstream fin(FileName);
std::vector<int> data;
int element;
while (fin >> element)
{
data.push_back(element);
}
return data;
}
long long int inversion (vector<int> & data)
{
... |
2805802a4a623377654eed4a6b3c7e9a3edbdd38 | be06598d6fd7b2209f788303d0857033e6331299 | skaupper/HSC | /ue3-7/src/sim/cordic_cc.cpp | C++ | cpp | 3,205 | no_license | /*****************************************************************************/
/**
* @file cordic.cpp
* @author Michael Wurm <michael.wurm@students.fh-hagenberg.at>
* Sebastian Kaupper <sebastian.kaupper@students.fh-hagenberg.at>
* @brief Implementation of a cycle accurate Cordic algorithm
*/
/****... |
3133ecd4e1753c150927c50d0237edde5fed956f | 6656752b8415c91310694103f9c2b853b9b5028d | francolerch/Cpp-Exercises-2018 | /Class7/Class7/src/Citizen.cpp | C++ | cpp | 860 | no_license | #include "Citizen.h"
namespace cpp_class7 {
Citizen::Citizen(const BirthDate& birthDate, const std::string& name, const std::string& lastName, const Gender& gender) :
m_birthDate(birthDate), m_name(name), m_lastName(lastName), m_gender(gender)
{
};
Citizen::Citizen(const Citizen& citizen) :
m_birthDate(citize... |
488ed7bafc093d80a31cd3939bb77f79757bb05c | d10d3035aff0a23ff75aa76e277e1b4bd9202f70 | yajunseo/Algoritm | /greedy/1783_병든나이트.cpp | C++ | cpp | 487 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
#include <time.h>
#include <algorithm>
using namespace std;
int n, m;
int main()
{
cin >> n >> m;
if (n == 1)
cout << "1" << endl;
else if (n == 2)
{
if (m >= 9)
cout << "4" << endl;
else
cout << (m + 1) / 2 << endl;
}
... |
f8a030b716673a76c2129615a5a28f409519118f | a4c0d58a9dca3222e024df99de1be674de54a9e2 | w1146869587/SortAlgorithmDisplay | /排序算法的动态图形可视化/MainFrm.cpp | C++ | cpp | 12,634 | no_license |
// MainFrm.cpp : CMainFrame 类的实现
//
#include "stdafx.h"
#include "排序算法的动态图形可视化.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWndEx)
const int iMaxUserToolbars = 10;
const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40;
const UIN... |
a2263adbff62c5b55e1459f5b2eac92a6450cd4d | 0ddabd987ae2fb413bdd41580efadb30169e5775 | bangongzi/LearningLinux | /trans.cpp | C++ | cpp | 641 | no_license | #include <iostream>
#include <string>
using namespace std;
int bto (string str)
{
int len, temp, result = 0;
int ratio = 1;
len=str.size();
for (int i = 0 ; i < len;i++)
{
temp = str[len-1-i] - '0';
result = result + temp*ratio;
ratio = ratio * 2;
}
return result;
}
... |
8a2226fcc2815b1070a7d82c579fc9cdba3bc040 | 2f1f49c5feec97eb9e0a32ea4b5bf46cf0fa70c0 | bartoffw/himond | /src/test_client.cpp | C++ | cpp | 1,949 | permissive | #include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include "lib/system_monitor.h"
int main(int argc, char *argv[])
{
string ethInterface = "eth0";
if (argc > 1) {
string parameter = argv[1];
if ("--help" == parameter || "-h" == parameter) {
printf( "Usage: %s [<eth_interfa... |
76a437bc3ba115878238abae91ee528ef2769737 | 7297cf412869ab3201819f024cf441bf3a50285d | wilhelmtell/snake | /src/snake_direction_control.cc | C++ | cc | 2,877 | no_license | #include "snake_direction_control.hh"
#include <memory>
#include <utility>
#include "event_dispatch.hh"
#include "abstract_factory.hh"
#include "snake_direction_output.hh"
#include "direction.hh"
namespace snk {
snake_direction_control::snake_direction_control(event_dispatch* dispatch,
... |
239e8147cec5c6451ad700500f9c274dd633665e | 7b04e81c4833d17676d77bc3c9fb4388f1a46db3 | henfredemars/Fork-Lang | /llvm/lib/Target/X86/X86RegisterInfo.cpp | C++ | cpp | 28,628 | permissive | //===-- X86RegisterInfo.cpp - X86 Register Information --------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
7b7a2779b5142bfdb59afa8bd699348662512de0 | 6a70b767e3fbb6b338d6712d507b3ba4c593a173 | henryiii/GooFitX | /include/goofit/FitManager.hpp | C++ | hpp | 2,088 | no_license | #pragma once
#include "Global.hpp"
#include <memory>
#include <set>
#include <numeric>
#include <cmath>
#include "FCN.hpp"
#include "Params.hpp"
#include "Color.hpp"
#include "Minuit2/MnPrint.h"
#include <Minuit2/FunctionMinimum.h>
#include <Minuit2/MnMigrad.h>
#include <Minuit2/MnUserParameterState.h>
namespace G... |
e090ad2f82dd9f345fc7b1e028d1e51807ec480d | ae5fef118db35f843d652c7f052a7b6a19e00014 | tominal/OOP-Program_5 | /teamQueue.cpp | C++ | cpp | 2,950 | no_license | //teamQueue.cpp
//This is a linked-list based queue that inserts data values next
//to their "team" members.
/**
* @ConstructorName: default
* @Description:
* Initializes front, rear, and current pointers to NULL.
*/
template <class T> teamQueue<T>::teamQueue()
{
Front = Rear = curr = NULL;
}
/**
* @Method... |
adbd1baeb89d5a41382774b0d9765b63371d0bb3 | 4f5df49d33a2232b09cc76399b6c309ed45d8202 | thichraptancong/lab1oop | /lab1/point3d/main.cpp | C++ | cpp | 978 | no_license | #include <iostream>
#include <cmath>
using namespace std;
class point3d
{
private: double x,y,z;
public:
point3d(double a, double b , double c)
{
x = a;
y = b;
z = c;
}
double distanceFromCenter()
{
return distanceFrom(0,0,0);
}
double distanceFrom(point3d other)
{
... |
93206eed11565e38343a3ea419e0f698c82b5ab4 | 00fa66b759664486a0468fccd9f70e3e89f96f6f | brh68/Cislunar-Flight-Software | /Ref/Top/Components.hpp | C++ | hpp | 2,394 | permissive | #ifndef __LITS_COMPONENTS_HEADER__
#define __LITS_COMPONENTS_HEADER__
void constructRefArchitecture(void);
void exitTasks(void);
#include <Svc/ActiveRateGroup/ActiveRateGroupImpl.hpp>
#include <Svc/RateGroupDriver/RateGroupDriverImpl.hpp>
#include <Svc/CmdDispatcher/CommandDispatcherImpl.hpp>
#include <Svc/CmdSequenc... |
7ee20eddcedaea839420678fa87d2dca562d0229 | e49acb62f741186e7097ebc77ddb6e8cd9c9d102 | aorura/mozc | /src/win32/tip/tip_query_provider.cc | C++ | cc | 5,074 | permissive | // Copyright 2010-2021, 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 condit... |
ece2d2395fb3859276700e74a0f4db4abc2a16ce | 46faf6092308fb5f31776ba58cb6aba8ea42c385 | atarovart/HOMEWORK_Geek | /classes.cpp | C++ | cpp | 347 | no_license | #include <iostream>
#include <cmath>
using namespace std;
class Power
{
public:
void setPower(int a, int b)
{
m_a = a;
m_b = b;
m_c = pow(a, b);
}
int calculate()
{
cout << m_c << endl;
return m_c;
}
private:
int m_a;
int m_b;
int m_c;
};
int main()
{
Power power;
power.setPower(4, 3);
power.c... |
588b2d510d11374d0f769ba6f138119d7253cabe | aa4e4b600f79fd055923901c51ca21a7f190e6fa | overtalk/ARK | /src/base/AFArrayMap.hpp | C++ | hpp | 4,742 | permissive | /*
* This source file is part of ARK
* For the latest info, see https://github.com/ArkNX
*
* Copyright (c) 2013-2019 ArkNX authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
... |
45fd34b251d9a539a4d5d90de03db93eaa25ff27 | 06c0b85968685c0435caf5e70dcd3ad7c92c6ccf | Mynsu/Sirtet_SFML | /dlls/Game/scene/online/InRoom.cpp | C++ | cpp | 53,550 | permissive | #include "../../pch.h"
#include "InRoom.h"
#include "Online.h"
#include "../../ServiceLocatorMirror.h"
const uint8_t NULL_EMPTY_SLOT = 0;
const uint16_t ROTATION_INTERVAL_THRESHOLD_MS = 1000;
const uint16_t ALL_OVER_FREEZE_MS = 2000;
bool scene::online::InRoom::IsInstantiated = false;
scene::online::Participant::Par... |
415f21a771471a3177e91bab16b3c5df261b1162 | 5f5452febde2e200e1126b2a14aa641f72511ff0 | harshpreet0508/Algorithms-Made-Easy | /day06/2. Jump Game 2/solution.cpp | C++ | cpp | 340 | no_license | class Solution {
public:
int jump(vector<int>& nums) {
int j=0, e=0, f=0;
for(int i = 0; i < nums.size()-1; i++)
{
f = max(f, i + nums[i]); //farthest
if(i == e)
{
j++; //jumps
e = f;
}
}
... |
17c37395d5972bd3ff3fac1f0494c5ae5d90ce99 | 61c0bb8c6cc762abfedadb01eddc9167673bc225 | rituburman/hacktoberfest2020 | /leetcode solution/LargestRectangleOfHistogram.cpp | C++ | cpp | 1,119 | no_license | // Link : https://leetcode.com/problems/largest-rectangle-in-histogram/
class Solution {
public:
int largestRectangleArea(vector<int>& h) {
int n = h.size();
if(!n) return n;
stack <int> st;
int i = 0, ans = -1, curr = 0;
while(i<n) {
if(st.empty() || h[st.top()... |
e069ba91ff21ef278ce686825661c167084e8f0e | 3f2120cc8ae490b0558a365e537745ecac3ce7e5 | redisread/UE-Runtime | /Experimental/Voronoi/Private/voro++/src/common.hh | C++ | hh | 911 | permissive | // Copyright Epic Games, Inc. All Rights Reserved.
// Modified version of Voro++'s source file
// Voro++, a 3D cell-based Voronoi library
//
// Author : Chris H. Rycroft (LBL / UC Berkeley)
// Email : chr@alum.mit.edu
// Date : August 30th 2011
/** \file common.hh
* \brief Header file for the small helper f... |
185d4e4c22ab7171d7c77135dabff4ce71653010 | 76deeef8608dd5426e40397a24d56d35d67124f6 | Lobotuerk/ign-gazebo | /src/systems/logical_camera/LogicalCamera.cc | C++ | cc | 8,126 | permissive | /*
* Copyright (C) 2019 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
6e89738e8d89ae246047938a1772f443a88287b1 | 203a5d06d5fa936789f0eaa1133756be351e6e21 | chaws/ezparser | /parser/rules/additive_expression/additive_expression__multiplicative_expression.cpp | C++ | cpp | 270 | no_license | #include <ezrule.h>
#include <iostream>
using namespace std;
// AUTO-GENERATED
ezast * ezrule::additive_expression__multiplicative_expression(ezast * multiplicative_expression)
{
ezlog::debug("Calling additive_expression__multiplicative_expression");
return NULL;
}
|
ac694212ec18c598f10fbab7f1fdcbc9e979af12 | 0785550a99f1b5a73192e39284585a6e1818a86d | lcls-daq/pds | /usdusb/Fex.hh | C++ | hh | 690 | no_license | #ifndef Pds_UsdUsb_Fex_hh
#define Pds_UsdUsb_Fex_hh
#include "pds/config/UsdUsbFexConfigType.hh"
#include "pdsdata/xtc/XtcIterator.hh"
namespace Pds {
class Xtc;
class InDatagram;
class CfgClientNfs;
class Transition;
namespace UsdUsb {
class Fex : public XtcIterator {
public:
Fex(Cfg... |
db37b529a289cd67ceed8d42755c2ff5f65859d5 | feeca92d241de1d4fc638887ddbe8b37c47cedd6 | marromlam/lhcb-software | /LHCb/Event/EventPacker/src/component/CompareProtoParticle.cpp | C++ | cpp | 1,907 | no_license | // $Id: CompareProtoParticle.cpp,v 1.2 2009-07-09 09:44:16 cattanem Exp $
// Include files
// local
#include "CompareProtoParticle.h"
//-----------------------------------------------------------------------------
// Implementation file for class : CompareProtoParticle
//
// 2008-11-14 : Olivier Callot
//-----------... |
f5f7559ce07c99a2b1f3a335cd2905606d324173 | 33fc1f22018fef72411f3d19d76a8bde951b8ab4 | simmubhangu/ahir | /v2/Ahir-asm/devel/src/AaModule.cpp | C++ | cpp | 39,775 | permissive | //
// Copyright (C) 2010-: Madhav P. Desai
// All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal with the Software without restriction, including
// without limitation the rights to... |
7dc0d290678f97788d6e00e58c8648ee30797534 | 91ec312d1d713ef1c65a40ac23a2212a657c72d2 | AndreiMuntea/Contests | /Codeforces/313/313_A.cpp | C++ | cpp | 566 | no_license | // https://codeforces.com/contest/313/problem/A
// https://codeforces.com/contest/313/submission/14057579
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
long long n,aux;
cin>>n;
aux=n;
int lc,sc;
lc=abs(n%10);
aux=aux/10;
sc=abs(aux%10);
aux=aux/10;
if (n>... |
77920fff97489cfbb52bc3031ed82e27927cefa1 | 5dbc1023a186687ebe193007cf3658d0ada6b8e0 | MedulaOblogota/yap | /cpp/utils/rcstring/rcstring.hpp | C++ | hpp | 913 | no_license | #ifndef RC70_STRING
#define RC70_STRING
#include <iostream>
namespace ilrd
{
#include <cstddef>
// #include <cstdlib>
class RcString;
std::ostream& operator<<(std::ostream& os_, const RcString& string_);
class RcString
{
public:
RcString(const char* str=""); //must not be NULL. Non-explicit on purpose
R... |
fe98f01faa799e8184f0cc6322672b6a83e2ccd8 | 8b43afc583b1646b809140887cd79ce490c20394 | ahmed-dinar/lightoj-solved-problems | /1020 - A Childhood Game/1020 - A Childhood Game_451612.cpp | C++ | cpp | 2,326 | no_license | #include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<deque>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterato... |
f97fe0daabc715bcbd5363ab1661c9b73feeb99e | 6042a058581a7ba8e8fa595052668955d7206e08 | SiChiTong/ComponentRepository | /ComponentVisualization/smartsoft/src-gen/MarkerListTaskCore.cc | C++ | cc | 3,475 | no_license | //--------------------------------------------------------------------------
// Code generated by the SmartSoft MDSD Toolchain
// The SmartSoft Toolchain has been developed by:
//
// Service Robotics Research Center
// University of Applied Sciences Ulm
// Prittwitzstr. 10
// 89075 Ulm (Germany)
//
// Information abo... |
68b0bf2b3556882d9fc0cd34e0550ee4917db00e | cf4929373ab481c54201b5ffb61faca9f2f97585 | whip112/webdawplugins | /source/host/cpp/edawhost.cc | C++ | cc | 1,258 | no_license | //
// edawhost.cc
//
//
// Created by Jari Kleimola on 01/11/14.
//
//
#include "dawhost.h"
DAWHost host;
extern "C"
{
// const char* initBundle(int bufsize) { return host.initBundle(bufsize, true); }
// int createPlug(int index) { return host.createPlugin(index); }
const char* createPlugin(int plugid, int inde... |
d5b3b703a47207584ebd414f933498defd7051ac | 91e484643646c1bc4af228315142f7f0ee6f343d | 17671798605/ModbusTcp_win32 | /ModbusTcp/main.cpp | C++ | cpp | 768 | no_license | #include "M_Client.h"
#include<Windows.h>
#include<iostream>
#include <conio.h>
int main()
{
std::cout << "读取%MW0的数据,按Esc键退出" << std::endl;
int connect_error;
M_Client client("192.168.1.223", 502, 1);
printf("Waiting to connection\n");
connect_error = client.Connect();
unsigned char buf[12];
buf[0] = 0;
buf[... |
693a82e328625505e543aa8583ee24a765fbac72 | f3e98331da41b5fc540c21c5738e78b646c271e2 | shivenk78/ciSpeech | /src/sphinx/Recognizer.cpp | C++ | cpp | 7,985 | permissive | /*
Copyright (c) 2015, Patrick J. Hebron
All rights reserved.
http://patrickhebron.com
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 ... |
4b35132f5c9181112f957c3b193668cd679ffa6c | 1721a9e1b89066226ae75af0cd79cae60d59d44e | fzg780/miyoo-emu | /fba-miyoo-playable/src/cpu/z80/dz80.cpp | C++ | cpp | 185,849 | no_license |
#include "burnint.h"
#include "z80.h"
#define FALSE 0
#define TRUE 1
#define Z80_INLINE static
#define change_pc(newpc) Z80.pc.w.l = (newpc)
static Z80ReadIoHandler Z80IORead;
static Z80WriteIoHandler Z80IOWrite;
static Z80ReadProgHandler Z80ProgramRead;
static Z80WriteProgHandler Z80ProgramWrite;
static Z80Rea... |
635ee5969e010da8a1d617b37629acda1a9416bb | 43fd22013328e5c2b94aee93a3ec0d0e388d49d0 | blueprintmrk/hhvm | /hphp/runtime/vm/as-shared.cpp | C++ | cpp | 3,434 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
7deb60de2fc67b0c6beb2b58174ed8eac4ec05d2 | 636cd337a35726c29e1c0ece3d3ec172ca4905ef | MrGeorgeG/GAME-2013-GAME-ENGINE-FUNDAMENTALS-Lab-4 | /Source/Lab4_Xinlin_Gan/Lab4_Xinlin_GanCharacter.cpp | C++ | cpp | 3,998 | no_license | // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "Lab4_Xinlin_GanCharacter.h"
#include "UObject/ConstructorHelpers.h"
#include "Camera/CameraComponent.h"
#include "Components/DecalComponent.h"
#include "Components/CapsuleComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "... |
421fcf1b472dc9dc7a43fde51c35c2c418d3d107 | 8a04fe7870bf034ceebf7d3de6030fcb41ab3cf2 | skywalker888888/leetcode | /cpp/125. String to Integer (atoi)/125. String to Integer (atoi).cpp | C++ | cpp | 1,784 | no_license | /**
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
Notes: It is intended for this problem to be specified vaguely (ie, no given input specs). You are responsib... |
ec56002ff32a4b3a82fffb88086cfb53846203ad | b33f3e0573c0dad4615dd09ac7ba9f73dad4c2cf | idh37/testrepo | /Test_PC_Poker/framework_externals/NMSkinGDI_Old/SkinLib/ListCtrlEx.cpp | C++ | cpp | 41,223 | no_license | /******************************************************************************\
* file : ListCtrlEx.cpp
* created: 1997.09.22
*
* Zafir Anjum - Original author.
* Mark Findlay - IE4 fixes.
* Matthew Bells - Better TitleTips.
*
* description:
* A super CListControl.
* <P>features:
* <UL>
* <LI>Title Tip item exp... |
151eabc98c464cefe4f9c2854dad14e2b4dc71d9 | 6b5a4f970167a74aaf14c94b02bb78bac6cc1efb | jtg-gg/chromium.src | /content/browser/accessibility/browser_accessibility_auralinux.cc | C++ | cc | 28,747 | permissive | // Copyright (c) 2015 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 "content/browser/accessibility/browser_accessibility_auralinux.h"
#include <stdint.h>
#include <string.h>
#include "base/strings/utf_string... |
c5bede5ae974aa21adf4de49d9c8a11aee1ee3e7 | 5ccaea7f03ce21226fcb3ff2d7739f02d3e96431 | Heffie199/EdgeBoard_Experience | /src/W2/code/FPGA_EdgeBoard/sample_image_catdog/include/paddle-mobile/fpga/KD/pes/split_pe.hpp | C++ | hpp | 4,667 | no_license | /* Copyright (c) 2019 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... |
cedc1d6079600430285684c6d119edb48e9f3406 | bd4f1929e255594c423fa7081e91eb282b26c15a | hwangdav000/Ray_Tracer_OpenGL | /src/shader.hpp | C++ | hpp | 7,244 | permissive | // Copyright 2016 University of Minnesota
//
// SHADER Uses the BSD 2-Clause License (http://www.opensource.org/licenses/BSD-2-Clause)
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
// 1. Redistributions of source cod... |
c073acaa5f5ef8fa24639f375ab6acc2ef13f9f4 | a9806b39be4f8a4ee8832f7c743632754e360568 | ilke-torun/first_try | /main.cpp | C++ | cpp | 14,482 | no_license | #include <iostream>
#include "Classes_Hashing.h"
#include<bits/stdc++.h>
#include <sstream>
using namespace std;
HashMap::HashMap(int N)
{
table = new list<long long int>[N]; // create the hash table that consists of linked lists
}
int HashMap::FoldingFunc(long long int key)
{
long long int f1 = (key / 100000... |
4aa216507eb82c1fe16c188a9ff04a1ff1e41626 | ba67a495c09ef4520475c68377b08645e2359ad3 | samyam/DTCF | /pars.cc | C++ | cc | 8,661 | no_license | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <cassert>
#include <string>
#include <string.h>
#include <vector>
#include <sstream>
#include <algorithm>
#include <map>
#include<list>
#include <cstring>
#include <stdlib.h>
using std::ifstream;
const int MAX_CHARS_PER_LINE = 512;
... |
4cedc9997c5d03b7ccc3a417a0709fdd2e1098db | 40f46745da9b177e151bb60a7bb7e5e0a51f3196 | turingcompl33t/cpp-playground | /concurrency/utilities/Monitor.cpp | C++ | cpp | 1,207 | no_license | // Monitor.cpp
// Generic monitor class.
#include <mutex>
#include <thread>
#include <vector>
#include <future>
#include <string>
#include <iostream>
template <typename T>
class Monitor
{
private:
T t;
std::mutex m;
public:
Monitor(T t_ = T{})
: t{t_}
{}
template<typename F>
auto ope... |
15387f21395f36943bbad4ce9f2d4b2be4d9fb2f | 87d895284d41eaca7e5fab119b053f6c156450b4 | CU-0xff/juliet-cpp | /000/110/088/CWE672_Operation_on_Resource_After_Expiration_or_Release__list_int_64b.cpp | C++ | cpp | 2,911 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE672_Operation_on_Resource_After_Expiration_or_Release__list_int_64b.cpp
Label Definition File: CWE672_Operation_on_Resource_After_Expiration_or_Release__list_int.label.xml
Template File: sources-sinks-64b.tmpl.cpp
*/
/*
* @description
* CWE: 672 Operation on Resource A... |
75cd63038a16b8494554035aa5b9ea36bcef0977 | c9ac70063b957ce3615ed2e8e872a9abe2538eb0 | donRumata03/pythonic | /encoding/encoder.cpp | C++ | cpp | 3,399 | no_license | //
// Created by Vova on 24.05.2020.
//
#include "pythonic_pch.h"
#include <vector>
#include "encoder.h"
void set_utf8_in_console() {
#ifdef PYTHONIC_IS_WINDOWS
SetConsoleOutputCP(CP_UTF8);
system(("chcp "s + std::to_string(CP_UTF8)).c_str());
system("cls");
#endif
}
std::u8string as_u8string(std::str... |
6721a8cf3d32143e6b9881dae9147096c6f13b75 | a4883542e31a6211386b4eb759742ecfacfa07fe | alexandraback/datacollection | /solutions_5640146288377856_0/C++/nel215/a-small.cpp | C++ | cpp | 929 | no_license | #include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>
#define REP(i,x) for(int i=0 ; i<(... |
559dbf29064a47cdaeef6c5af692c6d5ac692041 | 10b5734b606d90ab7398bdadbb4566f25db05aab | lesunb/bsn | /src/sa-bsn/system_manager/adaptation_engine/src/ReliabilityEngine.cpp | C++ | cpp | 12,179 | permissive | #include "engine/ReliabilityEngine.hpp"
using namespace bsn::goalmodel;
struct comp{
template<typename T>
bool operator()(const T& l, const T& r) const
{
if (l.second != r.second)
return l.second < r.second;
return l.first < r.first;
}
};
ReliabilityEngine::ReliabilityEn... |
bd9cede8adc367bca97e78047ee072a5c28a46d6 | 5f462c8465a3cac79dd1e9b62e054efe06474f97 | ModeenF/beos-fakBEtur | /dialstat.cpp | C++ | cpp | 6,659 | permissive |
#include <Button.h>
#include <MenuField.h>
#include <MenuItem.h>
#include <PopUpMenu.h>
#include <String.h>
#include <StringView.h>
#include <TextControl.h>
#include <View.h>
#include "santa/ColumnListView.h"
#include "globals.h"
#include "fakdata.h" // toint...
#include "dialstat.h"
#include <stdio.h>
const uint32 ... |
f671b2d1685167c5e5dd1c5cc83d54e28217e1bc | a8cbc47a33ee2936f24e4b671ed5e7a411a52c7c | cran/Rwofost | /src/batch.cpp | C++ | cpp | 1,893 | no_license | /*
Robert Hijmans
June 2020
*/
#include <cmath>
#include <vector>
#include "wofost.h"
#include "Rcpp.h"
std::vector<double> WofostModel::run_batch(std::vector<double> tmin, std::vector<double> tmax, std::vector<double> srad, std::vector<double> prec, std::vector<double> vapr, std::vector<double> wind, std::vector<lo... |
04429e7389f2cd5757b4f14b119a7f332afa8e48 | 255b16d7d4d51f7472e60bd134cbcd5c2dc14579 | guarner8/uva-problems | /897/solution.cpp | C++ | cpp | 1,222 | no_license | #include <cstdio>
int an []= {2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 199, 311, 337, 373, 733, 919, 991};
int main() {
int prime;
scanf("%d", &prime);
//printf("%d %d %d\n", an[4], an[13], an[14]);
while (prime != 0) {
int i = 0;
int flag = 0;
if (prime < 10) ... |
a1f4709ee8eeae701e38517553920804eda1a2b6 | c13ae294cb8e346d8e84f38be17ffab27e7482b8 | chenhowa/rdbms | /src/headers/interfaces/hash/i_file_hash.hpp | C++ | hpp | 251 | no_license |
#ifndef I_FILE_HASH_HPP
#define I_FILE_HASH_HPP
#include "i_input_stream.hpp"
#include "i_output_stream.hpp"
class IFileHasher {
public:
virtual unsigned getBlockSize() = 0;
virtual ~IFileHasher() { }
};
#endif //I_FILE_HASH_HPP |
eba88b9e0fad7a53fc2d121cfc11db732fe2bd82 | 06882c0dfdd29347ccc2c459616b802f91609464 | bxxfighting/bitcoin | /src/rpc/mining.cpp | C++ | cpp | 45,639 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 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 <amount.h>
#include <chain.h>
#include <chainparams.h>
#include <consensus/co... |
53e7194c298892a33797ab1a8d2f8233cb839e64 | d79c130e8932487651acc6743d0d7e27c7518a84 | HowlTheHusky/vs2003 | /vs2003_cd01/Program Files/Microsoft Visual Studio .NET 2003/Vc7/VCWizards/mfcappwiz/templates/1036/dlgproxy.cpp | C++ | cpp | 3,206 | no_license | // [!output DIALOG_AUTO_PROXY_IMPL] : fichier d'implémentation
//
#include "stdafx.h"
#include "[!output APP_HEADER]"
#include "[!output DIALOG_AUTO_PROXY_HEADER]"
#include "[!output DIALOG_HEADER]"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// [!output DIALOG_AUTO_PROXY_CLASS]
IMPLEMENT_DYNCREATE([!output DIALOG_... |
82a8d7ce03eb49813cb5bf7a245fbf1c26707903 | 39758f6f1e1e9402ac34683d419c1afefafc02d9 | stevenstong/adobe-tools | /AdobeInDesignCCProductsSDK.2020/source/sdksamples/gotolasttextedit/GTTxtEdtActionComponent.cpp | C++ | cpp | 4,407 | no_license | //========================================================================================
//
// $File: //depot/devtech/15.0/plugin/source/sdksamples/gotolasttextedit/GTTxtEdtActionComponent.cpp $
//
// Owner: Adrian O'Lenskie
//
// $Author: pmbuilder $
//
// $DateTime: 2019/10/11 10:48:01 $
//
// $Revis... |
aefaa38e3d2615ee21b34cc1b4f10fbba2e4b2a4 | 71026d17a04008e979718a0dc5411dd64c41627c | qwertylevel3/T3project_0 | /Classes/HudEquipableInventoryMenu.cpp | C++ | cpp | 1,640 | no_license | #include "HudEquipableInventoryMenu.h"
#include "HudDescriptionMenu.h"
#include "HudMenuItem.h"
#include "ToolFunction.h"
#include "HudTrigEquipLeft.h"
#include "HudTrigEquipRight.h"
#include "HudTrigDrop.h"
#include "HudLayout.h"
#include "HudTrigThrow.h"
HudEquipableInventoryMenu::HudEquipableInventoryMenu()
:Hud... |
f7ad23a20bcee763cd6834f3cb948e20b1138703 | f8876040267471040d304172ff3972beb545dbbc | dancingpenguins/Big-Numbers | /Math/Mandelbrot/EditColorMapDlg.cpp | C++ | cpp | 6,980 | no_license | #include "stdafx.h"
#include "EditColorMapDlg.h"
#include "EditColorMapDlgThread.h"
#if defined(_DEBUG)
#define new DEBUG_NEW
#endif
CEditColorMapDlg::CEditColorMapDlg(CEditColorMapDlgThread *thread)
: CDialog(IDD, NULL)
, m_thread(*thread)
, m_selectedRectIndex(-1)
, m_state(IDLE)
{
}
void CEditColorMapDlg::DoDataE... |
727f607fb70a875629fcfeb988be36787a9d788e | b46273dd52fb5b65883cd82506b8c34bea5adaec | JinbaoWeb/ACM | /C++/201508131252.cpp | C++ | cpp | 2,258 | no_license | #include<map>
#include<string>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<vector>
#include<iostream>
#include<algorithm>
#include<bitset>
#include<climits>
#include<list>
#include<iomanip>
#include<stack>
#include<set>
#define clr(a,b) memset(a,b,sizeof(a))
#define M 1... |
33bf7bf6364b6a675af9f591db4043e9782c3959 | a4ae8283a8242c84e786a3b40384568354ddb89a | ExpLife/Norton_AntiVirus_SourceCode | /SolarisNAVScanner/olessapi/olestrnm.cpp | C++ | cpp | 4,412 | no_license | //************************************************************************
//
// $Header: S:/OLESSAPI/VCS/olestrnm.cpv 1.6 09 Nov 1998 13:42:26 DCHI $
//
// Description:
// File for stream name definitions.
//
//************************************************************************
// $Log: S:/OLE... |
d2ea4ef27b794a6d2b029507a190910df6fd806c | 862ae630ab987503507667694f895c9cb27d8ea5 | jjgrayg/Profiler | /profile.cpp | C++ | cpp | 1,441 | no_license | /*
* profile.cpp
*
* Created by Jonathan Maletic.
* Copyright 2021 Kent State University. All rights reserved.
* Spring 2021
* Modified by:
*
*/
#include "profile.hpp"
////////////////////////////////////////////////////////////////////////
// Prints out the profile.
//
// TODO: Very simple output, need ... |
3b0854a871bb935cc517c8e1e718b4d9cad47064 | b7814827287e339b2b6511fce5b1d9827dac0aa9 | kmtos/Tools | /Common/src/Common.cc | C++ | cc | 34,589 | no_license | #include "Tools/Common/interface/Common.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonSelectors.h"
#include "DataFormats/EgammaCandidates/interface/Photon.h"
#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
#include "RecoEgamma/EgammaTools/interface/Conver... |
536b67583e76692ae799dc5f97cb43a1acdb119e | 3d7864e34c8d942fc9df53c1ef3b10de029be0d7 | szerfas1/or-tools | /ortools/sat/sat_decision.cc | C++ | cc | 17,501 | permissive | // Copyright 2010-2018 Google LLC
// 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... |
d8db3baf8c457d5c543f5a9e0f788a5bd4ea6341 | 7256086b1d50e5f032811f5856d4904b0a42e3cd | RajithaKumara/nodejs-mobile | /deps/v8/src/arm/macro-assembler-arm.cc | C++ | cc | 126,359 | permissive | // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX.
#if V8_TARGET_ARCH_ARM
#include "src/assembler-inl.h"
#include "src/base/bits.h"
#include "src/base/di... |
5c9af3f423a2963cb33d3973324e99f036f93bcd | 5dc5071a69ed1f2cfa066d860ebb31d0ff41e833 | jaredbracken/libgdx | /extensions/gdx-bullet/jni/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp | C++ | cpp | 10,081 | no_license | /*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
P... |
53fc058a7731ae56d30cd7a7ba406598423886ed | e54eeb936aab440ffd9482e6a640734d2afbf9ed | Truelch/Projet-S6 | /src/Building.cpp | C++ | cpp | 4,548 | permissive | #include "Building.h"
#include "Box2D/Box2D.h"
#include "MapTile.h"
#include "Game.h"
#include "DisplayLayer.h"
#include "TileLayer.h"
#include "Player.h"
#include "EventHandler.h"
#include <algorithm>
Building::Building(): PhysicsDisplayable()
{
//
}
Building::Building(int x, int y, const char * filename, Game ... |
f3d049fce471990b59de9f77f1c122007a66edca | f8dfadab53575385962d0f01a95db5df2acb0b68 | shaoyangjiang/StudyNotes | /C++ builder/数据库/读取照片/Unit1.cpp | C++ | cpp | 2,187 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include <Jpeg.hpp>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//-----------------... |
90fb142d5153c3b4422c60dde74d553fecfba360 | 6296673cfe8626e1434ed10067d5bd4fb65a0980 | Wong-ZZ/Advent-of-Code-2020 | /Day 12/Day12P1.cpp | C++ | cpp | 1,139 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <cmath>
using namespace std;
int main() {
string line;
ifstream input("input.txt");
int x = 0, y = 0, direction = 0, val;
if (input.is_open()) {
while (getline(input, line)) {
val = stoi(line.substr(1));
... |
9dffc79a2225666408e2affbb4844c197bf4eebf | 0504c4b63caef5e3b643771fc13d53df7abda6f1 | vaibhavsinhvaghela/TicTacToe | /Tictactoeconsole.cpp | C++ | cpp | 2,261 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
//game peice
char X = 'X';
char O = 'O';
char clear = ' ';
char tie = 'T';
int turn = 0;
bool checkMove(vector<char>& board, int placement)
{
if(board[placement] == clear)
{
return true;
}
else
return false;... |
3f9fa275326ab1bb65f6552181e00b1bc7e4b9b0 | 55616a24418d3ee41a68213f3e4173675016cee1 | mitchute/EnergyPlus | /src/EnergyPlus/Humidifiers.cc | C++ | cc | 84,705 | permissive | // EnergyPlus, Copyright (c) 1996-2022, The Board of Trustees of the University of Illinois,
// The Regents of the University of California, through Lawrence Berkeley National Laboratory
// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
// National Laboratory, managed by UT-Batt... |
9ffb345474200189c53982e4f55f2931ca94652e | e4b27e1327bf2518c5f9f7898b3a4d3aa6dd064e | sdyl3/Independent-Projects | /BlackJack/Player.cpp | C++ | cpp | 3,076 | no_license | //
// Hand.cpp
//
#include "Player.h"
namespace cs31
{
Player::Player( ) : myNumberOfCards(0) // no Cards dealt yet
{
}
// for testing purposes
std::string Player::toString() const
{
std::string s = "";
for (int i = 0; i < myNumberOfCards; i++)
{
s += myCards[ i ].toString();
}
retu... |
4d658e2fae8e54d57e3757ff21f2bdab704b95f6 | 086b7b9cac9f3259ac41b7cc71f05e2d2f29465d | chamington/musicandtechiiprojectprogress | /controllers/.obj/moc_applicationcontroller.cpp | C++ | cpp | 3,803 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'applicationcontroller.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.8)
**
** WARNING! All changes made in this file will be lost!
**********************************************... |
acb1cecf39d3bb1489316301dac00f69a00198d2 | 43c91c2c9b4a46d8b2d3f2c7d80ef586df6583df | KHJcode/chromium | /extensions/browser/service_worker_task_queue.cc | C++ | cc | 25,445 | permissive | // Copyright 2017 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 "extensions/browser/service_worker_task_queue.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/c... |
bb158b3bbc1df570b83d9a1745f1de5040f1f055 | 35768fa405fdde0661d7e2972ae4ee990ea9c345 | BRAHMS-SystemML/brahms | /framework/channel/mpich2/mpi-support.cpp | C++ | cpp | 3,776 | no_license | /*
________________________________________________________________
This file is part of BRAHMS
Copyright (C) 2007 Ben Mitchinson
URL: http://brahms.sourceforge.net
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 ... |
bcecdd283c93809b9328d48a9948b017c324d790 | ca2935231392ed7946ca2ca06c3f501a112791e1 | nokia/cpputest | /tests/CppUTestExt/MockFailureTest.cpp | C++ | cpp | 12,286 | permissive | /*
* Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde
* 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... |
75cc88c0af407f9eebbd9c8c6e87280932e6e27b | e3f28812c3b67e1c376cc766ed1b02f7ecc8dc31 | cpkt9762/PPLAY_SDK | /SDK/PUBG_InGameMenuWidget_Gamepad_functions.cpp | C++ | cpp | 23,842 | no_license | // PlayerUnknown's Battlegrounds (2.6.23) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.