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 |
|---|---|---|---|---|---|---|---|---|
569027caed603792dfc05bdfaff2687fcf9877d0 | c1a59f4c24e585467fca937aabc7269aaa226785 | amkalsi/cmssw | /Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIO.cc | C++ | cc | 2,945 | permissive | #include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Alignment/CommonAlignment/interface/Alignable.h"
#include "Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters.h"
// this class's header
#include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIO.h"
//--... |
ea8d9f0c26ca9ca3a61625bcbc07470dbc7afaf0 | 4dc26101d936928b778d868cff60c49ad355605d | King00s/OJ100 | /74运费(分支结构).cpp | C++ | cpp | 472 | no_license | #include<stdio.h>
int main()
{
double s,p,w,f,d;
while(scanf("%lf%lf%lf",&p,&w,&s)!=EOF)
{
if(s<250)
d=0;
else if(s>=250&&s<500)
d=0.02;
else if(s>=500&&s<1000)
d=0.05;
else if(s>=1000&&s<2000)
d=0.08;
else... |
1ad3cb290ef7b04cc204823875fcd110cfa97408 | 96a2ba1627ae749a7b25fb7b72aefede5949c221 | blueboxd/chromium-legacy | /chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc | C++ | cc | 32,171 | permissive | // Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ra... |
a335fd1e0048be0d64f626ac4fba5622e6a7123b | c326acb8dcaac48cdb08b1993958ed6b94e29806 | Minjung-Kwon/PuzzleGame_20180651_Minjung-Kwon | /puzzlegame.cpp | C++ | cpp | 7,384 | permissive | #include <bangtal>// 방탈 라이브러리를 사용하기 위한 헤더 포함
#include <time.h>
#include <stdlib.h>
using namespace bangtal; // bangtal 네임 스페이스를 사용 선언
int main()
{
setGameOption(GameOption::GAME_OPTION_INVENTORY_BUTTON, false);
setGameOption(GameOption::GAME_OPTION_MESSAGE_BOX_BUTTON, false);
auto... |
8d7dc91f3452f6b8a066dd13961feeb63bcd4fe6 | e0bd9d1df714cf768eba1b20be79f673d5884865 | nnarain/VoxelEngine | /Chunk.cpp | C++ | cpp | 23,711 | no_license |
#include "Chunk.h"
#include "VoxelEngine.h"
#include <SGL/Math/Vector4.h>
#include <iostream>
#include <memory>
using namespace engine;
using namespace sgl;
Chunk::Chunk(int size) : Chunk(size, 1)
{
}
Chunk::Chunk(int size, float blockSize) :
_mesh(Mesh::Type::TRIANGLES, Buffer::Usage::STATIC_DRAW),
_size(siz... |
35cc68a1a91c22c99c50ffe948b2333c076d346c | 5893f223c074a22af52d2de109f8c71877857616 | ucb-hls/llvm | /lib/DebugInfo/DWARF/DWARFContext.cpp | C++ | cpp | 54,158 | permissive | //===- DWARFContext.cpp ---------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
9c6fe0cf7c58aea972877fb21b057056a82f8596 | 1cfcfc81ad6f233f0a775e5eae5d289c2146b65b | svrakiss/Speed-Sep-Monitoring2 | /src/messages/matlab_msg_gen/win64/src/object_analytics_msgs/src/object_analytics_msgs_TrackedObject_common.cpp | C++ | cpp | 8,799 | no_license | // Copyright 2019 The MathWorks, Inc.
// Common copy functions for object_analytics_msgs/TrackedObject
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4100)
#pragma warning(disable : 4265)
#pragma warning(disable : 4456)
#pragma warning(disable : 4458)
#pragma warning(disable : 4946)
#else
#pragma GCC d... |
f5eaae1913010609c8f75e9ccef27812f7e09b71 | 12c54ffbff431d667b850b394b62058017ad954c | chuxuewen/Avocado | /depe/v8/src/full-codegen/ppc/full-codegen-ppc.cc | C++ | cc | 131,356 | permissive | // Copyright 2014 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.
#if V8_TARGET_ARCH_PPC
#include "src/ast/scopes.h"
#include "src/code-factory.h"
#include "src/code-stubs.h"
#include "src/codegen.h"
#include "src/deb... |
5880c93ae1c65e1c26df865445e2117f1a0a1e52 | cb7fee4fcba181146479464704d24c2de52e8546 | chemabc/ofxFilterLibrary | /src/filters/Abstract3x3TextureSamplingFilter.cpp | C++ | cpp | 2,381 | no_license | //
// Abstract3x3TextureSamplingFilter.cpp
// ofxFilterLibraryExample
//
// Created by Matthew Fargo on 2014/06/27.
//
//
#include "Abstract3x3TextureSamplingFilter.h"
Abstract3x3TextureSamplingFilter::Abstract3x3TextureSamplingFilter(float width, float height, ofVec2f texelSpacing) : AbstractFilter(width, height)... |
6665c62276cdcd3e676ec104b2990e144af43615 | e04691ffba903d35d9911b6ffe2d4ad91147a4e7 | BenRauzi/LIMMITT | /FrontEnd/Harris_Client/Phone/UI/phone_uber.hpp | C++ | hpp | 3,293 | no_license |
class Harris_phone_uber
{
idd = 5027;
movingEnabled = false;
onLoad = "[] spawn Harris_uberOpened";
class controls
{
class Background_Image: RscPicture
{
idc = 7565;
text = "Harris_Client\Phone\phone_uber.paa";
x = 0.386562 * safezoneW + safezoneX;
y = 0.06 * safezoneH + safezoneY;
w = 0... |
c76ace5118370bae6f06241816d695dac8d5cb6b | 578168b3f279ff8af99db62b9716906c91423a5f | AlexeyAkhunov/streams | /dsms/src/parser/nodes.cc | C++ | cc | 7,890 | no_license | /*
* nodes.cc: functions to allocate an initialize parse-tree nodes
*
* Modfied for STREAM: Shivnath Babu, Arvind Arasu
*
* Modified for Redbase; Dallan Quass
* Jan Jannink
*
* originally by: Mark McAuliffe, University of Wisconsin - Madison, 1991
*/
#include <iostream>
#include <stdio.h... |
1efdf310ae17fd436acfdbb2f0b3cdbf22b8908c | aa3d7d599551acb0c51f1b2ebc74b6f2f1ffcc9d | maeikei/madoop | /lib/program_options/program_action.cpp | C++ | cpp | 474 | permissive | #include "program_action.hpp"
using namespace MadoopInternal;
/** @brief constructor
*
*/
ProgramActions::ProgramActions(const string &action,const vector<string> ¶ms)
:_action(action)
,_params(params)
{}
/** @brief parse actions
* @param None.
* @return None.
*/
void ProgramActions::parse... |
e7937c372892eb593a30ba5e530dd7f7182f2eee | c58e25efc8a1874cddcf8461a4377c62f386983d | fawkesrobotics/fawkes | /src/plugins/ros2/image_plugin.cpp | C++ | cpp | 1,417 | no_license |
/***************************************************************************
* image_plugin.cpp - Exchange point clouds between Fawkes and ROS
*
* Created: Tue Apr 10 22:09:24 2012
* Copyright 2011-2012 Tim Niemueller [www.niemueller.de]
*
********************************************************************... |
2389fb805a9cef6024b4640e789348f154ef51be | ce4f26efc72010115994de4823e98943ce81df19 | eebersol/Piscine-CPP | /D08/ex01/includes/span.hpp | C++ | hpp | 554 | no_license | #ifndef SPAN_HPP
#define SPAN_HPP
# include <stdexcept>
# include <iostream>
# include <string>
# include <list>
# include <vector>
class Span {
private:
int _place;
int _size;
std::vector<int> v;
std::vector<int> _diffA;
public:
Span(unsigned int i);
~Span(void);
void addNumber (unsigned ... |
47172866c835b1b90ba1ae615d8a1b8b669feca7 | 257fee34dfce644b72a064818f62d6c69a2c63af | sodrulamin/UVA | /Completed/13148 - A Giveaway/13148 - A Giveaway.cpp | C++ | cpp | 925 | no_license | #include <iostream>
#include <unordered_set>
//#include <vector>
using namespace std;
unordered_set<int> mySet = {1, 64, 729, 4096, 15625, 46656, 117649, 262144, 531441,
1000000, 1771561, 2985984, 4826809, 7529536, 11390625, 16777216, 24137569, 34012224,
47045881, 64000000, 85766121};
int main()
{
unsigned int n... |
823ad530a5bcf1f0ef3a4662059cba704b8f4379 | 7c409a0e65e439030579c81b3d582e1d7770a473 | EhODavi/INF330 | /Trabalho II/A.cpp | C++ | cpp | 3,230 | permissive | #include <iostream>
#include <vector>
#include <map>
using namespace std;
// Função que simplica ao máximo uma fração
void simplificaFracao(int &numerador, int &denominador) {
int maior = max(numerador,denominador);
for(int i = maior; i >= 2; i--) {
if((numerador % i == 0) && (denominador % i == 0)) ... |
13071b3e8cb35fd0df717a13977f6f74107489ef | 0e0a6c9869830f52ffe7187f210ad38a23c7b993 | Scyne/FakeCoin | /src/qt/guiutil.cpp | C++ | cpp | 16,092 | permissive | #include <QApplication>
#include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#if QT_VERSION >= 0x050000
#include <QUrlQuery>
#else
#inclu... |
cf68847512953c7ca7f39ea524d29834464742c2 | 77f9ea570dd8750fd82537d05f6f0bf0fa933a2b | Nheyer/hal | /modify/ancestorsMLTest.cpp | C++ | cpp | 3,069 | permissive | #include "ancestorsML.h"
#include "hal.h"
#include <cstdio>
extern "C" {
#include "CuTest.h"
}
using namespace std;
using namespace hal;
// set up fake, test felsensteinData for this node.
static void labelTestTreeNode(stTree *node, map<string, int> *nameToId, char dna) {
felsensteinData *data = (felsensteinData... |
b4c74e5ed21a6c5958f9e0f2673065638fbbb3bd | 605f172e0a694322320ca35cc72b24f60ea6b2a5 | Jyotika25/Leetcode-July-Challenge | /Remove elements from linked list.cpp | C++ | cpp | 803 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* removeEleme... |
2a459b5c5ba3d8bc0e3debd191655c7a3d574375 | f1131f39393bae59a7fb385e413bcc67c69cbbc6 | Foxy1835/Algorithms | /LibraryCPP/list.cpp | C++ | cpp | 1,398 | no_license | #include <stdlib.h>
#include "list.h"
struct ListItem
{
Data value;
ListItem* next;
};
struct List
{
ListItem* head;
};
List* list_create()
{
List* list = new List;
list->head = NULL;
return list;
}
void list_delete(List* list)
{
ListItem* current = list->head;
while (current != NUL... |
d4475c5f83d45cf91c36bd0f60489c897d8b8817 | b9a30b24683aad4fc2d0b201ef2a48c6d6d12e03 | exoscale/aws-sdk-cpp | /aws-cpp-sdk-kinesisanalytics/source/model/DeleteApplicationRequest.cpp | C++ | cpp | 1,589 | permissive | /*
* Copyright 2010-2016 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... |
3fad1587ae75515999f899ad845d14e22ce05968 | 754f3ce205ac911c84ab6ef8d51595825c614902 | jerrywu65/PAT_A_Exercise | /PAT_A/1002_A_plus_B_for_Polynomials.cpp | C++ | cpp | 760 | no_license | /*#include <cstdio>
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std;
const int nmax = 1001;
double res[nmax];
double first[nmax];
int idx[nmax];
int main() {
int k;
int exp;
double coe;
memset(res, 0.0, sizeof(res));
memset(first, 0.0, sizeof(first));
cin >> k;
for (int i = 0; i < ... |
080c859ad2323ff96e0062540c8d63f94cf6d881 | 7054e8bb1f08f4192781d147e62767270f8c50e6 | LEChaney/CannonBallPhysicsEx | /CannonPhysicsEx/main.cpp | C++ | cpp | 1,086 | no_license | #include <glm\glm.hpp>
#include <iostream>
// Returns the firing angle, in radians, needed to hit aimPoint
float aimCannon(float cannonLength, float muzzleSpeed, const glm::vec2& aimPoint) {
glm::vec2 velInitial / muzzleSpeed = glm::vec2{ glm::cos(firingAngle), glm::sin(firingAngle) };
velInitial.x / muzzleSpeed =... |
614e450286b6102181266936465c7ae7b4522bc6 | 81c415d7ef9570bc98b30fb410ace19bd4ad6b5d | jazmineuno/JazmineWalletd | /JazmineWalletd/CoreConfig.cpp | C++ | cpp | 955 | permissive | // Copyright 2018 Waitman Gobble
// Copyright (c) 2011-2016 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "stdafx.h"
#include "CoreConfig.h"
#include "Util.h"
#include "CommandLine.h"
n... |
a1537f7b16a2fa1398bed9b304baf5e086625030 | e0c4b9ad25ffee5cdcfcae2d6438b175e31415a5 | tariqul87/coding-practice | /leetcode/1091_shortest_path_in_binary_matrix.cpp | C++ | cpp | 1,495 | no_license | #include "array.cpp"
class Solution
{
public:
vector<vector<int>> dirs = {{-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}};
bool isValid(vector<vector<int>> &grid, int i, int j)
{
if (i < 0 || i >= grid.size() || j < 0 || j >= grid[i].size() || grid[i][j] == 1)
{
... |
1f05e4d95f7a0a8224f550f16935ea26a28201dc | b56f238f2fd31df78cc879ed9ac44e03938b2421 | HuTlabs/darknet_ros | /darknet_ros/src/YoloObjectDetector.cpp | C++ | cpp | 32,268 | permissive | /*
* YoloObjectDetector.cpp
*
* Created on: Dec 19, 2016
* Author: Marko Bjelonic
* Institute: ETH Zurich, Robotic Systems Lab
*
*
* Modified on: May 20, 2018
* Authors: Alejandro Díaz, Adrian Romero and Gonzalo Nuño
* Institute: UPM, Universidad Politécnica de Madrid
*/
// YOLO object dete... |
5db6aa8d3145095aab51ba09705bcd123b1bf5a6 | 043884de9ce1b662a8cbbd41b9df3b79024e7fff | Kalkivenkatesh/CPP | /Kids With the Greatest Number of Candies.cpp | C++ | cpp | 349 | no_license | // Kids With the Greatest Number of Candies
class Solution {
public:
vector kidsWithCandies(vector& candies, int extraCandies) {
int n=candies.size();
int x=*max_element(candies.begin(),candies.end());
for(int i=0;i<n;i++)
candies[i]+=extraCandies;
vector a(n);
for(int i=0;i<n;i++)
{
if(candies[i]<x) a[i]=false;
else... |
a559251b42631769763792e7ea8c1f3cc587a6a0 | 66b261487d9a33a308a3e175f4b1e82010bab865 | georgiosdoumas/ProgrammingCplusplus- | /CplusplusPrimer_5thEd_2012/chapter07/Exercise7.57.main.cpp | C++ | cpp | 636 | no_license | /* Exercise 7.57: Write your own version of the Account class. */
// A very minimal main, just to see that the class.h and functions.cpp are correct syntactically
#include "Exercise7.57.class.h"
int main()
{
double r1, r2;
r1 = Account::get_rate(); // access a static member using the scope operator
Account ac1;
Ac... |
a15f80ce2038a2efb4130d48391ed47c6ebcd33d | bfb28760303f8be43f3419cbd2418b9839fabc05 | ra138212/micromanager-upstream | /DeviceAdapters/Sapphire/Sapphire.cpp | C++ | cpp | 17,437 | permissive | ///////////////////////////////////////////////////////////////////////////////
// FILE: Sapphire.cpp
// PROJECT: Micro-Manager
// SUBSYSTEM: DeviceAdapters
//-----------------------------------------------------------------------------
// DESCRIPTION: Sapphire controller adapter
// COPYRIGHT... |
2e5da023a9a312906b54219ee26654aa577e94fb | 0842b9eccfa4d7a7829a2f97da211351bbc2a56b | FilmAf/PHP-Extensions | /ext/dvdaf3/PhpAdaptor.cpp | C++ | cpp | 1,471 | permissive | #include "PhpAdaptor.h"
#ifdef WIN32TEST
#include <stdlib.h>
#include <stdio.h>
void *CPhpAdaptor::Malloc(int pSize)
{
return ::malloc(pSize);
}
void CPhpAdaptor::Free(void *ptr)
{
::free(ptr);
}
void *CPhpAdaptor::Realloc(void *ptr, int pSize)
{
return ::realloc(ptr, pSize);
}
int CPhpAdaptor::... |
ecb0b596aa9b4dfacfff2d6b5a415cae306c812c | e5367fcd816b623515113998ef9ee438e3f1f15f | yixuan-wei/Incursion | /Incursion/Code/Game/World.hpp | C++ | hpp | 360 | permissive | #pragma once
#include <vector>
class Map;
class Game;
class World
{
public:
World(Game* game);
~World();
void StartLevel();
void LoadNextLevel();
void Update( float deltaSeconds );
void Render()const;
Map* GetCurrentMap()const { return m_currentMap; }
private:
Map* m_currentMap = nullptr;
Game* m_game ... |
445e6a7316a71e8b557c4b19483ed293a834557c | 27002ff19bad7f11f05c1740aa49d6f65b3fba44 | YasserKa/Cpp_Primer | /chapter_3/ex_3.2.cpp | C++ | cpp | 379 | permissive | #include <iostream>
#include <string>
using std::string;using std::cout;using std::cin;using std::endl;
int main()
{
string s1;
int prog = 1;
switch(prog) {
case 1:
while (getline(cin, s1))
cout << s1 << endl;
break;
case 2:
while (cin >> s1)
cout << s1 << endl;
break;
default:
cout ... |
3d4e82b55f231d0e77eab9909c179fd0397a80d7 | ca3c92fbdbacc234059efbd193326f6c8ee5fb52 | MayBeLaterOrNot/poj | /1326/7091316_AC_0MS_672K.cc | C++ | cc | 1,256 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(int argc, char** argv)
{
char szLine[128] = {0};
char szOCity[32] = {0};
char szDCity[32] = {0};
int miles;
char code;
int sum = 0;
while (1)
{
fgets(szLine, sizeof(szLine... |
914ccb6288531188c055a9e6df36ecd34ca2f70f | 790971d4c3a96a1c0716732c09e4fcc8abddb1c2 | c3coding100/koi_ba | /8주차/본선12/주사위쌓기.cpp | C++ | cpp | 1,305 | no_license | #include <stdio.h>
#define MAX 10000
const int NOT_REACHED = 0;
int n;
int dice[MAX][6];
int result;
void input()
{
scanf("%d", &n);
int i,j;
for(i=0;i<n;i++)
for(j=0;j<6;j++)
{
scanf("%d", &dice[i][j]);
}
}
int across(int face)
{
int aface[6] = { 5, 3, 4, 1, 2,... |
5a967101020839b05e07d99e0eaf95e6bf36384c | 12d893402411cc9de857d5400142a9573920a599 | ivanagui2/chromium | /chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc | C++ | cc | 5,493 | 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/ui/views/frame/browser_non_client_frame_view_ash.h"
#include "ash/ash_constants.h"
#include "ash/ash_switches.h"
#include "b... |
f6849a8242145028ceede3de36f54fdeb1eb478f | 6e5ac43c06fff89dbb23800e0dc5c2bb98adc1e0 | asalem2/csc-340-Data-Structures- | /Project4/Polynomial ADT/polynomial.cpp | C++ | cpp | 13,804 | no_license | /* Ahmed Salem
* 910017087
* ahmeds@mail.sfsu.edu
* Class:Hui Yang 340-01
* Date: October 11, 2014
* IDE/Compiler: Netbeans
* This is the implementation of the header file for the polynomial ADT
*/
#include <iostream>
#include <string>
#include "polynomial.h"
using namespace std;
//Constructor that makes the po... |
fd63ceadfbf4fd90a085afa955852ddf51a7eadd | bbb048306a83f0cfef0c408da9a7576992404fff | neilnguyen2208/NMPT_Game | /GAME FINAL/NinjaGaiden/Eagle.cpp | C++ | cpp | 1,828 | no_license | #include "Eagle.h"
Eagle::Eagle() : Enemy() {
//Set type
auto textures = Textures::GetInstance();
textures->Add(TEX_EAGLE, "Resources/Sprites/eaglespritesheet.png", D3DCOLOR_XRGB(255, 163, 177));
eagleFollowState = new EagleFollowState(enemyData);
//Set tag
tag = Entity::Eagle;
type = Entity::EnemyType;
D3DSUR... |
aa1306369f16693969e56d41012d4555036c6d74 | 7364d0e35255154d78c45e0bd7483a0ccda5878d | TrellixVulnTeam/Chromium_7C66 | /ash/laser/laser_pointer_controller_test_api.cc | C++ | cc | 1,348 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/laser/laser_pointer_controller_test_api.h"
#include "ash/laser/laser_pointer_controller.h"
#include "ash/laser/laser_pointer_points.... |
89c47df9ef738f0d7392d6c13aa3252904ecdfc9 | 54712ac5dc14b67baf50b4df909b16021c537132 | tomaszhof/interval_arithmetic | /NakaoMethod/src/NakaoExperiment2DCxy.cpp | C++ | cpp | 21,312 | permissive | /*
* NakaoExperiment2DCxy.cpp
*
* Created on: Jul 21, 2018
* Author: numeric
*/
#include "NakaoExperiment2DCxy.h"
NakaoExperiment2DCxy::NakaoExperiment2DCxy() {
// TODO Auto-generated constructor stub
}
NakaoExperiment2DCxy::~NakaoExperiment2DCxy() {
// TODO Auto-generated destructor stub
}
void NakaoE... |
ad26518c1c561da072a40f7e779ecfa212f71850 | ab42afe8900f836816e766e896cc0b9ccc9aafe4 | smeeeetha/CodeHour | /Contest1/Blue/b-count-distinct-elements-in-every-window.cpp | C++ | cpp | 1,032 | no_license | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<map>
using namespace std;
void countDistinct(vector <int> arr, int k, int n)
{
map<int, int> hm;
int dist_count = 0;
for (int i = 0; i < k; i++) {
if (hm[arr[i]] == 0) {
... |
6b8bb9071739338a0818fa2bb433cff11d04091c | 3bd1fc648fc2e5c00e025ceb3feaf58d9057d535 | Automannn/automan_jvm | /native/java_lang_Runtime.cpp | C++ | cpp | 835 | no_license | //
// Created by 14394 on 2020/2/26.
//
#include "../automan_jvm.h"
#include "java_lang_Runtime.h"
#include <vector>
#include <algorithm>
#include <cassert>
#include "native.h"
#include "../utils/os.h"
static unordered_map<wstring, void*> methods = {
{L"availableProcessors:()I", (void *)&JVM_AvailableProce... |
382bdd0dc444cf1ad47df0b8307e26dc52507181 | de002949ec8a8e2e07b9f7e4b44cefb3b0d58026 | CathanBertram/GEC | /Semester 1/PROGRAM 14/Program 14/Program 14/Source.cpp | C++ | cpp | 755 | no_license | #include <iostream>
#include <windows.h>
using namespace std;
int main() {
int playerLife = 100;
int i = 1;
int damage;
for (int counter = 10; counter != 0; counter--)
{
if (playerLife >= 1) {
cout << "Question " << i << ": How Much Should We Decrease The Health By?"<< endl;
cin >> damag... |
ebaea75189bfd7b12d600d6048bb592df5e29054 | cd9aeb4938c0212547e75a2d90ef7e8855a3d717 | timothyehinds/archadia | /pi2jamma-fe/src/core/StringUtil.hpp | C++ | hpp | 1,157 | no_license | #pragma once
#include "core/Arg.hpp"
#include "core/CString.hpp"
#include "debug.hpp"
#include <memory.h>
#include <typeinfo>
#include <string>
#include "core/StringSpan.hpp"
extern const std::string gEmptyString;
#define SL(x) x
#define TS(x) x
#define FS(fmt, ...) string_format(fmt, __VA_ARGS__)
inline std::str... |
a09bc71bc78ca1d9a7b3cffeb44df727ec28fbd0 | b9fbc54a7f4aaea48fbffdf264e5730679c0b786 | ademkagz/bytn | /src/test/base32_tests.cpp | C++ | cpp | 913 | permissive | // Copyright (c) 2012-2013 The Bitcoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "utilstrencodings.h"
#include "test/test_bytncoin.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SU... |
6a53ff8321108ad79dc50f25db01854b72a23d83 | 2754e88d5d35eccd0714baee911a0e5078398ab0 | romikvers/gew-rze | /repos/№5.1/№5.1.cpp | C++ | cpp | 437 | no_license | // Lab 5_1
#include <iostream>
#include <cmath>
using namespace std;
double h(const double a, const double b); // прототип
int main()
{
double s, t;
cout << "s = "; cin >> s;
cout << "t = "; cin >> t;
double c = (pow(h ,3)(t * t, 1) + h(1, (t*s) * (t*s))) / 1 + pow(h, 2)(s, t));
cout << "c = " << c << endl;
re... |
b7b4396360203988ffc87302ccf6afa01c64d278 | 900c7d5433dcd542e66c961e71ff55cf8544f65f | AkeSolveig/bevprogdrillek | /Drill_4/ch04drill.cpp | C++ | cpp | 582 | no_license | #include "std_lib_facilities.h"
int main()
{
double a =0, b=0;
cout << "Please enter 2 numbers\n";
while(cin >> a >> b)
{
cout << "a=" << a << " b= " << b << endl;
if(a < b)
{
cout << "The larger value is b: " << b << endl;
cout << "The smaller value is a: " << a << endl;
}
if(b < a)
{
... |
551f9f755fc65865588666ab898d277a655f83a5 | 11ac65732bdb73b56aadc64556fb2b9266715e2a | rzr/chromium-crosswalk | /chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.cc | C++ | cc | 1,672 | 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 "chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runne... |
e47cc4ded8e8be5ffcf61171a28f68e077b3d703 | 66bdb76184728de6e7ce04c0b36eed53f5a5229b | Pristin/Tron3k | /Tron3k/Project/Core/Console.cpp | C++ | cpp | 3,167 | no_license | #include "Console.h"
Console::Console()
{
for (int c = 0; c < MAXHISTORY; c++)
{
history[c] = "";
}
cmdReady = false;
printConsole();
}
Console::~Console()
{
}
bool Console::update(string clientName)
{
Input* i = Input::getInput();
if (inChatMode)
{
for (int c = 0; c < VALIDKEYS; c++)
{
if (i->just... |
a32b017761d6732a3048cd7d99dc19640c36766d | 684d5bca96663f3f516abbb1e3ea67b1a1d24293 | Guyutongxue/copyfile | /copyfile.cpp | C++ | cpp | 1,978 | no_license | #include<iostream>
#include<cstring>
#include<windows.h>
#include<io.h>
#include<direct.h>
#include<ctime>
using namespace std;
char contain[28];
int length=1;
string getCurDir(){
char chPath[1000];
GetModuleFileName(NULL,(LPSTR)chPath,sizeof(chPath));
strrchr(chPath,'\\')[1]= 0;
string strPath(chP... |
61d9a6918fea8b47e43aecb6f3dbe2accdab6a9a | 646cda0e9536aa46af941415352d61367355a39e | drltc/BitShares | /src/address.cpp | C++ | cpp | 1,615 | no_license | #include <bts/address.hpp>
#include <bts/small_hash.hpp>
#include <fc/crypto/base58.hpp>
#include <fc/crypto/ripemd160.hpp>
#include <fc/crypto/elliptic.hpp>
#include <fc/exception/exception.hpp>
namespace bts
{
address::address()
{
memset( addr.data, 0, sizeof(addr.data) );
}
address::address( const s... |
16bb4460b40e0672d6e4fdc15baf5161e1a5d00b | 38fc52825e8debc49224ac4d34c28bbe5a6d0300 | ailialy/MusicXML-Class-Library | /Sourcecode/mx/core/elements/Slash.cpp | C++ | cpp | 3,477 | permissive | // MusicXML Class Library v0.2
// Copyright (c) 2015 - 2016 by Matthew James Briggs
#include "mx/core/elements/Slash.h"
#include "mx/core/FromXElement.h"
#include "mx/core/elements/SlashDot.h"
#include "mx/core/elements/SlashType.h"
#include <iostream>
namespace mx
{
namespace core
{
Slash::Slash()
... |
b54776152aa23e44d2a444c4bc5a51baca54b52f | 24d4c50b338f53cadf90bdbb7f136584b4a8b8b4 | MDE4CPP/MDE4CPP | /src/pscs/src_gen/PSCS/Semantics/Actions/CS_CallOperationActionActivation.hpp | C++ | hpp | 3,811 | permissive | //********************************************************************
//*
//* Warning: This file was generated by ecore4CPP Generator
//*
//********************************************************************
#ifndef PSCS_SEMANTICS_ACTIONS_CS_CALLOPERATIONACTIONACTIVATION_HPP
#define PSCS_SEMANTICS_ACTIONS_CS_CAL... |
0bb7831c03e3aa2b9eab538675797b0d1d43e324 | 4d8781ecc74329c550cd90872ecf80576ed51f3f | donboie/dependencies | /OpenShadingLanguage-Release-1.7.5/src/liboslcomp/oslcomp.cpp | C++ | cpp | 47,510 | permissive | /*
Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
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 co... |
4ff3fc8760c6d779f2f7eae74af96979c0b50166 | c690d9de82c3ed025915a224b4f823f55c9c0bce | Codeon-GmbH/mulle-clang | /test/OpenMP/target_teams_messages.cpp | C++ | cpp | 2,987 | permissive | // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
void xxx(int argc) {
int x; // expected-note {{initialize the variable 'x' to silence this warning}}
#pragma omp target teams
argc = x; // expected-warning {{variable ... |
b72323e8f7fb09eadfbf87b9f430bae45c6d3f43 | 69e6a11b9ad75c3ddd9dc06388b44f659dcb8eeb | EricXu104747/platform_frameworks_base | /cmds/statsd/src/external/StatsPullerManager.cpp | C++ | cpp | 21,793 | permissive | /*
* Copyright (C) 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 app... |
3e231bd0be831c4ca7827fa54234f2c113390ca6 | e1dbfa8356f7754c1a9a02380cbd9cac11cfc2f0 | pombreda/syzygy | /syzygy/application/application_unittest.cc | C++ | cc | 7,823 | permissive | // Copyright 2012 Google Inc. 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... |
05835f93e34258f0510b6ca1aec15e754944bc62 | ceda29b5b58c91fd4bc08156d9f1166b6b4a29cb | TheObands1/NewARKDE_ArtHeist | /Source/Arkde_ArtHeist/Private/Core/AH_VictoryZone.cpp | C++ | cpp | 1,251 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Core/AH_VictoryZone.h"
#include "Components/BoxComponent.h"
#include "AH_Character.h"
#include "Core/AH_GameMode.h"
// Sets default values
AAH_VictoryZone::AAH_VictoryZone()
{
// Set this actor to call Tick() every frame. You... |
3b94c09c9626e594ab2a31d8c459287740431411 | 535095c6ef013487e30620f1c024c3bf03d026fd | DVLab/abc1234 | /src/cmd/v3CmdComm.cpp | C++ | cpp | 10,595 | no_license | /****************************************************************************
FileName [ v3CmdComm.cpp ]
PackageName [ v3/src/cmd ]
Synopsis [ Global Commands Implementation ]
Author [ Chung-Yang (Ric) Huang ]
Copyright [ Copyright(c) 2011 LaDs(III), GIEE, NTU, Taiwan ]
*********************... |
7fba81e7f2693df7cfc324fa8c7391586f51eef4 | 01335a0627d50cdc4d18a9ec5c7c58579a68d728 | karsar99/SP_lb_7 | /clientTCP.cpp | C++ | cpp | 1,638 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
void error(const char *msg)
{
perror(msg);
exit(0);
}
int main(int argc, char *argv[])
{
int sockfd, portno, n;
struct sockaddr_in s... |
c49ee718adaf33ac6cb2fbb4cf9fad8bc11cccf7 | 270e60ea00322e360e7a2cedd4f53c72b3600860 | TetraSomia/liblapin | /src/plugin/get_function.cpp | C++ | cpp | 400 | permissive | // Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2016
//
// Lapin library
#include "lapin_private.h"
void *bunny_plugin_get_function(const t_bunny_plugin *plugin,
const char *name)
{
size_t i;
for (i = 0; i < plugin->nbr_functions; ++i)
if (strcmp(name, plugin->prototypes[i].name) == 0... |
b326ba13d4cb42f655935757644bc9dd482b366a | a31a6947536d460d9067a8a580974b0527380c9e | mipidisaster/miStepper_ROS | /mistepper_driver/src/mistepper_hst_node.cpp | C++ | cpp | 16,858 | no_license | /**************************************************************************************************
* @file mistepper_hst_node.cpp
* @author Thomas
* @brief ROS node for USART/direct interface to miStepper
********************************************************************************************... |
ac80704e7d30ee2ab1ff30874ac571358c0d3d57 | 31ba0d4bc5b98d39ab831fa7b016e50ea9d35818 | recampbell/nt2 | /modules/core/operator/bench/scalar/unary_plus.cpp | C++ | cpp | 3,283 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
97800d69f3cde59dc2446d20558ae65ad2f8fa14 | 4c65c2a13ef1bb50f291b8a5d81ffd2ba4566da7 | edwig/CXHibernate | /Marlin/SOAPMessage.cpp | C++ | cpp | 62,987 | no_license | /////////////////////////////////////////////////////////////////////////////////
//
// SourceFile: SOAPMessage.cpp
//
// Marlin Server: Internet server/client
//
// Copyright (c) 2014-2022 ir. W.E. Huisman
// All rights reserved
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of ... |
8a1d460f25eba2f11cdc649e5f22f78c37d3e5c1 | 889d51a77f2481dbee284fb4c2640f52e2e99b6e | littledou2013/PAT | /pat_1049.cpp | C++ | cpp | 900 | no_license | #include <iostream>
#include <cstdio>
using namespace std;
int num[10];
//num[10]保存的是0以下,10以下,100以下……1000000000(10的九次方)以下有多少个1(不包含本身)
void initial()
{
//初始化num[0] = 0;
//后面元素可以由前一个元素得出
num[0] = 0;
int index = 1;
int factor = 1;
while (index < 10)
{
//关键理解代码
num[index] = 10 * num[index - 1] +factor;
factor... |
bea33854dad0e7d4f964a7f891c24ba42dc7fe40 | 2ceca5f7595e395a3aed0904ab7347580d81cc62 | snrkgotdj/Mission_Ace | /Classes/Scene/Layer/Layer_Main.cpp | C++ | cpp | 6,366 | no_license | //
// CLayer_Main.cpp
// UIMaking
//
// Created by cd-someone on 19/12/2018.
//
#include "Layer_Main.hpp"
#include "Layer_Select.hpp"
#include "Page.hpp"
#include "Page_m1.hpp"
#include "Page_0.hpp"
#include "Page_2.hpp"
#include "Page_1.hpp"
using namespace cocos2d;
CLayer_Main::CLayer_Main()
: m_pScene(nullp... |
d1ce6f46bf3538bf452f59b8d3cd46d03f9d7597 | 9f0c61d27466d81fdeebb25485a0efa47157ecd5 | benjaminhsieh2002/benjaminhsieh2002.github.io | /node_modules/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp | C++ | cpp | 4,328 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "ShadowViewMutation.h"
namespace facebook {
namespace react {
ShadowViewMutation ShadowViewMutation::CreateMutation(Shad... |
223a4bb2965e905dd8b88001b7b3111652b65f72 | f0987a14b16de4f6d5056fda102c9b669068d7ff | MrAlexand0r/bobsgame | /src/Utility/System.cpp | C++ | cpp | 33,388 | permissive |
#include "stdafx.h"
//------------------------------------------------------------------------------
//Copyright Robert Pelloni.
//All Rights Reserved.
//------------------------------------------------------------------------------
Logger System::log = Logger("System");
//string System::internetProviderString =... |
0fe86a9bfcfc3ee22864594e14bd59f60861bdec | f887c5f36aee34c95ea835662b4d70c9d558d94b | NHERI-SimCenter/SWIM | /cpp/ai.cpp | C++ | cpp | 2,400 | no_license | #include "ai.h"
AI::AI(std::string modelPath)
{
bool modelLoaded = false;
try
{
// Deserialize the ScriptModule from a file using torch::jit::load().
module = torch::jit::load(modelPath.c_str());
modelLoaded = true;
std::cout << modelPath.c_str() << std::endl;
}
ca... |
86154d8c93d3b1de06598bd47dcab2a5eee1e8b2 | 6102515d23438115645cbaf6394641ae81b98f18 | systrauss/ICEBall-Coincidence-Code | /src/analysis.cxx | C++ | cxx | 5,078 | no_license | #define analysis_cxx
#include "analysis.h"
//C++ libraries
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
//ROOT libraries
#include <TROOT.h>
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <TString.h>
#include <TFile.h>
#include <TH1F.h>
#include <TTree.h>
#include <TRan... |
f28c019c6ca7ec708d6ac9baa5cf46cc04485f51 | 2761e906e301c6b640a037c68251416db6fb93fa | duzhi5368/FKTheLostLand | /FK2DEngine2/Source/UI/Controls/Dialogs/FKFileOpen.cpp | C++ | cpp | 922 | no_license | /**
* created: 2013-4-12 13:23
* filename: FKFileOpen
* author: FreeKnight
* Copyright (C):
* purpose:
*/
//------------------------------------------------------------------------
#include "../../../../Include/FKUIOutSideHead.h"
//------------------------------------------------------------------------
usin... |
43a864e6439259f4d745549fc4dd77b8a14919c8 | ac593c2ab982de59333310e675f4ef5a7966bd3b | imaxct/pta | /23.cpp | C++ | cpp | 1,058 | no_license | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
using namespace std;
const int maxn = 110;
int p[maxn][maxn];
//int fa[maxn];
int n, m;
/*
int getfa(int x){
return fa[x]==x?x:fa[x]=getfa(fa[x]);
}
void merge(int x, int y){
int fx = getfa(x),
fy = getfa(y);
if (fx != fy)
fa[y] = fx;
}
... |
caa19ccce1301b4fc4e109f2b5b7dcf43a720a67 | 4ef990023efb2e6f993383570f8c58f2de30707b | bstatcomp/math | /lib/tbb_2019_U8/src/perf/fibonacci_impl_tbb.cpp | C++ | cpp | 1,946 | permissive | /*
Copyright (c) 2005-2019 Intel Corporation
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 la... |
d28c1080c15d809cc3641295d696126893f49aed | 60bcded737685a55a836802e10d0aeaa811357b7 | RainUtopia/pie | /audio-streaming-client-cpp/demo/client_demo.cpp | C++ | cpp | 4,992 | no_license | #include "audio_streaming_client.h"
#include <unistd.h>
#include <iostream>
#include <sstream>
#include <thread>
#include <string>
#include "picosha2.h"
typedef com::baidu::acu::pie::AsrClient AsrClient;
typedef com::baidu::acu::pie::AsrStream AsrStream;
typedef com::baidu::acu::pie::AudioFragmentResponse AudioFragmen... |
720b099a07887a5600076026360d19bdc4ae6b92 | e5e803791a6e8b00ac0c68994ea319fbd45e8ee8 | one3chens/pytorch | /torch/lib/THD/test/data_channel_collectives.cpp | C++ | cpp | 27,178 | permissive | #ifdef WITH_GLOO
#include "../base/data_channels/DataChannelGloo.hpp"
#endif // WITH_GLOO
#ifdef WITH_MPI
#include "../base/data_channels/DataChannelMPI.hpp"
#endif // WITH_MPI
#include "../base/data_channels/DataChannelTCP.hpp"
#include "TestUtils.hpp"
#include <THPP/tensors/THTensor.hpp>
#include <unistd.h>
#includ... |
b50c0a5ecd3343f1f9a3ea7dbbdf684a57b3271e | c8facfa783e9700fbc6c1e2d72cc6e43d1237dba | pon79/toolkit | /tmp/tmpbluetooth.cpp | C++ | cpp | 712 | no_license | #include "tmpbluetooth.h"
TmpBluetooth::TmpBluetooth(QObject *parent) : QObject(parent)
{
QBluetoothLocalDevice localDevice;
QString localDeviceName;
// Check if Bluetooth is available on this device
if (localDevice.isValid()) {
qInfo() << "valid";
// Turn Bluetooth on
localD... |
e803e221ab0f19201ff5d3292ef26357e8ba1510 | ffb564da2ce84a607adede7c1da8c8a76062d66f | ayushb2489/Placement-Classess-G2 | /28 JUN/removeDuplicate.cpp | C++ | cpp | 1,292 | no_license | <<<<<<< HEAD
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++)
cin >> arr[i];
int i = 0;
int j = 1;
while (j < n)
{
if (arr[i] >= arr[j])
{
int temp = j;
j++;
while (a... |
9b41f5b83db9d98ac720a9c7940e4f8b70eecc15 | 8787d895e250c6fbbf0f0ae57f1be12987e5d742 | TheEmeraldFalcon/open-builder | /src/server/network/server.cpp | C++ | cpp | 11,199 | permissive | #include "server.h"
#include "../server_config.h"
#include <SFML/System/Clock.hpp>
#include <algorithm>
#include <common/debug.h>
#include <thread>
#include "../world/terrain_generation.h"
#include <common/obd_parser.h>
Server::Server(const ServerConfig &config)
: NetworkHost("Server")
, m_worldSize(config.... |
fbc4f6a909b8940d12ffb17b4c8ab605634d39e2 | c0db0e4e3a4bc205935127b5988ce652c22ecb60 | yhencay/CayShienne_CSC5_40107 | /Homework/Assignment_1/Gaddis_8thEd_Chap2_Prob3_SalesTax/main.cpp | C++ | cpp | 1,347 | no_license |
/*
* File: main.cpp
* Author: Shienne Cay
* Created on January 3, 2017, 12:19 PM
* Purpose: Homework Sales Tax
*/
//System Libraries
#include <iostream>
using namespace std;
//User Libraries
//Global Constants
//Such as PI, Vc, -> Math/Science values
//as well as conversions from one system of measurements
... |
9c7fdc3b6b4a0c5b65304af0524bb812cdceade8 | 18216aa70437b393edc9402ec3edf074eb9b01df | I4CUT/LMS | /library.cpp | C++ | cpp | 18,799 | no_license | #include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <sstream>
#include <algorithm>
#include "library.hpp"
#include "book.hpp"
#include "user.hpp"
void Lib::add_book()
{
Book new_book;
char continue_symbol;
std::cout << "Enter the identification number of the book: " << std::... |
792f36ab4f547d89afabd14e38a8ed672336d9dc | 961eada20c9a14e84e6641958ed144efadafd1e7 | chengxxxxwang/leap-ue4 | /Plugins/LeapMotion/Source/LeapMotion/Public/LeapBlueprintFunctionLibrary.cpp | C++ | cpp | 1,253 | permissive | #pragma once
#include "LeapMotionPrivatePCH.h"
#include "LeapBlueprintFunctionLibrary.h"
#include "FLeapMotionInputDevice.h"
ULeapBlueprintFunctionLibrary::ULeapBlueprintFunctionLibrary(const class FObjectInitializer& Initializer)
: Super(Initializer)
{
}
void ULeapBlueprintFunctionLibrary::EnableTimeWarp(bool Ena... |
a2067eb562d051155e16dc44f7698f1bee4cc847 | 5b65841a602f553d9707e5ba6ae34a3f15f751fe | koalaa13/ITMO-University-AaDS-labs | /sorting and searching/solves/Almost sorting network.cpp | C++ | cpp | 4,675 | no_license | #include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <set>
#include <map>
#include <bitset>
#include <string>
#include <queue>
#include <algorithm>
#include <stack>
#include <ctime>
#include <cassert>
#include <complex>
#include <stdlib.h>
#include <limits>
// #pragma comment(linker, "/ST... |
6342e61519aec333789354616ee7f2b0a1f3b1ea | 8d2eb1006007a9e3c561f9d507e515c527ff411b | GRaj-gitHub/RetroGames | /Chess/GameObjects.cpp | C++ | cpp | 204 | no_license | #include "GameObjects.h"
GameObject::GameObject(float posX, float posY, const char* name = "DefaultObject") : position(posX, posY)
{
objName = name;
}
void GameObject::MoveObject(float x, float y)
{
}
|
ee28c0817415a7cafc2424036f5d894b8cd8235e | e9656c4366edd5cbc64584239f0fa890f049ebbe | idziaszek/algonotes-codes | /solutions-ioi2018/combo-sol4.cpp | C++ | cpp | 454 | no_license | // Task: Combo (IOI 2018)
// Uses 2N guesses
// Author: Tomasz Idziaszek
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
#define REP(i,n) for(int i=0;i<(n);++i)
const int M = 4;
const char LET[] = "ABXY";
string guess_sequence(int N) {
string s;
REP(i, N) {
int len = press(s + LET[0] + s... |
02acaf9736169a73ee29739e07fe4204452ffc2f | c12e8bbd31a4a2b98dc95c9f32dba5ee6549f9b4 | Krythz43/CP-Code-Library | /kmp.cpp | C++ | cpp | 1,710 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define lli long long int
#define rep(i,n,z) for(int i=z;i<n;i++)
#define rrep(i,z) for(int i=z;i>=0;i--)
#define nl cout<<endl
#define vi vector<int>
#define vlli vector<long long int>
#define umap u... |
3340223f11fe412ef28e3163ff9a336fac1535bf | 52b659c3217cb96f29289aebda745aca32958fe0 | cfarsbot/DiRTHUD | /src/overlay.cpp | C++ | cpp | 94,896 | permissive | /*
* Copyright © 2019 Intel Corporation
*
* 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, pub... |
c40fe37c1b4fb75e6b8b650414186b193242c919 | b80ae81498ff2003e59bbe355c504e7ec1cf8802 | cleancoindev/shadow-of-the-wyrm | /world/include/Statistic.hpp | C++ | hpp | 1,484 | permissive | #pragma once
#include "ISerializable.hpp"
#include "Marks.hpp"
enum SetStatisticFailure
{
SET_STATISTIC_FAILURE_IGNORE = 0,
SET_STATISTIC_FAILURE_TAKE_HIGHEST = 1
};
class Statistic : public ISerializable
{
public:
Statistic();
Statistic(const int new_base_and_current);
Statistic& oper... |
ea001c9a2bb607f261c1776867833ae788c35893 | ac6e351e6bdedad96e86059df7bed13f70d80ce0 | mathiashemmer/Blacksmith | /Blacksmither/inventorymanager.cpp | C++ | cpp | 3,136 | no_license | #include "inventorymanager.h"
#include "ui_inventorymanager.h"
InventoryManager::InventoryManager(QWidget *parent, Player *mainPlayer) :QDialog(parent), ui(new Ui::InventoryManager){
ui->setupUi(this);
this->mainPlayer = mainPlayer;
ui->tableWidget_Weapons->setSelectionBehavior(QAbstractItemView::Sel... |
f68d2adb8a3a11b54df2bc2965c530b9a59e6fa4 | d07552fb46353698db904af7cdc20e754f5af812 | Samsung/Castanets | /chrome/browser/security_events/security_event_sync_bridge_impl.cc | C++ | cc | 7,646 | 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 "chrome/browser/security_events/security_event_sync_bridge_impl.h"
#include <set>
#include <utility>
#include <vector>
#include "base/big_endia... |
4d52a6ca1503bb66e2a1dce58c844088cca77718 | fba15bd179cf77bf2270794c484ad988524ba251 | jpusterhofer/sudoku-cube-solver | /SudokuCube.cpp | C++ | cpp | 19,553 | no_license | #include <iostream>
#include <time.h>
#include "Cubie.h"
#include "SudokuCube.h"
using namespace std;
//Set initial state for the cube
SudokuCube::SudokuCube()
{
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
front[i][j] = Tile("front", i, j, '^');
}
}
front[0][0].setNum(1);
front[0][1].setN... |
506124ff955f1ab527357557f02911ce539a88c7 | 10db216f35c2ce3d489a8c764f9d6b3926d47075 | lichenk/AlgorithmContest | /topcoder/DAGConstruction (copy).cpp | C++ | cpp | 5,044 | no_license | #include <bits/stdc++.h>
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
const ll MOD = 1000000007LL;
const ll INF = 1ULL<<60ULL;
const ll UNDEF = -1;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true : ... |
d856036bd4d2d91c749f2ad66b3882f943103c3f | 3fcf4101f2a75f2a81449436f10db4060305b948 | DOUGLASMENDES/dash | /src/httprpc.cpp | C++ | cpp | 11,518 | permissive | // Copyright (c) 2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <httprpc.h>
#include <chainparams.h>
#include <crypto/hmac_sha256.h>
#include <httpserver.h>
#include <rpc/protocol.h>
#... |
9627e0741d15ff6586990f6bc03ad91d372f4871 | 330226e1c9a410d427fd29529f7a573ca671d531 | hoangngo2k/CTDL | /exercise system/sinh_hoan vi/bai2.cpp | C++ | cpp | 386 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n,k,i;
cin>>n>>k;
int a[k];
for(int i=1;i<=k;i++)
cin>>a[i];
i=k;
while(a[i]==n+i-k) i--;
if(i){
a[i]++;
for(int j=i+1;j<=k;j++){
a[j]=a[i]+j-i;
}
}
else{
for(int j=1;j<=k;j++)
a[j]=j;
... |
c30a233a9ca8ad338d4abc20b3934452d236c3fb | 976485fae375ccc92c47f8e95a174fa20aaeda65 | uvbs/GameProject | /TinyGame/Rich/RichBase.cpp | C++ | cpp | 510 | no_license | #include "RichPCH.h"
#include "RichBase.h"
#include "RichWorld.h"
namespace Rich
{
void Actor::move( Tile& tile , bool beStay )
{
mPosPrev = mPos;
mPos = tile.pos;
if ( tileHook.isLinked() )
tileHook.unlink();
tile.actors.push_front( *this );
Tile::ActorList::iterator iter = tile.actors.begin();
... |
de5c620cee7d4a17d746e9abb1826376730d3b90 | d1c8c43e2d81e8f000bac0ae8be7e2c57e8feac3 | LiangCZhang/quantspec | /src/computeSdNaive.cpp | C++ | cpp | 5,049 | no_license | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
//
// computeSdNaive.cpp: Compute standard deviation for smoothed
// quantile perioodgram
//
// Copyright (C) 2014 Tobias Kley
//
// This file is part of quantspec.
//
// quantspec is free software: you can redistribute it and/or modify it
... |
924c5150366ebc42924cc11337f97a5c2eed582e | 44372243985c6f6b9174271a30528339de65fe56 | ccccbjcn/nuls-v2-cplusplus-sdk | /src/utility/binary.cpp | C++ | cpp | 8,574 | permissive | /**
* Copyright (c) 2020 libnuls developers (see AUTHORS)
*
* This file is part of libnuls.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... |
2d93141254d023fa24c050df28950018e895b520 | 13f8a47f3519c6891e61442831be39203be6cee7 | SergeyLebedkin/SLEngine | /src/SLRenderer/SLRenderer_GL4/SLShaderSources_GL4.hpp | C++ | hpp | 294 | permissive | #pragma once
// SLR_GL4
namespace SLR_GL4
{
// vertex // shader with position, color and tex coords
extern const char* cVSShaderSource_PositionColorNormalTexCoords;
// fragment // shader with position, color and tex coords
extern const char* cFSShaderSource_PositionColorNormalTexCoords;
} |
151d11e016535643170521428da24a67e3300528 | 8db0147880560466f0b0494e344fa79c1e6eb614 | quinoacomputing/Boost | /libs/geometry/test/algorithms/area/area.cpp | C++ | cpp | 10,450 | permissive | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2015, 2016, 2017.
// Modifica... |
984240d7bf8aafc738612dc979693c73e472150f | 42967cba927e0a77f349c9ffccb65f1de5bf5244 | victormacedo10/Irrigation_Control | /MeshMaster/src/main.cpp | C++ | cpp | 2,060 | no_license |
/** RF24Mesh_Example_Master.ino by TMRh20
*
*
* This example sketch shows how to manually configure a node via RF24Mesh as a master node, which
* will receive all data from sensor nodes.
*
* The nodes can change physical or logical position in the network, and reconnect through different
* routing node... |
35ced3ada92a49b4ff46817558a9978b3c35ed44 | ca6e7ee08bf29e81050cfe1a43e4dcca0aa4e960 | hdy2001/2021thu10 | /RemoteCtrl/serverprocess.cpp | C++ | cpp | 4,976 | no_license | #include "serverprocess.h"
QImage cvMat2QImage(const cv::Mat& mat)
{
// 8-bits unsigned, NO. OF CHANNELS = 1
if(mat.type() == CV_8UC1)
{
QImage image(mat.cols, mat.rows, QImage::Format_Indexed8);
// Set the color table (used to translate colour indexes to qRgb values)
image.setColor... |
395e57896ad44d29e565cd5de63fe0ac2367114a | 598d38cd88515658a4fc2ba9fe56be1e81b3451b | stuartaroth/programmersguidetothegalaxy | /functions/example.cpp | C++ | cpp | 482 | no_license | #include <iostream>
#include <string>
using namespace std;
int multiply(int x, int y){
return x * y;
}
string greetPerson(string name) {
return "Hello " + name;
}
float getFinalPrice(float amount, float tax=0.05) {
return amount * (1 + tax);
}
int main(){
int i = multiply(6, 9);
// 54
string s = gr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.