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 |
|---|---|---|---|---|---|---|---|---|
7736561fbd86528905f35db27e46871c4163e0e7 | 188eec8c63d2ac71e814d6308d74866d2eac2320 | wangwu59105/yuv | /yuv/src/main/cpp/YuvJni.cpp | C++ | cpp | 20,172 | no_license | #include "YuvJni.h"
#include "YuvConvert.h"
extern "C"
JNIEXPORT void JNICALL
Java_com_libyuv_util_YuvUtil_yuvCompress(JNIEnv *env, jclass jcls,
jbyteArray nv21Src, jint width,
jint height, jbyteArray i420Dst,
... |
379832de5dafd44f8d795eb463b8556db42c4201 | 1da5b675f00aa0f9dc06e62c9d6b2b452ab2a59d | thalyson004/solutions | /codeforces/1800_A_theBeatles.cpp | C++ | cpp | 1,271 | no_license | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ii pair<int,int>
#define iii pair<ii, int>
#define iiii pair<ii, ii>
#define viiii vector< iiii >
#define viii vector< iii >
#define vii vector< ii >
#define vi vector< int >
#define int long long
#define sz(x) ((int)x.size())
#def... |
85902e605c1fff4d517c7028a3524082e04903f2 | 3f1772fe5a453f103e88225e34c426f531f305f2 | rushikeshg25/Competative-Coding-Solutions | /young-phy.cpp | C++ | cpp | 1,292 | no_license | #include "bits/stdc++.h"
using namespace std;
#define max(a, b) (a < b ? b : a)
#define min(a, b) ((a > b) ? b : a)
#define mod 1e9 + 7
#define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++)
#define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a)++)
#define FORR(a, b, c) for (int(a) = (b); (a) >= (c); (a)--)
#define INF... |
18d125fd89d17ff4f97008f5a6a6d2766247dce5 | 2154ea2f606055fb7c1274a8c475dba0aa8c0a97 | IntelligentSoftwareSystems/Galois | /libgalois/test/static.cpp | C++ | cpp | 2,242 | permissive | /*
* This file belongs to the Galois project, a C++ library for exploiting
* parallelism. The code is being released under the terms of the 3-Clause BSD
* License (a copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
26553f9c275894e6908af9eed8718e00ddeb3aee | 9bb5596b493d90c09cb722a7a01cfeb7f0682479 | Ntels-sup/SRC_ATOM_BE | /SERVER/NM.ORG/CCommandNm.cpp | C++ | cpp | 11,065 | no_license | /* vim:ts=4:sw=4
*/
/**
* \file ???.cpp
* \brief ???
* ???
*
* $Author: junls@ntels.com $
* $Date: $
* $Id: $
*/
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include "CommandFormat.hpp"
#include "CFileLog.hpp"
#include "CProtocol.hpp"
#include "CSocket.hpp"
#include "CMesgExch... |
86f2de10f580701ea2cd4e88087b9fcf32ea6239 | b68cc31207cff64d937e40ad3befee536b6b768f | rranjik/ideal-octo-barnacle | /820-ShortEncodingOfWords.cpp | C++ | cpp | 1,083 | no_license | struct trie{
struct node{
vector<shared_ptr<node>> children;
node(){
children = vector<shared_ptr<node>>(26);
}
};
shared_ptr<node> root;
void insert(const string& s){
auto r = root;
for(int i = 0; i<s.length(); i++){
if(!r->children[s[i]-'... |
7e210c24f61ff0365165ee4e0b91a1f4313bd650 | b800067f75ace64ab25cc1c784786d7f2a094798 | StrikeW/OJLIBS | /inc/ojlibs/bit_trick.hpp | C++ | hpp | 942 | permissive | #ifndef OJLIBS_INC_BIT_TRICK_H_
#define OJLIBS_INC_BIT_TRICK_H_
#include <cstdint>
#include <utility>
namespace ojlibs { // TO_BE_REMOVED
// http://aggregate.org/MAGIC/
static inline unsigned all_ones(unsigned x) {
x |= (x >> 1);
x |= (x >> 2);
x |= (x >> 4);
x |= (x >> 8);
x |= (x >> 16);
re... |
343b179a823b89d7b495f5602a4af5baf6e399bc | 700425b2474f1f89e0886619fea53f715f40864b | geraldstanje/equation_solver | /main_test.cpp | C++ | cpp | 775 | no_license | #include "solver.h"
#include "y.tab.hpp"
#include <iostream>
#include <fstream>
#include <vector>
#include <cassert>
int yyparse();
int yylex();
extern FILE *yyin;
extern Solver solver;
int main(int argc, char *argv[]) {
yyin = fopen("test/equations1.txt", "r+");
yyparse();
fclose(yyin);
bool can_sol... |
699cc62000094a11a4bac718489e455fade6fede | 2620ca8a1c8f05716374a3153725bfa1a6caf5c4 | ScoreSolutions/TRIUM-VRM | /FaceRecognition/Include/NCustomParameterDescriptor.hpp | C++ | hpp | 2,098 | no_license | #ifndef N_CUSTOM_PARAMETER_DESCRIPTOR_HPP_INCLUDED
#define N_CUSTOM_PARAMETER_DESCRIPTOR_HPP_INCLUDED
#include <NParameterDescriptor.hpp>
namespace Neurotec { namespace ComponentModel
{
#include <NCustomParameterDescriptor.h>
}}
namespace Neurotec { namespace ComponentModel
{
class N_CLASS(NCustomParameterDescriptor... |
3ca419d185a137474dcd8ce864a36c155cce1a16 | 0e795db6b0fbc8677f27f091556c3d4f36789e2a | iridium-browser/iridium-browser | /net/network_error_logging/network_error_logging_service_unittest.cc | C++ | cc | 74,185 | permissive | // Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/strings/stringprintf.h"
#include "... |
615b41b7b08d8cada3a6b2701be88c0b82567c0f | e0500c3adc1d94d83c2c45c2d774ca9783f58b5c | Jatin-Kumar-Khilrani/genericPeripheralLibraryMultithreaded | /EepromIntreface.cpp | C++ | cpp | 3,626 | no_license | #include <stdio.h>
#include <string.h>
#include "LibInterface.h"
#define FILE_EEPROM "/sys/bus/i2c/devices/3-0050/eeprom"
#define EEPROM_SIZE_IN_BYTES 4096
#define PD11_GPIO 107
#define EEPROM_OFFSET 50
E_JATIN_ERROR_CODES WriteEeprom(char *data, int offset, int length)
{
FILE *fp = NULL;
E_JATIN_ERROR_CODES ret = ... |
188c313bb643cd51f82f9aa45be20c448a8ed1c8 | 28b7cc68149fb4ec862139f6009427ef850f80a8 | zhengyhn/leetcode | /io/github/zhengyhn/leetcode/longest_substring_without_repeating_characters/longest-substring-without-repeating-characters2.cpp | C++ | cpp | 746 | permissive | #include <iostream>
#include <unordered_map>
using namespace std;
class Solution {
public:
int lengthOfLongestSubstring(string s) {
unordered_map<char, int> indexes;
int ret = 0;
int left = 0;
int right = 0;
while (right < s.size()) {
if (indexes.find(s[right]) == indexes.end()) {
... |
54e9bbd1664209be0042bd823fb141c1ffec8389 | a51af4c9e2dd507cae6bc42186f19ce42342e2cf | daniboybye/Object-oriented-programming | /xhtml_parser/property.cpp | C++ | cpp | 3,036 | no_license | #include "property.h"
#include "functions.hpp"
#include <cstring>
#include <iostream>
namespace fmi {
namespace oop {
Property::Property(const char * str) {
unsigned long count = 0;
this->Init(str,count);
}
Property::Property(const char *& str, unsigned long & count) {
this->Init(str, count);
}
... |
8ddc892addcdcff0da4a5aa69524baf184a12184 | 43e9315ac18cc3ad148aa6590e71b79e980024ce | SunicYosen/nvmain-make | /src/Config.cpp | C++ | cpp | 14,555 | no_license | /*******************************************************************************
* Copyright (c) 2012-2014, The Microsystems Design Labratory (MDL)
* Department of Computer Science and Engineering, The Pennsylvania State University
* All rights reserved.
*
* This source code is part of NVMain - A cycle accurate timing... |
61a33e6b75b6a5e041440dfd56eeaeeb8345bde2 | 1c0ccbf394e1a9a79786fb528f959bfca1a89e8d | arangodb/arangodb | /3rdParty/boost/1.78.0/boost/random/detail/gray_coded_qrng.hpp | C++ | hpp | 5,182 | permissive | /* boost random/detail/gray_coded_qrng.hpp header file
*
* Copyright Justinas Vygintas Daugmaudis 2010-2018
* 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)
*/
#ifndef BOOST_RANDOM_DETAIL_GRAY_CODED_QRNG_HPP
#... |
e95505a9e1c0e690a366ea23fb0450a9260daf23 | 807953dc56a2711dec5b373e51f84e7698c1fdec | Surflyan/Code-Set | /DataStructure/Huffman/Huffman/main.cpp | C++ | cpp | 2,664 | no_license | /*此程序实现了通过哈夫曼编码来压缩任意格式文件
在一些字符串操作调用了字符操作函数倒置压缩大文件有明显的延迟
压缩文件,生成编码本,解压后文件需要手动输入文件名,可优化为自动添加后缀和手动选择
以后再改。*/
//2016.12.4
#include <iostream>
#include <cstdio>
#include "huffman.h"
using namespace std;
int main()
{
char fileName[256];
char passFileName[256];
char compressFileName[256];
c... |
4a0ee2316829b0f551339c7a91c75b8f5659fb84 | f506b36b016f232dfeea73f7375b82486ca1405f | mathemage/CompetitiveProgramming | /tools/code-snippets/c++/pascal_triangle/pascal_triangle.cpp | C++ | cpp | 1,453 | permissive |
/* ========================================
* File Name : pascal_triangle.cpp
* Creation Date : 16-01-2021
* Last Modified : So 16. ledna 2021, 00:47:32
* Created By : Karel Ha <mathemage@gmail.com>
==========================================*/
#include <bits/stdc++.h>
using namespace std;
#define en... |
6c5ee179480fa5b3479216b97358c769355e4353 | 7d1973711d2d720141a106e68584cfcbe7d7900a | CATQ/Hello-world2 | /025.cpp | C++ | cpp | 542 | no_license | #include<stdio.h>
int main(){
int n, i, j, t, an;
int a[2333];
int b[2333];
int c[2333];
scanf("%d", &n);
for (i=0; i<=n-1; i++)
{
scanf("%d", &a[i]);b[i]=0;
}
for (j=0; j<=n-2; j++)
{
for (i=0; i<=n-1; i++)
if (b[i] == 0) t=i;
for (i=0; i<=n-1;i++)
if ((a[t]>a[i]) && (b... |
99f7c926012aa8482e4229b723bee72c059f7b0c | 455119c868370917285e8ed296b7e4103096c7c8 | Hyperzsb/bit-cs | /2019/programming-method-and-practice/23-statistics-on-trees/main.cpp | C++ | cpp | 1,392 | permissive | #include<stdio.h>
#include<vector>
using namespace std;
vector<int> map[200010];
vector<int> flag[200010];
int depthList[200010] = {0};
int size[200010] = {0};
int dfs(int index, int depth, int parent) {
depthList[index] = depth;
for (int i = 0; i < map[index].size(); i++) {
if (map[index][i] == paren... |
3b6085544410803a2c1f384dbad31eccdce8b3fe | ed68b789ca2aeec9faea55f88321a873b7d7bb75 | JackNguyen1209/BTTHCL-NTH | /Bai027.cpp | C++ | cpp | 611 | no_license | // Bai027.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
void main()
{
float x;
float y;
cout<<"Nhap x:";
cin>>x;
cout<<"\nNhap y:";
cin>>y;
if(x<0 && y<0)
{
x=abs(x);
... |
ff3bb63e9871fc7e4cfbe8841c266d0fa503ab97 | cd75af17894b55970a61291e8a51b1853fc1dca2 | artisdom/cpp_snippets | /qt5/patterns.cpp | C++ | cpp | 1,028 | no_license | #include <QApplication>
#include <QPainter>
#include "patterns.h"
Patterns::Patterns(QWidget *parent) : QWidget(parent)
{ }
void Patterns::paintEvent(QPaintEvent *e) {
Q_UNUSED(e);
doPainting();
}
void Patterns::doPainting() {
QPainter painter(this);
painter.setPen(Qt::NoPen);
painter.setBrus... |
fb5a0f10463561e7493cb8c640d39ddc7a1af96a | d995ca155324f935587fe22f5c76d09c0f9a723f | YuMoZhiChu/OpenWaterL | /src/code/Demo/demo7_transform.cpp | C++ | cpp | 6,543 | no_license | // 简单的矩阵变化
#include "demo7_transform.h"
// 如果是 extern, 就直接 #include 即可
// #define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
void Demo7_Init()
{
Demo7_Transform_NSP::Demo_Instance().Init();
}
void Demo7_Render()
{
... |
6c9794ed416a7666371d35ed7d0c2f58b4916fc7 | 62c751ac12cfae7be50818c59e8eb39a16ef5cb3 | llvm-zh/clang-src | /unittests/Tooling/RefactoringActionRulesTest.cpp | C++ | cpp | 8,209 | permissive | //===- unittest/Tooling/RefactoringTestActionRulesTest.cpp ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
936bc6c31fae4909e7542dd1fe0693bb905d1335 | 040209edecbe96a8e92324abe8409e3ca9f67349 | mdibuhossain/Codeforces_Codes | /Numbers_on_Whiteboard.cpp | C++ | cpp | 2,273 | no_license | /*
██▓ ▄▄▄▄ ██▀███ ▄▄▄ ██░ ██ ██▓ ███▄ ▄███▓
▓██▒▓█████▄ ▓██ ▒ ██▒▒████▄ ▓██░ ██▒▓██▒▓██▒▀█▀ ██▒
▒██▒▒██▒ ▄██▓██ ░▄█ ▒▒██ ▀█▄ ▒██▀▀██░▒██▒▓██ ▓██░
░██░▒██░█▀ ▒██▀▀█▄ ░██▄▄▄▄██ ░▓█ ░██ ░██░▒██ ▒██
░██░░▓█ ▀█▓░██▓ ▒██▒ ▓█ ▓██▒░▓█▒░██▓░██░▒██▒ ░██▒
░▓ ░▒▓███▀▒░ ▒▓ ░▒▓░ ▒▒ ▓▒█░ ▒ ░░▒░▒░▓ ... |
9a30ff02c4d64d9e2fa187189a915701cc4335c9 | f82789dfd185dfa17541a5573f1899ad43f48429 | Hyperion60/HyperEFREI-L1 | /Programmation C/TD/20XX-XX/TD1/Code/theme2ADSLameliore.cpp | C++ | cpp | 1,202 | no_license | /*
* On veut maintenant améliorer le programme concernant les services ADSL en proposant à l'abonné de choisir
* les services qu'il veut parmi ceux qui sont disponibles en considérant que son atténuation lui permet d'accéder
* à tous les services (cas où A <37).
* L'internet 5 Mb vaut 19,99 €/mois, la TV 4,99 € par moi... |
3443ed7ca00f38af28ea5fb1ec4a246fd2fb291e | 420039ecb53dd1e8c319cef4dd0f989bb0c84d7f | Tiecoon/Project-Coati | /VoidEngine/EngineCore/src/event_system/events/WindowResizedEvent.cpp | C++ | cpp | 657 | no_license | //STD Headers
//Library Headers
//Void Engine Headers
#include "event_system/events/WindowResizedEvent.h"
namespace core {
WindowResizedEvent::WindowResizedEvent(int width, int height)
: Width(width), Height(height) {
}
utils::Name WindowResizedEvent::GetEventType() const {
return utils::Name("WindowResi... |
7deefa8ba7a62208e2645e78883050cd02a90a29 | cd7fee5acb1515fd6b73fdd46406f0c35af7cb18 | juangil/programmingContests | /clasificatorias2013/cutSilverBar.cpp | C++ | cpp | 333 | no_license | # include <cstdio>
# include <iostream>
# include <cstdlib>
# include <cmath>
# include <algorithm>
using namespace std;
int myf(int n){
int cont = 0;
while(n--){cont++; n/=2}
return cont;
}
int main(){
int n;
while(cin >> n and n){
cout<<myf(n) - 1<<endl
}
... |
5c483df40663f598426959b4e46f8a1156b7b174 | 3cf6369a8b59547c951ecda7bc57d270b6de02f5 | divakararao76/charan | /primeupton.cpp | C++ | cpp | 820 | no_license |
#include<iostream>
using namespace std;
/*int main()
{
int number,loopi,count,loopj;
cin>>number;
for(loopi=1;loopi<=number;loopi++)
{
count=0;
for(loopj=1;loopj<=loopi;loopj++)
if(loopi%loopj==0)
count++;
if(count==2)
cout<<loopi<<" ";
}
return 0;
}
*/
long long int x=1000;
long long int s[1000];
vo... |
e2af0a036273b6f7a6292a2ea64dfccdb017c4d0 | 73a7968055dc5edda8e3913a892d2d761bac85c4 | Jeonyujeong/Algorithm | /cpp/dfs/2583.cpp | C++ | cpp | 1,307 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#define MAX 101
using namespace std;
int m, n, k;
int board[MAX][MAX];
int visit[MAX][MAX];
void draw(int lx, int ly, int rx, int ry) {
for (int i=ly; i<ry; i++) {
for (int j=lx; j<rx; j++) {
board[i][j] = 1;
}
}
}
int ... |
2cd99928b603d8a60a6e0c9a25d42f2f5d750655 | ac14c4f3f07802bfbf5890c63e4d423234d4cb77 | dhanendraverma/Daily-Coding-Problem | /Day2.cpp | C++ | cpp | 1,293 | no_license | /*--------------------------------------------------------------------------------------------------//
Given an array of integers, return a new array such that each element at index i of the new array //
is the product of all the numbers in the original array except the one at i. //
For exam... |
fac8c897525589abdf914ddd212e1e92efa4cd86 | c46cf7a7f87cc1d717d494c0b26fea9c0fb81383 | entboost/ebc | /src/include/POPCLogonCenter.cpp | C++ | cpp | 37,106 | no_license | #ifdef WIN32
#pragma warning(disable:4819 4267)
#endif // WIN32
#include "POPCLogonCenter.h"
#include "eb_defines.h"
#include "md5.h"
namespace entboost {
CPOPCLogonCenter::CPOPCLogonCenter(CPOPLCHandler * pPOPHandler,bool bProcessTimer)
: m_bProcessTimer(bProcessTimer)
, m_bKilled(false)
//, m_pResponseThread(NULL)... |
b6ee5333084ad81065be6f29f18a1b13f3976efb | ffc5027f7a62fda3612b8cf4df34c825da324c23 | drjod/ogs_kb1 | /sources/GEO/Point.cpp | C++ | cpp | 1,063 | permissive | /*
* Point.cpp
*
* Created on: Jun 22, 2010
* Author: TF
*/
#include <cmath>
#include <limits>
#include "Point.h"
bool operator<= (const GEOLIB::Point& p0, const GEOLIB::Point& p1)
{
double tol (sqrt (std::numeric_limits<double>::min()));
if (fabs (p0[0] - p1[0]) > tol * fabs(p0[0]))
{
if (p0[0] < p... |
02231557da49fc146eb566d4045ea9279c2ed327 | 1c65f1b9cd89f21d8d485881975964f1bcb6d1eb | eric-plus-plus/SoRo-19-20 | /Autonomous/libs/Location.cpp | C++ | cpp | 3,376 | no_license | #include "Location.h"
#include "gps/gps.h"
#include <iostream>
#include <vector>
//Reads the file and sets the variables needed in the class
bool Location::config() {
std::ifstream file;
std::string line, info;
std::vector<std::string> lines;
file.open("../config.txt");
if(!file.is_open())
return fa... |
d5897394e7125589c3775df23fe5593f9cb3ccde | 30a0adc8b12482811996d360e5142a8273f157cc | sj9608/StudyCpp | /Part02/Chapter06/06-3/06_Mutable.cpp | C++ | cpp | 461 | no_license | #include <iostream>
using namespace std;
class SoSimple
{
private:
int num1;
mutable int num2;
public:
SoSimple(int n1, int n2) : num1(n1), num2(n2)
{
}
void ShowSimpleData() const
{
cout << num1 << ", " << num2 << endl;
}
void CopyToNum2() const
{
num2 = num1;
... |
953d8fdd8cd5f03c7f92d32010a33004f8e9404c | a3be61a2aaaa48261ef542b9fd1e954764d5646d | facebook/fb303 | /fb303/ThreadLocalStats.cpp | C++ | cpp | 1,991 | permissive | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
fff687f4047e65f0ec942e12275f1fcd80033656 | ee2a8c95dbfd64a67ac1847f14fd9cba206ea349 | P4-Research/p4c | /midend/replaceSelectRange.cpp | C++ | cpp | 4,891 | permissive | /*
* Copyright 2020, MNK Labs & Consulting
* http://mnkcg.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
20ae9794f561e96bffaa93714b6f82875a4142a4 | 2e84e7b92e17b46b96008ce19b4855f131977d57 | blazingkin/gamejam-2020 | /src/Shape.cpp | C++ | cpp | 10,829 | no_license | #include "Shape.h"
#include <iostream>
#include <assert.h>
#include "GLSL.h"
#include "Program.h"
using namespace std;
Shape::Shape() :
eleBufID(0),
posBufID(0),
norBufID(0),
texBufID(0),
vaoID(0)
{
min = glm::vec3(0);
max = glm::vec3(0);
initialized = false;
}
Shape::~Shape()
{
}
/* copy the data from... |
901aab1098d3c6d33501f557fcc62a1624639663 | 6a11878c6b2dc7586282dcc8c6cca8e030aa3d12 | martinamalberti/BicoccaUserCode | /HiggsAnalysis/CFNtuple/test/prova.cxx | C++ | cxx | 7,480 | no_license | void prova()
{
int NBIN = 21;
// double MIN = 25;
double MIN = -200;
double MAX = 800;
cout << "================================= FILLING HISTOGRAMS =================================" << endl;
TFile FileMC_My("/home/andrea/Cern/Code/VBF/BoZhu/CFNtuple/output/outMC.root","READ");
// TFile FileM... |
2ccb54b46e9f618c01394ba5011321675c5f26cf | 3b6999fca95f46512dab63431006fe73d0666dd0 | 9606/sysrepo | /swig/cpp/examples/cpp_application_changes_example.cpp | C++ | cpp | 5,877 | permissive | /**
* @file cpp_application_changes_example.cpp
* @author Mislav Novakovic <mislav.novakovic@sartura.hr>
* @brief Example application that uses sysrepo as the configuration datastore. It
* prints the changes made in running data store.
*
* @copyright
* Copyright 2016 Deutsche Telekom AG.
*
* Licensed under the... |
0e15de116ac25e6010a1f9bb1bbf382c4d0dc989 | ae99033d29cb587695a1e9292cbc2f615b4c2556 | lebiednik/PhoenixSim | /photonic/detectorelement.cc | C++ | cc | 6,164 | no_license | /*
* detectorelement.cc
*
* Created on: Oct 23, 2009
* Author: Johnnie Chan
*/
#include "detectorelement.h"
DetectorElement::DetectorElement()
{
}
DetectorElement::~DetectorElement()
{
}
void DetectorElement::initialize()
{
InitializeBasicElement();
InitializeRingElement();
InitializeDetectorElement()... |
c8ad5903dd98fbe86fdcd9925de0888fd87a2a8b | 13532e3623412147404ee27b4a2fb99ee788c460 | GPUWorks/filament | /libs/filamat/src/PostprocessMaterialBuilder.cpp | C++ | cpp | 6,878 | 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... |
cf7f5e070da99bc4697da53597e2b4a8f697faf8 | fb78e0e02c99146e4711585265aa0ba03d0f4e79 | ZIBIZ-PROJECT/ZIBIZCORE-WEB | /src/masternode-budget.cpp | C++ | cpp | 89,935 | permissive | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018 The zibiz developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "main.h"
#i... |
ddb4f45657c61e38270ec0dc652b02879d47cb0d | 27e578eb99c843d07e7f6d7ee481f15c4c8a5967 | carlsound/JUCE-DSP-oscillator-test | /Source/PluginEditor.cpp | C++ | cpp | 1,533 | no_license | /*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/
#include "PluginProcessor.h"
#includ... |
ff69e45750d79692a6b8654112925b39df162765 | a0eae276ccb2f8d5d13344a92185a0a3cb403a29 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_10/LB-GRR+R-A+R-A+OB-O+OB-OB.c.cbmc_out.cpp | C++ | cpp | 116,708 | no_license | // Global variabls:
// 0:vars:6
// 6:atom_0_X0_1:1
// 7:atom_1_X0_1:1
// 8:atom_2_X0_1:1
// 9:atom_3_X0_1:1
// 10:atom_4_X2_0:1
// 11:atom_4_X0_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
// 3:thr3:1
// 4:thr4:1
// 5:thr5:1
#define ADDRSIZE 12
#define LOCALADDRSIZE 6
#define NTHREAD 7
#define NCON... |
e3454ddd03fa3ba376772efee8065ce6e5a9d782 | d0e890572572f0f374eba3b5237c230452c618b2 | chkob/forked-blaze | /blazetest/src/mathtest/smatdmatmult/SCbMDa.cpp | C++ | cpp | 4,557 | permissive | //=================================================================================================
/*!
// \file src/mathtest/smatdmatmult/SCbMDa.cpp
// \brief Source file for the SCbMDa sparse matrix/dense matrix multiplication math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// Thi... |
814c830f185ff32198581a369d033a8a9c7447c0 | 9ea8fc8d60d6ae4d2ad12cd8b379087577161df0 | davidmoreno/opp | /src/http/url.hpp | C++ | hpp | 1,480 | permissive | #pragma once
#include <functional>
#include <variant>
#include <memory>
#include "string.hpp"
#include "request.hpp"
#include "response.hpp"
#include "logger.hpp"
#include "core/exceptions.hpp"
namespace opp::http{
class url{
public:
using handler_f = std::function<response(const request &)>;
using url_v ... |
10532273b317f65b120e8ff6346a2641df7195e7 | 79243a4574ed7cd3a871d2dd9e7df357a888455d | 237suraj/CPP | /046TestConcepts.cpp | C++ | cpp | 721 | no_license | #include<iostream>
using namespace std;
//voilates dry principle (SRP)
namespace nm046
{
class SavingsAccount
{
public:
void DoDebit(int accId,int amount)
{
cout<<"Open DB"<<endl;
cout<<"Doing Debit operation for Savings Account"<<endl;
cout<<"Close Db"<<endl;
cout<<"Sent SMS"<<endl;
cout<<"________________... |
ab9908fd444672347f638317886ec2df93213504 | f9ed036d947719f735e1a8c9513c33d78c795918 | 2pc/sharkstore | /data-server/test/range/watch_unittest_watch.cpp | C++ | cpp | 17,022 | permissive | #include <gtest/gtest.h>
#include "helper/cpp_permission.h"
#include <fastcommon/shared_func.h>
#include "base/status.h"
#include "base/util.h"
#include "common/ds_config.h"
#include "frame/sf_util.h"
#include "proto/gen/watchpb.pb.h"
#include "proto/gen/schpb.pb.h"
#include "range/range.h"
#include "server/range_ser... |
a68cca9a803d2824350315015d301242430c41ec | 8a67ed51af40d73ca228cfe54e543101746b3f17 | nyradr/cworld | /crea/eyesCam.cpp | C++ | cpp | 860 | no_license | #include "eyesCam.h"
#include <GL/glut.h>
#include <cmath>
EyesCam::EyesCam(Vector3<float> &p, float &s) {
this->pos = p;
this->sensivity = s;
}
EyesCam::EyesCam(float x, float y, float z, float s) {
this->pos = Vector3<float>(x, y, z);
this->sensivity = s;
}
void EyesCam::setPos(Vector3<float> &p)... |
a80716c38f860834d7a5f78caa6674a3b51ef4dd | 4bd12d271767b51116a9929f4b4480e31e2ba1cc | SungJune/-Simwol | /MainCharacterAnimInstance.cpp | C++ | cpp | 830 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "MainCharacterAnimInstance.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "MainCharacter.h"
void UMainCharacterAnimInstance::NativeInitializeAnimation()
{
if(Pawn == nullptr)
{
Pawn = TryGetPawn... |
e9fb30bb1a5284f496947e58345a74c2be62f450 | ae85dc26b45c077d8176ef42581d7e861ed4c47a | yanleirex/stl | /cont/deque1.cpp | C++ | cpp | 951 | no_license | //
// Created by yanlei on 16-10-12.
//
#include <iostream>
#include <deque>
#include <string>
#include <algorithm>
#include <iterator>
using namespace std;
int main()
{
//create empty deque of strings
deque<string> coll;
//insert several elements
coll.assign(3, string("string"));
coll.push_back... |
22315639c8bb6a75560b773edea01ea40feffdcf | 2d1800561936f5b2c6b4d18b15e553761e18c561 | cpe102/lab4-2562-2-phubet16132 | /lab4_3.cpp | C++ | cpp | 395 | no_license | #include<iostream>
using namespace std ;
float findDivisor(int num1)
{
int i=2;
if(num1 > 1)
{
while(i > 1 && i <= num1)
{
if(num1 % i !=0)
{
i=i+1;
}
else
{
return i ;
}
}
}
else
{
return -1 ;
}
}
int main()
{
int num1 ;
cout<... |
b0614f551ed97ebf4affeb4c7638ea0b12b01c21 | 4c7d510850b49f358582e40a857bd9c1e4edd834 | arponbasu/CS154_Labs_2ndSem | /CS154_Labs_2ndSem/Lab3Improvement/2pinGate.cpp | C++ | cpp | 1,861 | no_license | #include <iostream>
using namespace std;
class Gate {
int mode;//Tells us whether Gate has to do AND(0), OR(1) or XOR(2)
bool output;//Stores output
public:
Gate ();
Gate (int n);
bool fire (int i, int j);
bool negate (int i);
bool getoutput ();
};
Gate::Gate(){
mode = 0;//The gate is by default "AND"... |
f4f989b4570401a81225f3c32df84387030cbe26 | 38304e891339bd569e5ae230f07c32c5f615ae4f | IeuanG/testcoin | /src/qt/bitcoinstrings.cpp | C++ | cpp | 9,711 | permissive | #include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {
QT_TRANSLATE_NOOP("bitcoin-core", ""
"%s, you must set a rpcpassword in the configuration file:\n"
" %s\n"
"It is recomm... |
3967f7834806c1eeacc44d2b92dc8e27d719b3d6 | bf8635ed8a41e3ceb5bf88fbed2b278f98bf313e | hanumantmk/mongo-cxx-odm | /examples/mongocxx/view_or_value_variant.cpp | C++ | cpp | 2,900 | permissive | // Copyright 2015 MongoDB Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
30b9eda57b6a0d51d2527903f0e15f1b02edcf99 | d83ef73c419795b2b1ec363baf028be21bc2e213 | DimasRizqiFirdaus14/UTS_DASARPEMROGRAMAN | /BAB VII/ARRAY KARAKTER/Array Karakter.cpp | C++ | cpp | 685 | no_license | #include <iostream>
using namespace std;
int main()
{
cout<< "================================== " << endl;
cout<< " By DIMAS RIZQI FIRDAUS " << endl;
cout<< " A2.1900051 " << endl;
cout<< "===================================" << endl;
cout<< endl;
char NAMAKU ... |
7400be6e8ade7c4c50a63c9f71bd159aa79de56e | b5098129621c5c63886ddccaa76e46215e64b35c | 2023PHOENIX/11-week-workshop | /week 2/Searching/findPeak.cpp | C++ | cpp | 484 | no_license | #include<bits/stdc++.h>
using namespace std;
int findPeak(int *arr,int low,int high,int n)
{
int mid = (low+high)/2;
if((mid==0 || arr[mid-1] <= arr[mid]) and
(arr[mid] >= arr[mid+1]||mid == n-1))
return arr[mid];
else if(arr[mid]<arr[mid-1] and mid>0)
return findPeak(arr,0,mid-1,n);
else
retur... |
10e65469f5194114010ca18e391dd8f9c7e28461 | cd11faee9b9e616043d46b02fd790bb76f39063d | SubashChandra/placements-Mtech | /2_arrays/39_rearangePositiveNegative.cpp | C++ | cpp | 611 | no_license | #include<cstdio>
#include<iostream>
using namespace std;
void auxFunc(int arr[], int n)
{
int i,j;
i=0;
j=n-1;
while(i<j)
{
while(i<j && arr[i]<0)
i++;
while(i<j && arr[j]>0)
j--;
if(i<j)
swap(arr[i++],arr[j--]);
}
for(i=0;i<n;i++)
{
if(arr[i]>0)
break;
}
int posInd=i;
int negInd=... |
c2b332e2e379bfb1beba3bf7ddfb01aad65c5edb | bd4d6a5048b2e6cb1a39b74982989d8c1ebe87cc | dzeromsk/goma | /benchmark/unordered_map_benchmark.cc | C++ | cc | 1,812 | permissive | // Copyright 2018 The Goma 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 <random>
#include <unordered_map>
#include "absl/container/flat_hash_map.h"
#include "benchmark/benchmark.h"
namespace devtools_goma {
template <c... |
364af32a250948bb28e4dba669ca745590e975be | 5a0178e88b86db0018364050a91cc8e5e3f8b415 | MiohitoKiri5474/CodesBackUp | /C++/CodeForces/R-452-div.2/pC.cpp | C++ | cpp | 2,500 | no_license | // by. MiohitoKiri5474
#include<bits/stdc++.h>
#pragma GCC optimize ( "O3" )
#pragma loop_opt ( on )
using namespace std;
typedef long long LL;
// define tools
#define REPP(i,f,s) for ( int i = f ; i < s ; i++ )
#define REPM(i,f,s) for ( int i = f ; i >= s ; i-- )
#define REPALL(i,n) for ( auto &i: n )
#define debu... |
14dd6d7100f102e6f2504b42f970ce8f6e4b1258 | b836633844ded457aca3c04d569b041f8d8c05e4 | nitish2904/code | /ugly.cpp | C++ | cpp | 491 | no_license | #include<iostream>
using namespace std;
int main(){
long ugly[100000],i=0;
int i3=0,i5=0;
long next_multiple3=3;
long next_multiple5=5;
long next = 1,count=0;
ugly[0]=1;
long l,r;
cin>>l>>r;
while(1){
next=min(next_multiple3,next_multiple5);
ugly[++i]=next;
if(next>r)
break;
if(next>=l)
count++;
... |
4ab70b30625d73074084cc835649b7d79e0a8e28 | 76302611591aae794901e25371792832b4bdd373 | shivamgohri/ds_codes | /Stack/validParenthesis.cpp | C++ | cpp | 691 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define MAX (int)1e7+5
string check(string str){
stack<char> s;
for(int i=0; i<str.length(); i++){
char curr = str[i];
if(curr=='('){
s.push(curr);
}
els... |
55708ee3a47be38a27149f04bab4a9e3967aa1a8 | 0c7fdd0f1ec34e3864394396b5c5f3de27b1c782 | ASMlover/study | /scc/llvm/lexer/main.cc | C++ | cc | 2,576 | no_license | // Copyright (c) 2015 ASMlover. 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 ofconditions and... |
37653a70b177a956da81640a78594a2a1f29af6d | ed832de40361de38f7c4045cd8a10bcab57b65df | johanbecknoren/procedural_images | /lab3/code/GLSLprimer.cpp | C++ | cpp | 8,477 | no_license | /*
* A framework for GLSL programming in TNM084 for MT1 2013.
*
* This is based on a framework designed to be easy to understand
* for students in a computer graphics course in the first year
* of a M Sc curriculum. It uses custom code for some things that
* are better solved by external libraries like GLEW and G... |
2f6c35d001661fd2644d675254236aac57d27d76 | df7f96ed2aa65d86840b916676dfaee93e2fac33 | MarcoLotto/ScaenaFramework | /Graphics/Test/src/SceneLightsLoadTest.cpp | C++ | cpp | 327 | permissive | #include "SceneLightsLoadTest.h"
#include "SceneLoader.h"
void SceneLightsLoadTest::when(){
this->scene = SceneLoader::loadFromXmlFile("assets/scene1.xml");
}
void SceneLightsLoadTest::then(MockGraphicDevice* device){
this->assertTrue("object light on scene", this->scene->getLightingManager()->getLights()->size() =... |
612989edc31b34da80db684e0a0f133eb8211f58 | 2ae7cf5e090d11007c1d9f192d682832d38494c6 | summeroff/direct_draw_overlay | /direct_draw_test.cpp | C++ | cpp | 8,290 | no_license | // direct_draw_test.cpp : Defines the entry point for the application.
//
#include "direct_draw_test.h"
#include <stdlib.h>
class DemoApp
{
public:
DemoApp();
~DemoApp();
HRESULT Initialize();
void RunMessageLoop();
private:
HRESULT CreateDeviceIndependentResources();
HRESULT CreateDeviceResour... |
538771cd034070548fc5383c2c660441315965b2 | 2ccb0c63e04700cffec681b9ea75c183bc9b185d | roytam1/palemoon26 | /layout/generic/nsHTMLReflowState.cpp | C++ | cpp | 105,204 | no_license | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* struct containing the input to ... |
71600b712aab166a28a38f67a4bffbec090d777f | 4dae00d06ed6f45053afe4851a87708fb4eb2fde | zhongyj1999/pat | /simplesimulation/1042/main.cpp | C++ | cpp | 678 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
string s = "SHCDJ";
int n, temp;
scanf("%d", &n);
vector<int> a(55), b(55);
for(int i = 1; i < 55; i++){
a[i] = i;
scanf("%d", &temp);
b[i] = temp;
}
for(int i = 0; i < n; i++){
vector<i... |
42bc5bbda2fb71ad85275817d8cce1f78bac1d86 | 1a2b32ca8917d1e1a16954f6a36ec3333eba765b | GodOfOrder/chromium | /ash/shelf/shelf_layout_manager.cc | C++ | cc | 101,258 | 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 "ash/shelf/shelf_layout_manager.h"
#include <algorithm>
#include <cmath>
#include <vector>
#include "ash/accessibility/accessibility_contro... |
9c29d10ded7d0b2a886446dc0b24f39d2d89cc4a | 627ee0b4eb43d726c8147c70a4c2ef5b154106e3 | L3nn0x/osirosenew | /World Server/worldserver.cpp | C++ | cpp | 37,459 | no_license | /*
Rose Online Server Emulator
Copyright (C) 2006,2007 OSRose Team http://www.osrose.net
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License... |
354f3a33f2eb81747c4e79b137b68b4e32b0eb6e | 6efcd0eedf27f9dd95eb3a0df119cbd6b3c4d03e | greearb/vocal-ct | /sip/sipstack/ByeMsg.hxx | C++ | hxx | 6,286 | permissive | #ifndef BYEMSG_H
#define BYEMSG_H
/* ====================================================================
* The Vovida Software License, Version 1.0
*
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are per... |
3d04a20e9be2b72aa73e10d58c3f200095e20b1c | b65a239843c5b3803a935c6410ce617dffaeaab4 | Karamax/WalCommander | /wcm/fileopers.cpp | C++ | cpp | 38,826 | permissive | /*
Copyright (c) by Valery Goryachev (Wal)
*/
#ifdef _WIN32
#include <winsock2.h>
#endif
#include <time.h>
#include "fileopers.h"
#include "smblogon.h"
#include "ftplogon.h"
#include "sftpdlg.h"
#include "ltext.h"
enum {
CMD_ALL = 200,
CMD_SKIP,
CMD_SKIPALL,
CMD_RETRY
};
#define MkDirMode (S_IRWXU | S_IRGRP |... |
98435d8731a2d558116ded662b43e9ddb085d985 | 9c86e618ed2885c23a8c5b6137b4b437b9eafc4a | danelumax/CPP_study | /DesignPattern/Bridge/BridgeType/src/SpecialUrgencyMessage.cpp | C++ | cpp | 481 | no_license | /*
* SpecialUrgencyMessage.cpp
*
* Created on: Oct 2, 2016
* Author: eliwech
*/
#include "SpecialUrgencyMessage.h"
SpecialUrgencyMessage::SpecialUrgencyMessage(AbstractMessage::MessageType type)
: AbstractMessage(type)
{
}
SpecialUrgencyMessage::~SpecialUrgencyMessage()
{
}
void Specia... |
a96ca20b85c4a308605fe47d72ca7d93b5f98b6a | 1fbac2682c23b4a4f9da316d4304aa2f59b744c9 | emfomy/mcnla | /include/mcnla/core/mpi/dense/gatherv.hpp | C++ | hpp | 3,439 | permissive | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file include/mcnla/core/mpi/dense/gatherv.hpp
/// @brief The MPI GATHERV routine.
///
/// @author Mu Yang <<emfomy@gmail.com>>
///
#ifndef MCNLA_CORE_MPI_DENSE_GATHERV_HPP_
#defin... |
56335b170d6f5d4a5e31bae8e46bc9960ac1ab0e | dd5c6490a417673564814e908c2491ae8896deb6 | fanglelegood/Simple_BBS_System | /网络版/客户端/mainwindow.cpp | C++ | cpp | 3,665 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include "loginwindow.h"
#include "clientctrl.h"
#include "viewpage.h"
#include "postpage.h"
#include "netconfigpage.h"
#include <QMessageBox>
mainWindow::mainWindow(QWidget *parent) :
QWidget(parent),
ui(new Ui::mainWindow)
{
ui->setupUi(this... |
80412fc7d52861202c267e96839896aa3aeff0b5 | c641668ad9fe2fe10f0f9ece9c12a279996b836b | AutumnKite/Codes | /Codeforces/1582/G/std.cpp | C++ | cpp | 6,873 | no_license | #include <bits/stdc++.h>
template<typename Val,
typename VV = std::plus<>,
typename Tag = Val,
typename VT = std::plus<>,
typename TT = std::plus<>,
typename Comp = std::less<>>
class lazy_seg_tree {
public:
typedef std::size_t size_type;
private:
constexpr static size... |
80e1ed0e8a7acca3c9d991a77dccda0840b9c93e | e633b5522a24f0246bf343251e3a9ab9a39476a5 | flash-fire/mustached-ninja | /Compilers/Project1.cpp | C++ | cpp | 16,237 | no_license | #include "Project1.h"
#include "MiscFunc.h"
#include "CErrors.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <algorithm>
const char * const Project1::sourceNames[] =
{ ".\\data\\source\\ShenoiProj3Test.pas", ".\\data\\source\\ShittyPascal.pas", ".\\data\\source\\Badlex.pas",
".\\... |
ba6af39da7733a66362790d5eec4d67693dc1b40 | 3851d94e3725ee1b351f2bec8a2dc002eb9d67d8 | zhuoqchang/DlibFaceLandmarkDetectionVideo_Windows | /DlibFaceLandmarkDetectionVideo_Windows/DlibFaceLandmarkDetectionVideo_Windows.cpp | C++ | cpp | 5,369 | no_license |
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
/*
This example program shows how to find frontal human faces in an image and
estimate their pose. The pose takes the form of 68 landmarks. These are
points on the face such as the corners of the mouth, along the eyebrow... |
0d70cde54a8d614f69010e8a4e2df9c9db170cce | b971c2c5aa62151d88c08ff47c8ba6a795bb6cf6 | srj31/upsolve | /TFOSS.cpp | C++ | cpp | 1,964 | no_license | #include<bits/stdc++.h>
using namespace std;
struct pt{
long long x,y;
bool operator < (pt b) const{
return x < b.x || (x==b.x && y<b.y);
}
long long operator &(pt b) const{
return x*b.y - y*b.x;
}
long long operator *(pt b)const{
return x*b.x + y*b.y;
}
pt operator -(pt b) const{
pt res;
res.x = ... |
fa22a8b90b173449a7b60cda6767b78dc733925d | 568763053ce936166f681e635a1e114140203db2 | closedsum/core | /CsPlugin/Source/CsCore/Public/Managers/Input/CsSettings_Input.cpp | C++ | cpp | 6,508 | permissive | // Copyright 2017-2023 Closed Sum Games, LLC. All Rights Reserved.
#include "Managers/Input/CsSettings_Input.h"
#include "CsCore.h"
// Library
#include "Library/CsLibrary_Valid.h"
// Settings
#include "Settings/CsDeveloperSettings.h"
// Log
#include "Utility/CsLog.h"
// FCsSettings_Input
#pragma region
const FCsSett... |
b23558e007d07b45f0b0df612d5bad03ec45a24a | 1498ffce142cb52223dace95d846a50fc55b15ff | harinyoo/BAEKJOON | /StepByStep/C++/Step 08/10809.cpp | C++ | cpp | 527 | no_license | #include <iostream>
using namespace std;
int main() {
string str;
cin >> str;
char alphabet[26];
for(int i=0; i<26; i++) {
alphabet[i] = 'a'+i;
}
int cnt[26];
fill_n(cnt, 26, -1);
for(int j=0; j<str.length(); j++) {
for(int k=0; k<26; k++) {
if... |
180bb8427db491112d7f675e950fef27468349db | 87e20ce560ff8deb6df7f55a71d7c430429b5e92 | Gast91/SnakeGame | /src/ScoreDisplay.cpp | C++ | cpp | 1,033 | permissive | #include "ScoreDisplay.h"
ScoreDisplay::ScoreDisplay(unsigned int windowSize, unsigned int scale) : charSize( windowSize / scale)
{
// Try to load the font, disable score display if it cannot be loaded
if (!font.loadFromFile((fontFile)))
{
disabled = true;
return;
}
// Set font
scoreText.setFont(font);
// C... |
f2dd490eb12ee1ab3d4fe4e39c34c88bf0c25909 | b5ffe9874257009b63a3e95dd1b7a5d5010f6746 | ralex1975/Trading-Platform | /src/OrderController.cpp | C++ | cpp | 1,427 | no_license | #include "OrderController.h"
OrderController::OrderController(){
//ctor
}
void OrderController::queueOrder(funct, int amountT, float timtT, float deltaT, float stopPriceT){
auto foo = new Order(ptr, amountT, timtT, deltaT, stopPriceT);
queue.push_back(foo);
}
void OrderController::executeOrder(int index){
//ch... |
af34d3f356231c2640b9b460ea09420d59f60aa0 | 6f4d77779b7b8081afb852d070196b8002a25d15 | FedTheBug/NSUPS-BootCamp-2017 | /Reverse&Check.cpp | C++ | cpp | 883 | no_license | #include <iostream>
#include<bits/stdc++.h>
using namespace std;
bool isPalindrome(long long in) {
int j=0,i,k;
char ArrResult [18];
while(in) {
ArrResult[j++] = in % 10;
in = in/10;
}
for(i=0,k=j-1;i<k;++i,--k) {
if(ArrResult[i] != ArrResult[k])
return false;
... |
136b801b1feb25069004c70a7197de4dac1b5d44 | ae214928ad4363a804969a12682741c75cab68d5 | oliversno/n-queens | /tests/chromosone_tests.cpp | C++ | cpp | 2,237 | no_license | #include <gtest/gtest.h>
#include "include/chromosone.h"
TEST(ChromosoneTests, ctor){
std::vector<int> v{2,3,1};
Board b{v};
chromosone c{b, 1000, 100};
SUCCEED();
}
TEST(ChromosoneTests, nCk_0_groups){
EXPECT_EQ(chromosone::nCk(1,0), 1);
EXPECT_EQ(chromosone::nCk(5,0), 1);
EX... |
19f33ab06719ca44d08d3870a20fa3cdcf026785 | ec088f3be32b1c8f6dba1bad8b2592d3bc70bf45 | Abul2000a/Amrapndoxner | /3.cpp | C++ | cpp | 402 | no_license | #include <iostream>
int main ()
{
std::cout<<"Greq tivy:";
int x;
std::cin>>x;
int sum=0;
while(x!=0){
sum=sum+ x%10;
x/=10;
}
std::cout<<sum;
return 0;
}
#include <iostream>
void foo(int x){
int sum=0;
while(x!=0){
sum=sum + x%10;
x/=10;
}
std::cout<<sum;
}
int main... |
42d15fb5ef61f7e518e40eab097009fe357eff9b | 126767d4a562cd3803555495d6c7a7705f16c00d | DragonFlyBSD/DPorts | /archivers/upx/files/patch-src_p__mach.cpp | C++ | cpp | 370 | permissive | --- src/p_mach.cpp.orig 2020-01-22 21:29:58 UTC
+++ src/p_mach.cpp
@@ -467,7 +467,7 @@ PackMachBase<T>::compare_segment_command(void const *c
if (a->vmsize) return -1; // 'a' is first
if (b->vmsize) return 1; // 'a' is last
// What could remain?
- ... |
4c9c6dae96eaa2e149a872da5cefd8555ef298bd | 4c3dc34e6fe878e49aa021c4375b3e36760d9545 | st0030/PaddleXCsharp | /PaddleXDll/demo/classifier.cpp | C++ | cpp | 3,909 | no_license | // Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requir... |
6d5c1d42fd7447b0ebd5b41d005bee2592455a32 | 4fc3c8cdd3f53c84a84e232093b51797163dbb67 | onlyonename/c11test | /init_list.cpp | C++ | cpp | 823 | no_license | #include <iostream>
#include <string>
#include <stdio.h>
#include <vector>
using namespace std;
class Foo
{
public:
Foo(int j){i = j; cout << "call construct" << endl;}
private:
Foo(const Foo& foo);
private:
int i;
};
int main()
{
Foo a(123); //构造函数
//Foo a1 = 123; //error,拷贝构造函数是私有的
//下面是新的初始化方式,... |
cc950730910e7fa4289bb1622ac753ed1cf6b8c0 | 2ff75d959c33caeede38cdc4267421f5f491747f | Dheinamar/Luxoft | /CrazyTanks v.2/src/Class Diagram/DrawEnemyStrategy.cpp | C++ | cpp | 1,905 | no_license | /**
* Project CrazyTanks
*/
#include "DrawEnemyStrategy.h"
/**
* DrawEnemyStrategy implementation
*/
DrawEnemyStrategy::DrawEnemyStrategy () :SIZE (pair<int, int> (30, 30)),
TURRET_SIZE (pair<int, int> (10, 15)),
BLACK (Color (... |
bead26d6990fcb989d26882cc67ad18ab99ad27d | 24e79776853dcaa1b5c6646f74b1a3f80a66f590 | Phyronnaz/demo | /Raytracing-Demo_shadows_overlapping/Screen/vector.cpp | C++ | cpp | 1,798 | no_license | /**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be us... |
1c422775a61457927c669904e8a8f41f430b854e | 516e9dfa25b4d64496c274b9af35df3adcf529f8 | nwgdegitHub/CPlusPlus-learning | /stl/03 stack栈容器_/03 stack栈容器_/main.cpp | C++ | cpp | 634 | no_license | //
// main.cpp
// 03 stack栈容器_
//
// Created by udc on 2020/10/27.
// Copyright © 2020 udc. All rights reserved.
//
#include <iostream>
#include <stack>
using namespace std;
int main(int argc, const char * argv[]) {
// insert code here...
std::cout << "Hello, World!\n";
//先进后出(弹夹) 没有迭代器
stack<in... |
f5b472a19f1384dc3558e05bdfdb251c648c5b76 | d7c647f0d37c92fe9820d1614b3da595d23480f0 | mtrippled/google-cloud-cpp | /google/cloud/bigtable/table.cc | C++ | cc | 17,425 | permissive | // Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
36d371c94be48a6e706cad5b3677f2468c10d4f8 | bd1be18396841f4b29f3777495a9168d62ad5b19 | cbrghostrider/Hacking | /leetcode/_001428_longestContSubarrayAbsDiff.cpp | C++ | cpp | 1,800 | permissive | class Solution {
struct Info {
int val=0;
int index=0;
};
public:
// O(n log n) time, O(n) space.
int longestSubarray(vector<int>& nums, int limit) {
auto lcomp = [](const Info& lhs, const Info& rhs) -> bool {
if (lhs.val != rhs.val) {return lhs.val > rhs.val;}
... |
d99f6fb70074085f16ce8f0bf226eb6061f7243c | b014016fa69dd9b87b9a469d4328bad20109c259 | DavidSaxon/Obliterate | /Engine_Event.cpp | C++ | cpp | 687 | no_license | #include "Engine.hpp"
/*Handles events*/
void Engine::onEvent(SDL_Event *event) {
Event::onEvent(event); //gets and stores the current event
}
/*When the exit button is pressed*/
void Engine::onExit() {
running = false; //exit the game
}
/*When a key is pressed down*/
void Engine::onKeyDown(SDLKey sym, SDLMo... |
669aa0eff091e42ca02c297fa156ad26db12e3ae | 61be595ae01ee8304cc4c2272ff4769c16c05590 | HarshaHN/cpp_for_scientific_computing | /02/taskTwo/task2MatrixProject2main.cpp | C++ | cpp | 2,654 | no_license |
/*
IMPORTANT NOTE.
From www.eigen.tuxfamily.org we downloaded the latest release,
Eigen 3.3.7, which makes calculation of eigenvalues simple by #include <Eigen>.
1. Download the package.
2. If u use GNU. Please write in the terminal, g++ -Wall -I /Users/HP/Downloads/eigen-eigen-323c052e1731/eigen-eigen-323c052e1731... |
7d8858311e697957dd5d748bc4a1d627c13c7deb | 319af0f21dd0dfd8ce6b6a126cfdf556c9ae4d06 | apache/openoffice | /main/svx/source/form/fmsrccfg.cxx | C++ | cxx | 16,453 | 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 y... |
80f406bb9d9aed08f3aab001ff28db6deb849c00 | f817c940a374421c3bb441288b3fe62aec5d6397 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14438/function14438_schedule_22/function14438_schedule_22_wrapper.cpp | C++ | cpp | 1,486 | no_license | #include "Halide.h"
#include "function14438_schedule_22_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){
Halide::Buffer<int32_t> buf00(128);
Halide::Buffer<int32_t> buf01(128,... |
2b572e03f87abec03da1c44e56916a87533be0e7 | 27fb0c07ac134b95f36abc1e4b88f9c3df9a6e10 | Autumin/fuchsia | /src/developer/debug/debug_agent/watchpoint.cc | C++ | cc | 8,124 | permissive | // Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/developer/debug/debug_agent/watchpoint.h"
#include "src/developer/debug/debug_agent/breakpoint.h"
#include "src/developer/debug/shared/loggi... |
4d24633f2023f9dfccf141270b920905a58ef499 | b218e1a9d7ff3b245ce932aec80b555cb78ecbaa | thayamizu/Nyx | /Nyx/Source/GUI/ListBox.cpp | C++ | cpp | 8,383 | permissive | /********************************************************************************
*
* The MIT License
*
* Copyright (c) 2010-2011 t.hayamizu
*
*以下に定める条件に従い、本ソフトウェアおよび関連文書のファイル(以下「ソフトウェア」)の複製を取得するすべての人に対し、ソフトウェ
*アを無制限に扱うことを無償で許可します。これには、ソフトウェアの複製を使用、複写、変更、結合、掲載、頒布、サブライセンス、および/ま
*たは販売する権利、およびソフトウェアを提供する相手に同じことを許... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.