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 |
|---|---|---|---|---|---|---|---|---|
c639de4960d4014603c5914003ae3dc5035e7a6f | 2bdbd6fe4dc57a39a5731047de9f4f8178b7c808 | jaguarcode/algorithms | /backgrounds/complete_search/n-queen_problem_r1.cpp | C++ | cpp | 1,256 | no_license | #include <bits/stdc++.h>
using namespace std;
int answer = 0;
vector<vector<int>> board = {
{ 0, 0, 0 ,0, 0, 0, 0 ,0 },
{ 0, 0, 0 ,0, 0, 0, 0 ,0 },
{ 0, 0, 0 ,0, 0, 0, 0 ,0 },
{ 0, 0, 0 ,0, 0, 0, 0 ,0 },
{ 0, 0, 0 ,0, 0, 0, 0 ,0 },
{ 0, 0, 0 ,0, 0, 0, 0 ,0 },
{ 0, 0, 0 ,0, 0,... |
9f93d480751feefdefa9c813085492b5f49d5bf7 | 3bb4cf7a0499c344b6817d6dd62c8d101c8ef277 | Army-Ant/ArmyAntLib | /src/io/AASocket.cpp | C++ | cpp | 66,497 | permissive | /*
* Copyright (c) 2015 ArmyAnt
* 版权所有 (c) 2015 ArmyAnt
*
* Licensed under the BSD License, Version 2.0 (the License);
* 本软件使用BSD协议保护, 协议版本:2.0
* you may not use this file except in compliance with the License.
* 使用本开源代码文件的内容, 视为同意协议
* You can read the license content in the file "LICENSE" at the root of this ... |
d3210d2ea6aa9d3ed6ffd4c3bfd4c0d8fa370ca9 | d03ed560a9ce39508533e2c117d4130ee567c1b9 | ioko-chan/MiniGameInConsole | /lab_6/lab_6.cpp | C++ | cpp | 4,516 | no_license | //Лабораторная работа 2
//Решить лабораторную работу 1 с вынесением способности в отдельный класс.
//Разрешается пойти двумя путями(выберите один из двух) :
//
// 1)Реализовать способность в виде абстрактого класса или интерфейса.
//
// 2)Реализовать способность в виде std::function
//
// Изменить линейку с... |
bf09e3f0de59f9a228519c92077b65254707de6d | 5f4d79d8769ee5ee6b095fb37bfe94b7631f7610 | jackiejohn/fedit-image-editor | /Fiew/ToolBucket.cpp | C++ | cpp | 2,704 | no_license | #include "stdafx.h"
#include "Core.h"
ToolBucket::ToolBucket() : ToolDrawingStrict(new FwCHAR(TOOL_FILBUC),NULL,ICC_FILBUC)
{
this->isPreselect = false;
this->sourceBmp = NULL;
this->cursor = Tool::createToolCursor(19,15,ICC_FILBUC);
this->cursorBackup = this->cursor;
}
ToolBucket::~ToolBucket()
{
... |
7ff6b0f17409620650c93abbeac588b2e5a1b1ec | ccd01173fb5182df46203a46357f32562ee3e5b2 | HandsomeBoy2/PATBasic | /1015.cpp | C++ | cpp | 1,137 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct stu1
{
int num;
int de;
int cai;
};
int cmp (struct stu1 node1, struct stu1 node2)
{
if (node1.de + node1.cai != node2.de + node2.cai )
return (node1.de + node1.cai) > (node2.de + node2.cai);
else if (node1.de != node2.de)
... |
93992eacc0c555062f1763bcbd48b86d3ec58dcc | 2b2d7f8c6da542cb105046eff1e2df429a87418f | BackupTheBerlios/multicrew-svn | /stlplus/source/cli_parser.hpp | C++ | hpp | 12,066 | no_license | #ifndef CLI_PARSER_HPP
#define CLI_PARSER_HPP
/*------------------------------------------------------------------------------
Author: Andy Rushton
Copyright: (c) Andy Rushton, 2004
License: BSD License, see ../docs/license.html
A subsystem for managing command-line parsing, including using INI f... |
461ba0384e31a4d9806cecfda1b11c60b49d07ec | 2dbbc466cba7035d06c7fdd469196d8194b44569 | lakhanshiva/hypro | /examples/example_reduction.cpp | C++ | cpp | 18,902 | permissive | /**
* Example file for polytope reduction.
* @brief [brief description]
* @details [long description]
*
*/
#include <chrono>
#include "../src/hypro/util/Plotter.h"
#include "../src/hypro/datastructures/Halfspace.h"
#include "../src/hypro/representations/GeometricObject.h"
#include "../src/hypro/representatio... |
e3ac6f609220440a76e5af80aa8883f06719ea0b | 7ad3234cd8afd8138ec30a7409dfe7e709e27ba4 | fedeball/Database-Updater-Cpp | /src/Parser.cpp | C++ | cpp | 1,620 | no_license | #include "Parser.h"
std::string Parser::get_json_string(){
Json::FastWriter fastWriter;
return fastWriter.write(root);
}
// gets result as a char* and writes it to a string
std::size_t Parser::write_callback(char *in, size_t size, size_t nmemb, std::string *out){
std::size_t total_size = size * n... |
ccd27132d6e424d10679ba380d565865e5a99d2b | 5ec1adeb2404d1ca55b746f1e1557530b6be2049 | JackBro/DragonVer1.0 | /Cmodel/CmodelAlg/Gates/CmPropGates/Add2GatePropDlg.cpp | C++ | cpp | 3,482 | no_license | #include "internal.h"
//#include "..\..\..\..\include\cmpropgates\add2gatepropdlg.h"
#define MaxOutUnit 4
IMPLEMENT_DYNAMIC(CAdd2GatePropDlg, CImageBoxPropDlg)
CAdd2GatePropDlg::CAdd2GatePropDlg(CWnd* pParent /*=NULL*/)
: CImageBoxPropDlg(CAdd2GatePropDlg::IDD, pParent)
{
/*this->SetFont();*/
}
CAdd2Ga... |
14a0397650faca11310655e10f4cba23f36dd4fe | 7adccc32314bdd75c06f4d0376d2225038b25f5f | blueprintmrk/hhvm | /hphp/runtime/vm/jit/back-end.cpp | C++ | cpp | 1,409 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
5d44a023dcca3e8b5fdf92b37a06b89a49f5bc77 | c9725db496d40d6ac8b54dfa8891cddea2a95dcc | WhiZTiM/coliru | /Archive2/f1/63d885a6c73726/main.cpp | C++ | cpp | 391 | no_license | #include <iostream>
#include <set>
#include <vector>
template<typename T>
auto foo(T t) -> decltype(t.push_back(1), void()) {
std::cout << "push_back\n";
t.push_back(1);
}
template<typename T>
auto foo(T t) -> decltype(t.insert(1), void()) {
std::cout << "insert\n";
t.insert(1);
}
int main() {
... |
c64072a760d06ffb2a3f233ffccaea360cb80151 | 42039f3d84a6f38e39b6e75a5db95f5438a38373 | intel/llvm | /sycl/test-e2e/InvokeSimd/Spec/tuple_return.cpp | C++ | cpp | 4,536 | permissive | // TODO: enable when Jira ticket resolved
// XFAIL: gpu
//
// Check that full compilation works:
// RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out
// RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 %{run} %t.out
//
// VISALTO enable run
// RUN: env IGC_VISALTO=63 I... |
14630d23712227d7c82f1226bb3af5f24c276359 | f9816e08b237ac8411f09bf3a1a4264e80e0bbb7 | Vidvox/VVOSCQueryProtocol | /VVOSCQueryProtocol/WSPPQueryReply.hpp | C++ | hpp | 1,351 | permissive | #ifndef WSPPQueryReply_h
#define WSPPQueryReply_h
#include <iostream>
/* this WSPPQueryReply class exists to provide a simple wrapper for passing reply data between handlers. the nature of the init methods means that an instance of WSPPQueryReply will either be a string, or an error code, or a flag indicating that ... |
48e955f3443ccda5444731adc7b1d5502529b8a5 | ed49f29e728f316a4dc998d3afc9a48ec57057d4 | alexvonduar/gtec-demo-framework | /DemoApps/Shared/HDR/SkyboxTonemapping/include/Shared/HDR/SkyboxTonemapping/MenuUI.hpp | C++ | hpp | 5,192 | permissive | #ifndef SHARED_HDR_SKYBOXTONEMAPPING_MENUUI_HPP
#define SHARED_HDR_SKYBOXTONEMAPPING_MENUUI_HPP
/****************************************************************************************************************************************************
* Copyright 2018 NXP
* All rights reserved.
*
* Redistribution and use... |
839250ef14cd43182da45445605f3fbf55f9e34f | e468822054847f50cc41385e7642f96062116b30 | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | /webkit/browser/quota/quota_manager.cc | C++ | cc | 52,383 | permissive | // Copyright 2013 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 "webkit/browser/quota/quota_manager.h"
#include <algorithm>
#include <deque>
#include <functional>
#include <set>
#include "base/bind.h"
#inclu... |
796059c687d8abe52d9644652c17b82c9e20059e | 4e4a51916b7a7577e82fc9290925ee0b16234e7c | MarcoRezkallah/sohag-univ-programming-labs | /lab1/solutions/p7.cpp | C++ | cpp | 252 | no_license | #include <iostream>
using namespace std;
int main()
{
int n, factorial = 1;
cout << "n = ";
cin >> n;
for (int i = 1; i <= n; i++)
{
factorial *= i;
}
cout << "factorial = " << factorial << endl;
return 0;
} |
29699b06a953ed7d7818fd33817a5d2d8567483b | 3baff967ef5af3755ef200f95033543e0dcb1452 | p-gonzo/cpp_practice | /chp10/listing_10_1.cpp | C++ | cpp | 586 | no_license | #include <iostream>
using namespace std;
class Fish
{
public:
bool isFreshWaterFish;
void Swim()
{
cout << "Swims in " << (isFreshWaterFish ? "lake" : "sea") << endl;
}
};
class Tuna: public Fish
{
public:
Tuna()
{
isFreshWaterFish = false;
}
};
class Carp: public Fish
{
... |
b9f08c30c229d3031d9ffb2a47c7ea2323fda580 | 75b22c013c4c5700f930f8f6275f5cd5f2967493 | pengge/jiaocai_new | /11sourcebk/bsadmin/BIOrderManage/ImportBIOrder.cpp | C++ | cpp | 99,991 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "ImportBIOrder.h"
#include "UnitSelectClient.h"
#include "SelectCatalogForm.h"
#include "SetNotesForm.h"
#include "UnitClient.h"
#include "QryNoteCodeForm.h"
#include "..\..\supplier\detailemessage.... |
087e7c7a0cd08cee0d58a417e01a434785d643f1 | 556b5fcd5eb9e3080801c0a407c7578f61f6525d | akadata/afterburner | /l4ka-driver-native/common/hthread.cc | C++ | cc | 8,155 | no_license | /*********************************************************************
*
* Copyright (C) 2005, University of Karlsruhe
*
* File path: common/hthread.cc
* Description: The hthread library; provides simple wrappers for
* L4 thread management.
*
* Redistribution and use in source and binary fo... |
da4d1c8f328313a7f3546c0537bd4bbf8fe90f4c | f311666f7b4b3ff012dd823524a8574d643b8c59 | jmfb/poker | /CombinationSequences.cpp | C++ | cpp | 669 | no_license | #include "pch.h"
#include "CombinationSequences.h"
CombinationSequences::CombinationSequences()
{
const auto maxN = 268;
sequences.resize(maxN + 1);
for (auto n = 2; n <= maxN; ++n)
{
auto size = (n * (n - 1)) / 2;
auto& sequence = sequences[n];
for (auto i2 = 1; i2 < n; ++i2)
sequence.emplace_back(0, i2)... |
73d7076e308c1e20e4985bce54c04cf8898bcbcd | a61a4b81c513bf20b14e54d9a72e0bb9b16964ec | JonathanCabrera/kattis_solutions | /sibice.cpp | C++ | cpp | 326 | no_license | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int n, w, h;
cin >> n >> w >> h;
double d = sqrt((w*w) + (h*h));
for (int i = 0; i < n; i++) {
int size;
cin >> size;
if (size <= w || size <= h || size <= d) {
cout << "DA" << endl;
} else {
cout << "NE" << endl;
}
}
return... |
7d771ed1a183dbf4bc8d39df6f470f1d57474550 | e16f08d16f5966d22041383b5bba2d3709576717 | ailialy/MusicXML-Class-Library | /Sourcecode/mx/core/elements/StringAttributes.cpp | C++ | cpp | 3,935 | permissive | // MusicXML Class Library v0.2
// Copyright (c) 2015 - 2016 by Matthew James Briggs
#include "mx/core/elements/StringAttributes.h"
#include "mx/core/FromXElement.h"
#include <iostream>
namespace mx
{
namespace core
{
StringAttributes::StringAttributes()
:defaultX()
,defaultY()
... |
7c69c14aa4b3ec34c122b19842127147d888bb49 | 64d6f76b3f098b693dd121f339682afa6fb7e490 | Vegaken/CIS1202 | /C-String.cpp | C++ | cpp | 2,277 | no_license | /*
Kenji Hirai
02/11/2019
CIS1202
Week 5 - String
Assignment 6 - C-String
*/
#include <iostream>
#include <cstring>
using namespace std;
int findW(char workOrderCode[], int codeLength);
long getCustNum(char workOrderCode[], int wIndex);
int getYear(char workOrderCode[], int wIndex);
long getOrd... |
1067bd5e80ee59d5f8fa612372d89cdeca1d7a0c | 167122144d2e8f158d3ebc59a723f0b6dcbbca7b | JoyceClaine/URI-Lista1-Prog-Estrut | /idadedias.cpp | C++ | cpp | 273 | no_license | #include <iostream>
using namespace std;
int main(){
int n, mes, ano, resto, dia;
cin >> n;
ano = n/365;
resto = n%365;
mes = resto/30;
dia = resto%30;
cout << ano << " ano(s)" << endl << mes << " mes(es)" << endl << dia << " dia(s)" << endl;
return 0;
} |
1128d95b5f78775ff2f51ebc11d2cbdd03aa56c2 | 5ac343cf8c379b476d9d1b69afcf503f496a58d2 | SunitRoy2703/tflite-micro | /tensorflow/lite/micro/kernels/detection_postprocess.cc | C++ | cc | 33,460 | permissive | /* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
4988bcb91fa3b2a649318649aee1804bd4ae1c8f | 8fd358abbe8002b71d87082a4a79fb618429bff9 | NetboxGlobal/Netbox.Wallet | /src/test/netbase_tests.cpp | C++ | cpp | 11,630 | permissive | // Copyright (c) 2012-2014 The Bitcoin Core developers
// Copyright (c) 2014-2015 The Dash Core developers
// Copyright (c) 2015-2018 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 "netbase.h"
#... |
a90a30bf83efbcc126b5dd552a7c51077857b151 | f75458938456d8352f83d6f7628b42abb3d881b8 | al-sabr/CTK | /Libs/PluginFramework/Testing/org.commontk.eventadmintest/ctkEAScenario4TestSuite.cpp | C++ | cpp | 10,214 | permissive | /*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... |
0e8936ff0f9ccddd7f84719d10be99af732015b8 | f50a6eff1095226234578b2e87bb07cb102b9152 | trancx/ybtx | /trunk/engine/src/Effect/CEffectUnit.cpp | C++ | cpp | 14,284 | no_license | #include "stdafx.h"
#include "CEffectUnit.h"
#include "BaseHelper.h"
#include "CVector4.inl"
#include "TSqrAllocator.inl"
#include "CEffectGroup.h"
#include "CGraphic.h"
enum
{
CEFFECTUNITPROP_ORIGIN = 0,
CEFFECTUNITPROP_ADD_LOD = 1,
CEFFECTUNITPROP_ADD_VEL = 2,
CEFFECTUNITPROP_ADD_SLOWNDISAPPEAR = ... |
f3536eff84f5dc8ccfc11fe4184e6cf3f805d522 | 728982d9701c8df68e46f6d3f38d8e40a78ee338 | YurleySolimer/ULA | /Programación 3/lab-04/main.cpp | C++ | cpp | 4,898 | no_license | #include <dictnode.H>
#include <string.h> //Libreria utilizada para manejar cadenas de caracteres
#include <stdlib.h> //Libreria utilizada para generar numeros y letras aleatorias(Funcion srand)
#include <time.h>
Tree_Node<char> *t= NULL;
int main()
{
Cnode r('-');
const char *z="hola";
char c= 'a'+ ( r... |
ac7664d358877f21ee0b1571496cf8eac395648f | 42f2f44003eb59cddc660b7e87fe3dc46d811657 | qingqhua/CppDirectXRayTracing | /Tutorials/15-Primitive/Primitives/Cube.cpp | C++ | cpp | 6,399 | no_license | #pragma once
#include "Cube.hpp"
#include <Externals/GLM/glm/gtc/constants.hpp>
void Primitives::Cube::Init(float size, bool uvHorizontalFlip, bool uvVerticalFlip, float uTileFactor, float vTileFactor)
{
float uCoordMin = uvHorizontalFlip ? uTileFactor : 0.0f;
float uCoordMax = uvHorizontalFlip ? 0.0f : uTil... |
f77d9ae26765710c90f99d4bae2ad7fa4c6b7dd8 | c963da6fe088adba8b04b6387df1ff88f4967955 | shibii/nn | /test/src/tanh.cpp | C++ | cpp | 1,412 | permissive | #include <sstream>
#include "catch.hpp"
#include <cereal/types/vector.hpp>
#include "techniques/tanh.hpp"
#include "feed.hpp"
#include "util.hpp"
TEST_CASE("tanh", "[tanh]") {
float hostinput[] = { -1e+20f, -1.f, 0.f, 1.f, 1e+20f };
float hostexpected[] = { -1.f, -.7616f, 0.f, .7616f, 1.f };
af::array expected... |
e037102efe800ae0147bdf96a1225338be23e206 | 7da990b5550a1246b44779065175f318bb62d0c8 | FeiWang/babelfish | /server/emscripten/src/relooper/test.cpp | C++ | cpp | 6,151 | permissive |
#include "Relooper.h"
int main() {
char buffer[10000];
if (1) {
Relooper::SetOutputBuffer(buffer, sizeof(buffer));
printf("\n\n-- If pattern --\n\n");
Block *b_a = new Block("// block A\n");
Block *b_b = new Block("// block B\n");
Block *b_c = new Block("// block C\n");
b_a->AddBranchT... |
769a8f36ca3d0a31ce29fe050648b4f1c22578e6 | bb8f9c06e3ad7586830567dd8de8af78e3b2445c | ergesun/flyingkv | /src/net/net-protocol-stacks/nonblocking/socket/network-api/posix/tcp/net-stack-worker.cc | C++ | cc | 20,133 | no_license | /**
* This work copyright Chao Sun(qq:296449610) and licensed under
* a Creative Commons Attribution 3.0 Unported License(https://creativecommons.org/licenses/by/3.0/).
*/
#include "../../../../../../../common/buffer.h"
#include "../../../../../../rcv-message.h"
#include "../../abstract-file-event-handler.h"
#incl... |
efe5c18b4e950735a5848cc22dbfb67bc6fcea12 | e23a396fa08b2c27d7f33e328e04033e0bcad3de | gsfs/cmssw | /TrackingTools/TrackAssociator/plugins/MuonDetIdAssociator.cc | C++ | cc | 5,839 | permissive | // -*- C++ -*-
//
// Package: TrackAssociator
// Class: MuonDetIdAssociator
//
/*
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Original Author: Dmytro Kovalskyi
// Created: Fri Apr 21 10:59:41 PDT 2006
//
//
#include "MuonDetIdAssociator.h"
// #i... |
6ba9cd103ee0d6c1c25c975be2e01160819fc8b0 | c3580ecbef0f731c0778b4aecff27ffdfd34b5f9 | BackupTheBerlios/fluxbox-svn | /tags/Release-0_9_14/src/FbTk/StringUtil.cc | C++ | cc | 6,622 | permissive | // StringUtil.cc for fluxbox
// Copyright (c) 2001 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org)
//
// 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 wit... |
eb91aa3c3e0ade1ee2d695e50219faa467efc932 | 90b18f6a0d2f98f9a12efbaedafa01addc0ee6f9 | Howiezi/ProcGen | /verticeArray.cpp | C++ | cpp | 25,638 | no_license | #include "verticeArray.h"
unsigned MOUNTS_LIMIT = 50;
unsigned MOUNTS_FLOOR = 30;
unsigned MOUNT_TOP = 10;
unsigned MOUNT_BOTTOM = 7;
void initializeVerticeArrayTextures(float* vertices, unsigned int worldLength, unsigned int worldWidth) {
// Noise
// ------------------------
// Create an empty PPM image
ppm imag... |
19a76090fab68b984ebd5dc7afd9d1835fbedbc2 | 801896c84cb0d014b285f023da665b531100113f | stanleywxc/chromium-noupdator | /src/chrome/browser/ui/views/arc_app_dialog_view_browsertest.cc | C++ | cc | 18,273 | 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 "chrome/browser/ui/app_list/arc/arc_app_dialog.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/macros.h"
#include "base/... |
2fb40a5322e2d6c4168614782a05c5a622b34251 | aa0d0bf1160d4e3837e1a8f8201776a7434ff67e | MarkAGilbert/AdaptiveIDE | /Add_Fine_Detail.hpp | C++ | hpp | 2,358 | no_license | #include<fstream>
#include <string>
#include <sstream>
#include "Parameters.hpp"
using namespace std;
void Add_Fine_Detail(Parameters P){
//ifstream f("temporary_file.bin");
//if (f.good()) {
double** map;
map = new double*[P.landscape_length*P.region_width*P.T/P.print_size]; // Allocate the growt... |
dc6ba297b3a151ec2f3b4e72462c4dcf526cba57 | 4c5bc831d5841461a98f1894eb936bed2f1df53c | Salvare219/CodeLibrary | /acm/Online-Judge/vjudge/code/POJ2234.cpp | C++ | cpp | 425 | no_license | #include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
using namespace std;
int main()
{
// freopen("1.txt","r",stdin);
int n;
while(scanf("%d",&n)==1)
{
int sum=-1,temp;
for(int i=0;i<n;i++)
{
scanf("%d",&temp);
if(sum... |
ed96af8017ec90d72799f392e5cb213589a7c7f4 | c66ccff43ee8bb1e6fd27e7aa7043b25356427d9 | kcudcigam/Problems | /source/2019.08.14/马思博/min.cpp | C++ | cpp | 823 | no_license | #include<bits/stdc++.h>
using namespace std;
int ri()
{
char c=getchar(); long long x=0;
for(;c<'0'||c>'9'; c=getchar());
for(;c>='0'&&c<='9';c=getchar())
x=x*10-'0'+ c;
return x;
}
int fx[10],a[200005];
int f(int x)
{
long long sum=0,cnt;
for(int i=1;i<=4;i++)
{
cnt=fx[i];
for(int j=1;j<=4... |
25c79ee8d5070478545efacfee3100323e4961c8 | d0d45cce8cb2e34a4a015bd47b76ebe4ecae5174 | jpalczewski/simple-p2p | /src/Commands/ResourceDownloadHandler.cpp | C++ | cpp | 3,058 | no_license | //
// Created by kamil on 02/06/17.
//
#include "ResourceDownloadHandler.h"
#include "../Resources/ResourceManager.h"
#include "../Files/FileManagerTypes.h"
#include "../Network/Socket.h"
#include "../Messages/ResourceRequestMessage.h"
#include "../Messages/SendResourceMessage.h"
#include "../Files/FileManager.h"
#inc... |
712a1fdb8c848351e0b145887b744cbf388186df | 23c78e826d4c9cbf78c21e0c8554c52c4bece9ac | ClaytonCalabrese/BuiltRos2Eloquent | /build/nav_msgs/rosidl_typesupport_fastrtps_cpp/nav_msgs/srv/dds_fastrtps/get_plan__type_support.cpp | C++ | cpp | 13,734 | no_license | // generated from rosidl_typesupport_fastrtps_cpp/resource/idl__type_support.cpp.em
// with input from nav_msgs:srv/GetPlan.idl
// generated code does not contain a copyright notice
#include "nav_msgs/srv/get_plan__rosidl_typesupport_fastrtps_cpp.hpp"
#include "nav_msgs/srv/get_plan__struct.hpp"
#include <limits>
#inc... |
4b7af4c5d9b5a6e4677599c5320f603b762ef38c | 68df3972c6036b02259f14ca48ca4fadf294386c | Convery/Desktop_cpp | /Source/Assets/Blobs/Brigmore_Regular_Oblique.cpp | C++ | cpp | 105,971 | no_license | #include <array>
namespace Assets {
std::array<unsigned char, 17284> Brigmore_Regular_Oblique = {
0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x80, 0x00, 0x03, 0x00, 0x60, 0x44, 0x53, 0x49, 0x47,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x42, 0x90, 0x00, 0x00, 0x00, 0x08, 0x47, 0x44, 0x45, 0x46,
0x00, 0x0f, 0x00, 0x00, ... |
621caaf86d503525c608086dce3aaf6a682c5c35 | 094c7c03268557209e8396b0d1afdf1568c85ec2 | thew44/matriochqa | /src/model/mqaconfig.cpp | C++ | cpp | 3,753 | permissive | #include "mqaconfig.h"
#include <QStringBuilder>
MqaConfig::MqaConfig(const QString &i_filename)
{
//m_qemu_exec.insert("x86_64", "qemu-system-x86_64.exe");
settings = QSharedPointer<QSettings>(new QSettings(i_filename, QSettings::Format::IniFormat));
}
void MqaConfig::write()
{
settings->beginGroup("gene... |
876277a87a1e59134ec26cd4acc0f8f4add9e3c6 | 90e657b80dee96278df90797a27518f63a9ee954 | manujagobind/practice-cpp | /Data Structures/hash_tables/chaining.cpp | C++ | cpp | 2,062 | no_license | /*
SIMPLE CHAINING
*/
#include <iostream>
#define TABLE_SIZE 10
using namespace std;
class HashNode{
public:
int value;
HashNode *next;
HashNode(int value){
this->value = value;
this->next = NULL;
}
};
class HashTable{
private:
HashNode **table;
public:
HashTable(){
table = new HashNode... |
88a857415bad214f0d72a15ef19d06dc05c69c57 | bec2123451f5318796111100cb462390082f9e3a | creep06/competitive-programming | /ARC/029/C.cpp | C++ | cpp | 2,780 | no_license | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rept(i,n) for(int (i)=0;(i)<=(int)(n);(i)++)
#define reps(i,s,n) for(int (i)=(s);(i)<(int)(n);(i)++)
#define repst(i,s,n) for(int (i)=(s);(i)<=(int)(n);(i)++)
#define repr(i,n) for(int (i)=(n)... |
42d01147059bb85a52071515856764d71c61ba21 | 5049742531485e25f3b1ed367a74a323f5579c32 | ytatus94/EWK23L | /ytEWK23LAnalysis/Root/yt_regions.cxx | C++ | cxx | 9,733 | no_license | #define YT_REGIONS_CXX
#include "ytEWK23LAnalysis/yt_regions.h"
ClassImp(yt_regions)
yt_regions::yt_regions()
{}
yt_regions::~yt_regions()
{}
//
// Basic cuts
//
bool yt_regions::pass_baseTwoLepCuts(float lept1Pt, float lept2Pt,
bool isEMU, bool isEE, bool isMUMU,
... |
b2a6cdf42cabb5d7a6eebbcf4ab7b78391379fcc | 3c4ded2b0ffce2764c491a3d6ef92aa92e4594e5 | oreshio/petit_TDD | /FizzBuzz/FizzBuzz.cpp | C++ | cpp | 646 | no_license | #include "StdAfx.h"
#include "FizzBuzz.h"
#include <string>
#include <sstream>
namespace
{
const int FIZZ_VALUE = 3;
const int BUZZ_VALUE = 5;
const int FIZZ_BUZZ_VALUE = 15;
}
FizzBuzz::FizzBuzz(void)
{
}
FizzBuzz::~FizzBuzz(void)
{
}
void FizzBuzz::call()
{
std::cout << "Called";
}
... |
9c8939f5878f86ab0af4daaad587a01d598aa9ec | bb29e165789187d78484ab894a688bb1099adb82 | KonstantinStepanovich/SIM | /src/Framework/Header/ISystem.hpp | C++ | hpp | 2,048 | permissive | #ifndef _ISystem_hpp_
#define _ISystem_hpp_
#include "Time.hpp"
#include "Core/ModelTime/ModelTime.hpp"
#include "Synchronization.hpp"
#include <string>
#include <vector>
#include <list>
namespace Sim
{
namespace Framework
{
class ISystemScene;
class ISystemObject;
class ISystemTask;
class IE... |
5e1c11824492c057bc27399403baeb3b16e9581b | 6e061128dbb8d4729e5d18ac73e76677c7d9147b | 0shimax/mkl-dnn-example | /alex_sample/alex_training.cpp | C++ | cpp | 18,630 | permissive | #include <iostream>
#include <numeric>
#include <math.h>
#include <string>
#include "mkldnn.hpp"
using namespace mkldnn;
void simple_net()
{
auto cpu_engine = engine(engine::cpu, 0);
const int batch = 32;
std::vector<float> net_src(batch * 3 * 227 * 227);
std::vector<float> net_dst(batch * 96 * 27 *... |
74d3d8d04c3768d9c8464e5b1bdb3cc16db21087 | e09f2d5451359f81327a841916b2104b5723ac0b | Imarion/WavefrontObjectLoader | /Face/Face.cpp | C++ | cpp | 1,559 | no_license |
#include <QDebug>
#include "Face.h"
void Face::init()
{
mNumFaceData = 0;
mMaterialName = "default";
}
Face::Face()
{
init();
}
Face::~Face()
{
}
void Face::clear()
{
mFaceData.clear();
init();
}
bool Face::read(stringstream &chaine, bool hasNormalCoord, bool hasT... |
dbdf0f71859ef265f9ea658faf08ffb5cb799feb | a2ab2c7b14755080097bc11c4a610c716753966e | DolbyLaboratories/pmd_tool | /xerces/xerces-c-3.2.0/src/xercesc/validators/datatype/AbstractStringValidator.hpp | C++ | hpp | 7,789 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
dc7ea11156654f4e7a661840bbc8cc0337a54f40 | 560cfb31973fd46770134e697ebbd65b9f9f842a | rootlu/leetcode | /leetcode88.cpp | C++ | cpp | 753 | no_license | /*
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
*/
#include<iostream>
#include<stdlib.h>
using namespace std;
void merge(int *nums1, int m, int *nums2, int n)
{
int i = m-1,j = n-1;
int k = m + n - 1;
while (i>=0&&j>=0)
{
if (nums1[i] <= nums2[j])
nums1[k--] = n... |
0dceeda5b125e40d76e282e6b48c060bf119d548 | 8bea7988d12f108ee1aeae410908e947799d2451 | corefan/fluid-engine-dev | /src/jet/points_to_implicit2.cpp | C++ | cpp | 380 | permissive | // Copyright (c) 2017 Doyub Kim
//
// I am making my contributions/submissions to this project solely in my
// personal capacity and am not conveying any rights to any intellectual
// property of any third parties.
#include <pch.h>
#include <jet/points_to_implicit2.h>
using namespace jet;
PointsToImplicit2::PointsT... |
689f32650b1b847ee6016aa5ae386f6781776d68 | 40423b86c907448e033d789e6ef3c5209f756a7e | sensed/simppl | /examples/echo/main.cpp | C++ | cpp | 1,915 | permissive | #include <iostream>
#include "echoservice.h"
#include "simppl/stub.h"
#include "simppl/skeleton.h"
#include "simppl/dispatcher.h"
#include "simppl/string.h"
class MyEchoClient : public simppl::dbus::Stub<simppl::example::EchoService>
{
public:
MyEchoClient(simppl::dbus::Dispatcher& disp)
: simppl::dbus::S... |
1c98922e5d7e8ca0c1367e5e2f39631ecf9476b6 | 5c935014eb8b7ff9dc7ce2c97384e65d6a71da9d | qianfu1997/kmeans | /k-means/Models.cpp | C++ | cpp | 3,819 | no_license | #include"Models.h"
using namespace std;
using namespace cv;
Models::Models(){
m_clusterNums = 0;
m_featureNums = 0;
m_kind = 1;
m_Model = Mat::zeros(1, 1, CV_64F);
m_Threshold = vector<double>();
isInited = false;
}
Models::Models(int clusterNums, int featureNums, int kinds) {
m_clusterNums = clusterNums;
m_f... |
7b9006a07009d594d2d6a540e95d1e2e4886350f | 8f8231e6e1b377b05e5db7bc2794001b37a606f7 | tlund80/DTU_ROBOT | /cal_ti/src/calibration/Calibration.cpp | C++ | cpp | 7,555 | no_license | /*
* Calibration.cpp
*
* Created on: Dec 6, 2011
* Author: THSO/RAHA
*/
#include "../../include/cal_ti/Calibration.hpp"
#include <string.h>
namespace dti {
Calibration::Calibration() {
_maxScale = 2;
_rms = -1;
}
Calibration::~Calibration() {
}
int Calibration::checkForCorners(co... |
90b1f9a17dbf9de60cf69c1d001aac3d95e3b41c | 171ea92226acf0f8850df157777f1c9fa573671d | schinmayee/nimbus | /applications/physbam/physbam-lib/External_Libraries/Archives/boost/boost/mpl/sort.hpp | C++ | hpp | 723 | permissive |
#ifndef BOOST_MPL_SORT_HPP_INCLUDED
#define BOOST_MPL_SORT_HPP_INCLUDED
// Copyright Eric Friedman 2002-2003
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See htt... |
04e68d619d5298e15b51a08facd41d4c9f2c5579 | f17584343e0ba789693a9c18de1ab8365f39f665 | NazaraEngine/NazaraEngine | /include/Nazara/Utility/AbstractTextDrawer.hpp | C++ | hpp | 1,673 | permissive | // Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_UTILITY_ABSTRACTTEXTDRAWER_HPP
#define NAZARA_UTILITY_ABSTRACTTEXTDRAWER_HPP
#inclu... |
fd3c8cd7110c66e25e11ba1430e63ec560c3ac6c | 9c474ef6277bd5ed0a14408fcdd161e35760334c | pobin6/compute-runtime | /shared/source/os_interface/linux/drm_memory_manager.cpp | C++ | cpp | 45,190 | permissive | /*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/linux/drm_memory_manager.h"
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/ex... |
2fde28288597bd4df0b84d013d8e0565a6f5eb35 | 5d4f6815cd2105d4e2923b22e73ddf3f6f456706 | jadrales/Data-Structures-Morse-Code-Converter | /EncoderDecoder.cpp | C++ | cpp | 387 | no_license | #include "EncoderDecoder.h"
// Not sure if we need to add decoder to this or change to a new .h/.cpp
void encoder::create_alphabet()
{
}
encoder::encoder()
{
create_alphabet();
}
std::string encoder::encode(std::string input)
{
return std::string();
}
std::string encoder::get_input()
{
return... |
94628abd2254b000d9722abaa5b2933f429ee232 | 865deb67b347249687552c775432cc095206bb74 | przemek1899/ICA_cpu | /PCA_CULA/main.cpp | C++ | cpp | 2,399 | no_license | #include "helper_timer.h"
#include "pca.cuh"
#include <fslio.h>
#include <fstream>
int main(int argc, char * argv[] ){
//Read nifti data
/*
FSLIO *fslio;
void *buffer;
short x, y, z, v;
fslio = FslInit();
buffer = FslReadAllVolumes(fslio,"/home/pteodors/openfmri/ds105/sub001/BOLD/task001_run001/bold.ni... |
53d71432df099368cad19a1c0c254b14c2a4332a | ee43dd62838fb28f9a5152b0dba76876aebe1c8e | KrzysztofKozubek/Projects | /OCR/OCR/.localhistory/ZajeciaII/1476728319$Source1.cpp | C++ | cpp | 2,432 | no_license | #include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
using namespace std;
vector<Mat> vImageSignCell;
inline string itos(... |
0a25e47783424b13e871ad7aeb9595c329c9fe9d | b653f79de61b0c52a156984b8e5de7de9deed894 | mrwill84/st_asio_wrapper | /asio_client/asio_client.cpp | C++ | cpp | 3,015 | permissive |
//configuration
#define SERVER_PORT 9527
#define FORCE_TO_USE_MSG_RECV_BUFFER //force to use the msg recv buffer
#define CUSTOM_LOG
//the following three macro demonstrate how to support huge msg(exceed 65535 - 2).
//huge msg consume huge memory, for example, if we support 1M msg size, because every st_tcp_socket ha... |
a9c794e7b596f713566f24c51df3fabddf0947cd | 3d9f2af1ec9c6ac75b338cbbbf5df4f9cd98ec7c | Abdulwahaab710/chunkwm | /src/plugins/tiling/config.cpp | C++ | cpp | 23,427 | permissive | #include "config.h"
#include "vspace.h"
#include "node.h"
#include "controller.h"
#include "rule.h"
#include "constants.h"
#include "misc.h"
#include "../../common/ipc/daemon.h"
#include "../../common/config/tokenize.h"
#include "../../common/config/cvar.h"
#include "../../common/misc/assert.h"
#include "../../common/... |
2418cafec98f1d952dea2629f8f87013a2eea3ff | fcc72efbc6ccf606e6804ab46b3dda529b45afda | ToyamaLab/NewSSQL | /lib/site-library/BH/include/boost/proto/debug.hpp | C++ | hpp | 11,208 | no_license | ///////////////////////////////////////////////////////////////////////////////
/// \file debug.hpp
/// Utilities for debugging Proto expression trees
//
// Copyright 2008 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost... |
6b7854635925909363e8aa64a7f698d42eec086a | 9d765f01883caf2c3173e8442cb25e2d2b8a6add | bstatcomp/math | /stan/math/opencl/prim/crossprod.hpp | C++ | hpp | 829 | permissive | #ifndef STAN_MATH_OPENCL_PRIM_FUN_CROSSPROD_HPP
#define STAN_MATH_OPENCL_PRIM_FUN_CROSSPROD_HPP
#ifdef STAN_OPENCL
#include <stan/math/opencl/matrix_cl.hpp>
#include <stan/math/opencl/multiply.hpp>
#include <stan/math/opencl/kernel_generator.hpp>
namespace stan {
namespace math {
/**
* Returns the result of pre-mult... |
0f6588150bb59fec287cdb0998e406c4a22b6cb4 | 2bef6a0badca6815bb20b8751b63177d118312c5 | mtrberzi/z3 | /src/test/bits.cpp | C++ | cpp | 6,778 | permissive |
/*++
Copyright (c) 2015 Microsoft Corporation
--*/
// Test some bit hacks
#include "util/util.h"
#include "util/debug.h"
#include "util/vector.h"
#include "util/mpz.h"
#include "util/bit_util.h"
static void tst_shl(unsigned src_sz, unsigned const * src, unsigned k,
unsigned dst_sz, unsigned con... |
34faadaf0b8f612cea00440a76be9077a3d59d47 | d2f8809628255c56ef5596fed967dcb8b7952855 | dipakpolamreddy/c-learning | /project-3/datatypes.cpp | C++ | cpp | 736 | no_license |
#include <iostream>
int main()
{
int year = 1993;
char character = 'f';
float marks = 78.9;
bool isage18 = true;
double balance = 45677888976;
std::string name = "arjun reddy";
std::cout <<"size of int : " << sizeof(int) << std::endl;
std::cout << "size of int_Min : " << INT_MIN<<... |
fa70fe94c2b3515e3b6fd43a55a00c4ef06c33ef | 055b290aa2f5b3bf4977f269b3c25a34e2c53d04 | borgishmorg/bfu | /Sem_2/Lab_3/Task 2/src/logic/items/weapons/Bow.cpp | C++ | cpp | 339 | no_license | #include "Bow.hpp"
using BattleRoyale::Bow;
Bow::Bow():
Weapon(NAME_, DURABILITY_, COST_, DAMAGE_, DEATH_CHANCE_, DISTANCE_){}
Bow::~Bow(){}
const std::string Bow::NAME_ = "Bow";
const int Bow::DURABILITY_ = 5;
const int Bow::COST_ = 1;
const int Bow::DAMAGE_ = 10;
const int Bow::DEATH_CHANCE_ = 0;
const int ... |
84d2d670678ba95342436ded7a94b4ac0ccdbbf8 | 510438aaf38c83c5011a51104ebab65acc36d135 | kuochuanpan/gamer-fork | /src/Auxiliary/Aux_Check_Parameter.cpp | C++ | cpp | 60,165 | permissive | #include "GAMER.h"
#include "CUFLU.h"
#ifdef GRAVITY
#include "CUPOT.h"
#endif
//-------------------------------------------------------------------------------------------------------
// Function : Aux_Check_Parameter
// Description : Check the initial parameter setting
//-------------------------------------... |
813ce3e21610e1e520787bcde405647fe42b6cd2 | 535236424d1fc2b806d0715962899de8f2dfc6dc | zhuangli1987/apollo | /modules/perception/common/test/common_graph_connected_component_analysis_test.cc | C++ | cc | 2,439 | permissive | /******************************************************************************
* Copyright 2018 The Apollo 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
... |
3a4b465d6564561da5e575fbf61ee3753da2b13c | 19eb2f204d9f49f26ba4d4f948e96d05217f5729 | GoodRon/saber-test | /binary/binary.cpp | C++ | cpp | 678 | no_license | #include <iostream>
void printBinary(long long value) {
unsigned long long mask = 1;
mask <<= (sizeof(mask) * 8 - 1);
// Skip zeros for positive values (optional part)
while (!(value & mask) && (mask > 1)) {
mask >>= 1;
}
std::cout << "b";
while (mask != 0) {
if (value & mask) {
std::co... |
281f310412ce9877cae103593526e3674c70554f | c9d986fed7c42fa35b1f6b90f17d2aa1f433940a | LBL-EESA/TECA | /test/test_component_area_filter.cpp | C++ | cpp | 6,595 | permissive | #include "teca_2d_component_area.h"
#include "teca_component_area_filter.h"
#include "teca_dataset_capture.h"
#include "teca_cartesian_mesh_writer.h"
#include "teca_system_interface.h"
#include "teca_metadata.h"
#include "teca_dataset.h"
#include "teca_cartesian_mesh.h"
#include "teca_variant_array.h"
#include "teca_va... |
94097ba657cd7ad565bfed09731a3c4a07e5b0d8 | 73eff44b50667d5397d73613b7245f6bd23c64a4 | Escapist70/chromiumos | /src/platform/window_manager/shadow.cc | C++ | cc | 5,712 | permissive | // Copyright (c) 2009 The Chromium OS 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 "window_manager/shadow.h"
#include <cmath>
#include <gflags/gflags.h>
#include "chromeos/obsolete_logging.h"
DEFINE_string(shadow_image... |
7fef9b95c3fe53e99802c30906f0274cb96e7c48 | 395463aed358ec13f01de2622dee1b8642cc8a21 | JakubGrajciar/gvisor | /test/syscalls/linux/fpsig_nested.cc | C++ | cc | 4,050 | permissive | // Copyright 2018 The gVisor 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 agree... |
0fb1a61e920597b85ecf77020827eaeff9c60437 | 8773cc93f3bf6ea50fa1837aaaa3fbcc10b61b71 | AlexBolotsin/OGL-renderer | /GLWindow.cpp | C++ | cpp | 2,919 | no_license | #include "GLWindow.h"
#include <memory>
GLWindow::GLWindow(GLint windowWidth, GLint windowHeight)
{
width = windowWidth;
height = windowHeight;
memset(keys, false, 1024);
mouseFIrstMoved = true;
xChange = yChange = 0.f;
}
GLWindow::~GLWindow()
{
}
int GLWindow::Initialize()
{
if (glfwInit() ... |
981b46bfe47aec16a0631770b8e8b58da3a6d794 | 1a8bc874685e53e11e70be404c486200c2b0205f | cdsama/LeetCode | /src/1005.cpp | C++ | cpp | 1,030 | no_license | #include "LeetCode.hpp"
/*
1005. Maximize Sum Of Array After K Negations
Easy
Given an array A of integers, we must modify the array in the following way: we choose an i and replace A[i] with -A[i], and we repeat this process K times in total. (We may choose the same index i multiple times.)
Return the largest possi... |
e6180c50cea7743d131e1c4a02c6055a6294eac9 | 1e98168e99e911080185ee6425bb5167154c3770 | lastyhf/stepcode | /src/fedex_plus/complexlist.cc | C++ | cc | 11,145 | permissive | /*****************************************************************************
* complexlist.cc *
* *
* Description: ComplexList is a class type which represents inheritance *
* ... |
36c93f0b14eba4b0dd6da038a4bace8d02372c8f | 60079e7638f16775ce86dce53fcdd063f6c2908b | yeger00/ctcrclog | /include/ctfixed_string.hpp | C++ | hpp | 601 | no_license | #ifndef __CTFIXED_STRING_HPP__
#define __CTFIXED_STRING_HPP__
template<unsigned N>
struct FixedString {
char buf[N + 1]{};
constexpr FixedString(char const* s) {
for (unsigned i = 0; i != N; ++i) buf[i] = s[i];
}
constexpr FixedString(const FixedString& other) {
for (unsigned i = 0; i ... |
d49e19f958ba1a82fa57152f4c945965d4658091 | 1ac2848dcb6c8394bad7d6973c155425cf3ca4b4 | THENANDURI/MyPython | /MyPython.cpp | C++ | cpp | 37,384 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <vector>
#include <cctype>
#include <deque>
#include <map>
using namespace std;
// All tokens must derive from this token type
class base_token
{
public:
typedef enum {t_invalid_token=0, t_symbol,
t_integer, t_literal,
t_const... |
08d4d641d97d3a52c124f0f0bee64d66dfb58007 | da05a48d128b7d674d79b96f1f040c37eebb5788 | Jonkoping/data | /src/QSyncher_V2/Code/Components/Configuration/QConfigure/QMobileConfigure.cpp | C++ | cpp | 2,522 | no_license | #include "StdAfx.h"
#include "QMobileConfigure.h"
#include "QConfigXMLParser.h"
namespace QSYNC_LIB
{
CQMobileConfigure *g_pSingleton = NULL;
QCONFIGURE_CLASS_DLLEXT CQMobileConfigure* GetMobileConFig()
{
if(g_pSingleton == NULL)
g_pSingleton = new CQMobileConfigure();
return g_pSingleton;
}... |
28bfc7618c4d4d69a16cf14ad50142935c691b44 | c541f49ce34f3b313834c0884aa17f929a891462 | choeyeonho/pp | /CLServerEngine(ver1.0.3)/CLServerEngine/CLServerEngine/Percentage.cpp | C++ | cpp | 903 | no_license | #include "Percentage.h"
CPercentage::CPercentage(void)
{
}
CPercentage::~CPercentage(void)
{
}
//_fPercentage의 확룔로 성공, 실패를 반환
BOOL CPercentage::GetRandomSuccess(float _fPercentage)
{
float fRandom = GetFloat(0.01f, 100.0f);
return (fRandom <= ROUND(_fPercentage, 2))? TRUE : FALSE;
}
//_nMin... |
a57767a752219c1fe4df67e1452e499d49f11b52 | 18410cf614a2d9d07b718ad4830a71b4d488beb2 | metux/chromium-suckless | /ui/views/examples/button_example.cc | C++ | cc | 5,290 | 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 "ui/views/examples/button_example.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/resource/resource_bundle.h"
#include... |
00a5e8e9865f9b40ff2836f478b8a45c68f53646 | 82acb86aa076a292e457a8c62412d94c018ba517 | Prakarshwiz/DAA-5TH-SEM | /week0/linearsearch.cpp | C++ | cpp | 527 | no_license | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
cout<<"Enter the no. you want to find";
int temp;
cin>>temp;
bool isFound = false;
for(int i=0;i<n;i++){
if(arr[i] == temp){
isFou... |
ada3d7b7a1eb03a0c0faea2760fd882b2c6b8e9c | bd6817e63b7044ac2c4f0da232a7304f4b1bf638 | mudit1729/LeetCode | /54.cpp | C++ | cpp | 893 | permissive | class Solution {
public:
vector<int> spiralOrder(vector<vector<int>>& matrix) {
int curRow = 0;
int curCol = 0;
vector<int> ans;
int szR = matrix.size();
if(szR == 0) return ans;
int szC = matrix[0].size();
int maxRow = szR-1;
int maxCol = matrix[0].si... |
1d827c6ce521a8b84a3998e86bbbf12880fdf272 | 72fc8931254c828c3c92a3476c42905dd4110524 | svifylabs/signal-slot-benchmarks | /benchmark/hpp/benchmark_sss.hpp | C++ | hpp | 933 | no_license | #ifndef BENCHMARK_SSS_HPP
#define BENCHMARK_SSS_HPP
#include "../lib/supergrover/sigslot/src/signal.h"
#include "../../benchmark.hpp"
class Sss : public SigSlotBase
{
NOINLINE(void handler(Rng& rng))
{
volatile std::size_t a = rng(); (void)a;
}
public:
using Signal = Signal<Rng&>;
... |
a671ae4f9bb5f43db8076820e6d277937a0189e2 | cbbb353ee0bd4cd9b425048d954f32917ffe228e | Empire843/CPPNew | /String9.cpp | C++ | cpp | 713 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
string s1;
cin >> s1;
long long sum = 0;
long long num = 0;
int i = 0;
int k = 0;
int max = -1;
while(i < s1.length()){
num = 0;
k =... |
0fc966ff0ea2af928d4ffae6c1f7de9a82508aec | 9a3e0d6b3d9943403d5447677099f32bbadd098e | phooeniix/algorithms | /Lista 8/exercicio1.cpp | C++ | cpp | 554 | no_license | /*Autor: Alexandre Carvalho
* Escreva um subprograma que verifica
* se um vetor V[0..n-1] está em ordem crescente.
*
* */
#include <iostream>
using namespace std;
bool Verifica(int n, float vet[]){
for(int i=0;i<n-1;i++){
if(vet[i]>vet[i+1]) return false;
}
return true;
}
float LeVetor(int n, float vet[], in... |
a0adb57e98475d71a7a2c58af1cf8a0478e238d4 | 0499974912e81ed73be79efe0c3c84d146631640 | timsat/tomatl | /src/ui/Tray.cpp | C++ | cpp | 794 | permissive | /*
* Copyright (c) 2010-2014 Célio Cidral Junior.
* Modified work Copyright (c) 2021 Timur Sattarov.
*
* 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... |
c244de35c4206f3272a3677a2cfe808f1922ff6a | 5fbda2ed744c007c3527c09a41f1fce7b193fa72 | slixurd/Fundamental-Programming | /graphic/lsystem.cpp | C++ | cpp | 2,358 | no_license | #include<iostream>
#include<cmath>
#include<string>
#define MAX 65535
using namespace std;
string lsystem("BAB");//initial of l-system
string patternA("AA");
string patternB("A[B]AA(B)");
string replaceA("A");
string replaceB("B");
struct Point{
float x1;
float y1;
float x2;
float y2;
};
Point point[M... |
40ed40147fe2ded5aea9b3c4fa9004eba76eccd9 | ea83b48c14f0c4a06c5eb412f2a198abe6d4707c | Hephaestus256/DX-3D-Engine---May-2006 | /bmp.cpp | C++ | cpp | 12,324 | no_license | #include <stdio.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
#include <dpmi.h>
#include <io.h>
#include <pc.h>
#include <dos.h>
#include <sys\farptr.h>
#include <go32.h>
#include "math2d.h"
#define HIGH_COLOR_320x200 0x10e
#define TRUE_COLOR_320x200 0x10f
#define HIGH_COLOR_640x480 0x111... |
6d2306226fbb96fdc1dc5901c1ee63df3b79c647 | 01dd5b6bf181ea16232b89257c6615eb6478cfa3 | Vaa3D/vaa3d_tools | /hackathon/itk_vaa3d_plugins/examples/Filtering/ThresholdImageFilter.cxx | C++ | cxx | 9,989 | permissive | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |
a21866301174d8a49362eb4aaae28d3e1c60b0a6 | 12f987067ac635242f1145bc5c58e179788f8698 | chncwang/mindspore | /mindspore/lite/src/cxx_api/types.cc | C++ | cc | 5,473 | permissive | /**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* 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... |
d5742765a03ea53cf27cffdd12a2350695b384c5 | 233ab8c82b9ca99af5d778eedc7becc441aed2b0 | HD650/LeetCode_Practice | /LongestSubstringWithoutRepeatingCharacters.cpp | C++ | cpp | 4,246 | no_license | /*
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the length of 3. Note that the answer must be a substrin... |
2f92654867b2928068b68ba88b85f009f35a3c86 | dd2cf4bc0bb68ce38aa7d472ba19d768d0a3ada5 | allenxuan/OpenGL_Practice | /learn_shader_temp.cpp | C++ | cpp | 7,494 | no_license | #include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <cmath>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow *window);
// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
const char *vertexShaderSource = ... |
ad808e18b7ca67c67726991ebd0aaafa19e21b7b | 4afccbc5c637dab5f28f565d1c9e219d4c9182a9 | sshyran/openmpt | /mptrack/Mptrack.cpp | C++ | cpp | 57,929 | permissive | /*
* MPTrack.cpp
* -----------
* Purpose: OpenMPT core application class.
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#include "stdafx.h"
#include "Mptrack.h"
#include "Mainfrm.h"
#include "IPCWindow.h"
#incl... |
e025be0f924a2a1d927c73f48819beed90f092d3 | 165ec07dd34525370418e9ea34d4ab052ffed746 | daedalus/bitcoin | /src/bitcoinrpc.cpp | C++ | cpp | 47,908 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
#include "init.h"
#include "util.h"
#include "sync.h"
#include... |
f4c25e173335d5ab384e36ff074e83f8a64ab862 | d54df12008bc6f0c8535b0ff013b3e784dbe34e8 | John-Jasper-Doe/Lab5 | /test/testgui.cpp | C++ | cpp | 2,249 | no_license | /**
* @file testgui.cpp
* @brief Implementation of the test GUI class.
*/
#include "testgui.hpp"
#include "core/viewer.hpp"
#include <iostream>
#include <string>
namespace test {
namespace {
void print_func_name(const std::string& str) {
std::cout << "\n[" << str << "]:\n";
}
} /* Anonymous:: */
test_gui:... |
331675d35f6099485e470ac50853c26356d7d756 | 3440a678da287d8975f032184c9bf882fe328ad7 | guillaumeBoufflers/Bomberman | /gdl-object/headers/GDLText.hh | C++ | hh | 541 | no_license |
#ifndef __GDLTEXT_HH__
#define __GDLTEXT_HH__
#include "common.hh"
#include "IGDLObject.hh"
class GDLText : public IGDLObject
{
private:
gdl::Text _text;
int _actionDefault;
void setPosition(unsigned int x, unsigned int y);
void setSize(unsigned int size);
public:
GDLText(const std::string &, int... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.