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 |
|---|---|---|---|---|---|---|---|---|
2ac85f3ba1d1ddd1090e57dabfa203df960d87cb | 8a8d0619cdb3465c2c89c1eb1995b673ebbf4dea | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/ElementCapabilities/UNIX_ElementCapabilities_FREEBSD.hxx | C++ | hxx | 1,825 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
f33f8607814d761be06dd1b1beb188a6769264d7 | 0287b287804fcf4831531995764cf74e94cdcede | sdasd12312wasdasd/DaVinci | /DaVinciLib/ObjectRecognize/Shape.hpp | C++ | hpp | 2,829 | no_license | /*
----------------------------------------------------------------------------------------
"Copyright 2014-2015 Intel Corporation.
The source code, information and material ("Material") contained herein is owned by Intel Corporation
or its suppliers or licensors, and title to such Material remains with Intel Co... |
ba22543ee5d8b7806a50c7262421cf7ca1e0948b | c2ec7340d93617707deafcfd4705439e2b105bbc | kimmoli/mitakuuluu2 | /filemodel/src/filemodel.cpp | C++ | cpp | 4,659 | permissive | #include "filemodel.h"
#include "recursivesearch.h"
#include <QDateTime>
#include <QDebug>
#include <QMimeDatabase>
#include <QMimeType>
#include <QImageReader>
#include <QStandardPaths>
#include <QTimer>
#include <QDebug>
FileSourceModel::FileSourceModel(QObject *parent) :
QAbstractListModel(parent)
{
_r... |
a00ebaf4497f7fea90a96c445750386b33230d4b | ce2348ac38e1dd33e5879c5dcf6c837b307c5d2d | Tomyail/Electron-SDK | /video_source/video_source_transporter.cpp | C++ | cpp | 7,835 | permissive | /*
* Copyright (c) 2018 Agora.io
* All rights reserved.
* Proprietary and Confidential -- Agora.io
*/
/*
* Created by Wang Yongli, 2018
*/
#ifdef _WIN32
#include <Windows.h>
#endif
#include "video_source_transporter.h"
#include <memory>
#include "video_source_ipc.h"
#include "video_source.h"
#include <fstream>
#inclu... |
e066b802cebbd1ec427f718d7242c6062fa429f2 | 4a5dc15569cac62ae0052eefc872e135c34ef7e5 | piyush1146115/Competitive-Programming | /LeetCode/145. Binary Tree Postorder Traversal.cpp | C++ | cpp | 770 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
470b7b35e46988e85310fad4afb17c80fba3781a | 465e38bdcb2a4d9831c2691872f8eb1fbb0e67f4 | rzr/iotivity | /test/src/tc/cs/gtest/csdk/src/helper/CSCsdkUtilityHelper.cpp | C++ | cpp | 6,929 | permissive | /******************************************************************
*
* Copyright 2017 Samsung Electronics 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
*
... |
8d3a1a5f4d6b4d2d486b86e6eda1a7b682052e7d | dac9d283aca138a7662dd7620596eb40cd493921 | Flatta/jumanpp | /v2/src/util/mmap.cc | C++ | cc | 5,355 | no_license | //
// Created by Arseny Tolmachev on 2017/02/15.
//
#include <errno.h>
#include <string.h>
#include <sys/fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include "mmap.h"
namespace jumanpp {
namespace util {
MappedFile::MappedFile(MappedFile &&o) noexcept
: fd_{o.fd_},
filename_{... |
44b240b4d66966884a21c67017facde37a918558 | de1e3bd870bfa2c22bb3a9eb801cb5e5b3cdb6bd | thimansh/huffman-coding | /binary.cpp | C++ | cpp | 1,484 | no_license | /*
* binary.cpp
*
* Created on: Apr 1, 2017
* Author: Himanshu Taneja
*/
#include "binary.h"
#include <iostream>
#include <algorithm>
int binary::size(){
return _heap.size();
}
int binary::leftchild(int i){
return 2*i+1;
}
int binary::rightchild(int i){
return 2*i+2;
}
int binary::parent(int i){
ret... |
28f946f2a173ad5097d4764e8e2216295bed671a | bd4e1e0a42d45f40a449e0cbd00c4a3bb791c112 | Astrophilic/Daily-Cpp-Problems | /3_10_2018/fourth.cpp | C++ | cpp | 1,094 | no_license | #include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned long long
#define all(a) a.begin(),a.end()
#define BitCnt(a) __builtin_popcountll(a)
#define MEM(a,val) memset(a,val,sizeof(a))
#define pul pair<ull,ull>
#define pl pair<ll,ll>... |
83888192f77914fb619ce34f59a63d1a7bfdb74d | 311304850f8ea9ca5d8487a03fcb67b84391ec13 | Salimlou/Class-Work | /cs442/project/demo/bank/Teller.cpp | C++ | cpp | 3,554 | no_license | /************************************************
*
* Teller.cpp
*
* Implementation of the Teller ServerEntity. Also handles the queue jumping functionality.
*
* Written by: Mark Randles, Dan Sinclair
*
************************************************/
#include "Teller.h"
vector<Teller*> Teller::tellerList;
Teller::... |
1aa0ebe68ed15e37ea83d8a9e1969b4bce03561d | 8e4988e57f7187d4f6130128d04de3e46c3167f5 | urmyfaith/tinyimage | /TinyImage/filter/Lomo.cpp | C++ | cpp | 3,862 | no_license | #include "filter/Lomo.h"
#include "base/NormalBlend.h"
#include "base/ColorBalance.h"
#include "base/Levels.h"
#include <cmath>
namespace TinyImage{
void DarkenCorner(TiBitmapData& bitmap, double brightRatio, u8 maskAlpha)
{
TINYIMAGE_ASSERT_VOID(brightRatio <= 1.0 && brightRatio >= 0.0);
int width = bitmap.GetW... |
2d32af1243f19c2fd5a58877e3b966ecbbd80d34 | f1dcd2ad7fa64e82afb9469f9debda136dbb6cb0 | werrio5/ISU | /ISU/ISU/init.cpp | C++ | cpp | 1,524 | no_license | /*
* init.cpp
*
* Created: 09.03.2020 16:42:31
* Author: pavel
*/
#include <avr/interrupt.h>
#include "pins.h"
void data_init(void);
void lcd_init(void);
void uart_init(void);
void adc_init(void);
void btninput_init(void);
void led_init(void);
void timer_init(void);
void interrupt_init(void);
... |
087a5b74d0d2dbcd8065724483c0ca163c6fdb33 | f91e0d0c497decdbaff8a71d8463cadf543548a6 | BestSonny/MinkowskiEngine | /src/coords_key.cpp | C++ | cpp | 4,177 | permissive | /* Copyright (c) Chris Choy (chrischoy@ai.stanford.edu).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, ... |
bf692967c5d49a7ed71498dbd3a3173637608cac | 58e0ac7a05aa620108b9ae1ddd4d9dc0ce800e2e | danineamati/CS2_Sets | /dneamati-cs2-week6/philosophers/semaphore.hpp | C++ | hpp | 830 | no_license | #ifndef __SEMAPHORE_H__
#define __SEMAPHORE_H__
#include <condition_variable>
#include <mutex>
/*
* Semaphore implementation adapted from
* http://stackoverflow.com/questions/4792449/c0x-has-no-semaphores-how-to-synchronize-threads
*/
class Semaphore {
private:
std::mutex m;
std::condition_variable cv;
... |
48dcdf0ef79060985653f3c46cef056a476e5a48 | 733b85da4f3b336cf6708b85313375acf76bf4b5 | rodolfo15625/algorithms | /tc/testprograms/CircularCells.cpp | C++ | cpp | 3,976 | no_license | #include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <ctime>
using name... |
ecd792ec8b01ad1bd4bd4055557fcb7c3dac1e91 | 40ec15fa442cc4b8d624c926aa932b49fead1d7f | AlexRamallo/Kinc | /Backends/Graphics5/Direct3D12/Sources/Kore/RayTraceImpl.cpp | C++ | cpp | 17,562 | permissive | #include "pch.h"
#include "RayTraceImpl.h"
#ifdef KORE_DXR
#undef min
#undef max
#include "Direct3D12.h"
#include "d3dx12.h"
#include "D3D12RaytracingHelpers.hpp"
#include <kinc/graphics5/commandlist.h>
#include <kinc/graphics5/constantbuffer.h>
#include <kinc/graphics5/vertexbuffer.h>
#include <kinc/graphics5/index... |
0794d1afdbdd3f4d016e8bb0d3ecbbf391ed63ea | db391ce4c2e8041dd7d424bb5db89cdd5e4756cd | rawnsley/filament | /filament/backend/src/opengl/OpenGLDriver.cpp | C++ | cpp | 102,219 | permissive | /*
* Copyright (C) 2015 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... |
0536da1de9aca4f826aff3765ccc051e6afdca6c | 8c53fb089a046676857446766ec7cf487f8c0697 | stoffd/numeral | /Convert.cpp | C++ | cpp | 535 | no_license | #include "./include/Convert.h"
namespace velalg {
Convert::Convert(ConvertAlg* convAlg) {
this->convAlg = convAlg;
init();
}
void Convert::init() {
convAlg->phraseBaseInit();
}
std::string Convert::getNumeral(const short unit) const throw (std::out_of_range) {
if ( (unit < 0) || (unit > 9) )
... |
7acd5f738a4bc77550cd1db89c43749c90423861 | 9beb72bc6ae7304b4c978c9db10a280777ab2658 | Mortano/Prismatic | /PrismaticRenderer/Source/Vulkan/Abstraction/peLogicalDevice.cpp | C++ | cpp | 4,116 | permissive | #include "Vulkan/Abstraction/peLogicalDevice.h"
#include "Algorithms/peAlgorithms.h"
#include "Vulkan/Abstraction/pePhysicalDevice.h"
#include "Vulkan/Util/peCreateInfoHelper.h"
#include "Vulkan/Util/peVulkanVerify.h"
#include "vulkan/Abstraction/peCommandPool.h"
#include <optional>
static VkQueue GetQueue(VkDevice de... |
9816c7cca8eba8e0196479ddd28570427223ca58 | 188302cb7c0dd31cf3a7d9b4a62730dc028a54d6 | walterMS/Compiler | /pp4/ast_type.cc | C++ | cc | 3,067 | no_license |
/* File: ast_type.cc
* -----------------
* Implementation of type node classes.
*/
#include "ast_type.h"
#include "ast_decl.h"
#include <string.h>
/* Class constants
* ---------------
* These are public constants for the built-in base types (int, double, etc.)
* They can be accessed with the syntax Type::intT... |
08c39d43ab32332baa88565cf532b93b6cc63963 | c960a9779b0760163c14e4c77951e9edb68ca6d4 | BackupTheBerlios/glui-ng | /tests/textbutton.cpp | C++ | cpp | 1,476 | no_license | /*
GLUI-ng, an openGL widget toolkit. Copyright (C) 2010 MALET Jean-Luc
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License,
or (at your option) ... |
5aa434a22ec1ca79df75d80e04c4024e2cf45ef0 | c347acb55baeb9f3150e14d14a2afaee795222e9 | hallfox/teamcc | /begingame/hallfox/pointing.cpp | C++ | cpp | 1,555 | no_license | //Pointing
//Demonstrates using pointers
#include <iostream>
#include <string>
using namespace std;
int main()
{
int* pAPointer; //declare a pointer
int* pScore = 0; //declare and initialize a pointer
int score = 1000;
pScore = &score; //assign pointer pScore address of variable score
cout <... |
2ad6dd89441e9e6ab3db5e8fb52e04b4ad4c9c22 | 5b53a71c5c06f3afc06221716c9a8c238a6adb98 | togatoga/procon-archive | /atcoder.jp/arc076/arc076_c/Main.cpp | C++ | cpp | 2,126 | no_license | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#incl... |
14a16bfa2f057ed0309e5a1c8ca038d16852151e | 8b19897b7a110a03d43ce57a416ce6360e0ab2d1 | tbgeorge/putty_engine | /Math/Vector2.cpp | C++ | cpp | 5,545 | no_license | //=================================================================================
// Vector2.cpp
// Author: Tyler George
// Date : January 15, 2015
//=================================================================================
#include "Engine/Math/Vector2.hpp"
///---------------------------------------------... |
08f79da086139b86a9632cfccedead98025f1191 | 2f2e6d3b913a2a5c672f46b9002d6f7240519462 | Tigrouzen/UnrealEngine-4 | /Engine/Source/Runtime/Engine/Private/PlayerState.cpp | C++ | cpp | 8,778 | no_license | // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
PlayerState.cpp:
=============================================================================*/
#include "EnginePrivate.h"
#include "Net/UnrealNetwork.h"
#include "Online.h"
... |
cfd0c355e121c9a2920de339523cccb280bb3409 | 433e3a0b4642c8d2b5648b1dd36d5036be9d7f5a | hubert587/hedgehogs-robot-2020 | /robot-2020.1/src/main/cpp/subsystems/GrapplingHook.cpp | C++ | cpp | 1,523 | no_license | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
3b71e869f835b4a722979f8c576219b5f9c0ff8c | b6bdcd6316910b7c4dfd5bc601bee458a2679fb0 | master-hamster/Events | /EApplication.cpp | C++ | cpp | 3,815 | no_license | //class EApplication
#include "EApplication.h"
#ifdef DEBUG_EAPPLICATION
#define DBG_PRINTLN(a) Serial.println(a)
#define DBG_PRINT(a) Serial.print(a)
#else
#define DBG_PRINTLN(a)
#define DBG_PRINT(a)
#endif
EApplication::EApplication()
{
objectsAdded = 0;
currentEvent.eventType = evNone;
};
oid_t... |
92875b98fc78c16253813d19057549fdce5c1c83 | 1b6e70cbd020210e3b283aafc91fdc8fe2e8b96e | incorrectrrrozya/os-net | /client.cpp | C++ | cpp | 1,985 | no_license | //
// Created by Georgy Rozovsky on 18/05/2019.
//
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <string>
#include <string.h>
using namespace std;
const int BUFFER = 1024;
const int PORT = 8080;
int main() {
int sock = socket(AF_INET, SO... |
db84f48c3cf8df547367381a2b681548d6dfce40 | 9591618a6ce38c0e142aaa629b1b4c2ff89471bc | samiavasil/verify_tickets | /src/tickets_service/db/Topics.cpp | C++ | cpp | 1,089 | no_license | #include "Topics.h"
#include "MapQVarCass.h"
#include <QDebug>
static const QList<QPair<QString, QVariant::Type>> colType({
{"id", QVariant::Int},
{"error", QVariant::String},
{"switch_on", QVariant::Int},
});
Topics &Topics::Instance()
{
static Topics Topics... |
36a06d3259df40686f7bde4beef52de99cc302c0 | 73d6b2afc06a271c8aaae27275edf7a814e2584b | Yun-Su/C | /C/C/字符串比较strstr.cpp | C++ | cpp | 342 | no_license | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char a[30] = "asdfghjklqwertyuiop123";
char b[30] = "tyu";
char *p = strstr(a, b);
//比较两个字符串是否相等
if (p == NULL)
{
printf("没找到\n");
}
else
{
printf("已找到");
char c[30];
strcpy_s(c, p + 3);
printf("%s", c);
}
getchar();
} |
254236689408ae20237d490977b97472f9c9677a | 8414efcbe45075bf898ed8c977abcc1aea9d8e57 | zanzo420/Sea-Of-Thieves-SDK | /SDK/MerchantAllianceSpawnContext_functions.cpp | C++ | cpp | 584 | permissive | // Name: SeaOfThieves, Version: 2.0.23
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//--------------------------------------------... |
b5c30ea9ee1e3c0bc99e4e115d8a2e448cfd77be | cbf6d52c85770e2fdc59d23c55f36a88ce4875ba | roushanraj/CppConceptsAndPatterns | /ClassAndObjects/constructorsDestructors/defaultCons.cpp | C++ | cpp | 1,198 | no_license | #include<cstdlib>
#include<iostream>
using namespace std;
class Student
{
public:
int roll;
string name;
int std;
Student(string="null", int=0 , int=0);
Student(const Student &source);
~Student();
};
Student::Student(string newname, int newroll, int newstd)
: name {newname}, roll {newr... |
443369527a9090c38654940b20a23aa88d9a1a7d | 16c3290816733799bfb220c1cb42080f4097a616 | larry98/gbbs | /benchmarks/MinimumSpanningForest/Boruvka/MinimumSpanningForest.cc | C++ | cc | 3,259 | permissive | // This code is part of the project "Theoretically Efficient Parallel Graph
// Algorithms Can Be Fast and Scalable", presented at Symposium on Parallelism
// in Algorithms and Architectures, 2018.
// Copyright (c) 2018 Laxman Dhulipala, Guy Blelloch, and Julian Shun
//
// Permission is hereby granted, free of charge, t... |
2959689f021ffb09ee412d270dc12146c3a1dd44 | 01fc3550600014ab930cbcd8c86ee1613176c70b | LiYouCheng2014/leetCode | /leetCode-c/leetCode-c/LeetCode/leetCode-0018/leetCode-0018.hpp | C++ | hpp | 243 | no_license | //
// leetCode-0018.hpp
// leetCode-c
//
// Created by liyoucheng on 2019/1/20.
// Copyright © 2019年 Giga. All rights reserved.
//
#ifndef leetCode_0018_hpp
#define leetCode_0018_hpp
#include <stdio.h>
#endif /* leetCode_0018_hpp */
|
67304357f8566f6e6f10f2fd376534205df154f2 | 11773e8a0bf9f2c3961fa0a85ffe762e29611768 | whycoding126/chromium | /chromeos/login/auth/stub_authenticator.cc | C++ | cc | 4,550 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/login/auth/stub_authenticator.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/threading/... |
3b69572ee40ad18b1294153bd7a9e081de552be4 | 5dcb83bfbfc12ba478130c66525c0d1626534e51 | Spaink/AED01 | /lista-8/exe12.cpp | C++ | cpp | 1,073 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef struct{
string nome, telefone;
int ligacoes;
}agenda;
agenda vet[1000];
bool operador_menor(agenda a, agenda b) {
return a.ligacoes > b.ligacoes;
}
int main(){
char op;
string nome;
int k = 2, i;
vet[0].nome = "Hermanoteu";
vet[0].telefone = "4523-2248";
... |
7e5c8e3ebbbf6b89be356ef3db503a13dffb2fec | 2adc35df8ddba2a95c6821a46c1db2b7e315dee8 | Laizl95/Algorithm | /Codeforces Round/Codeforces Round #597 (Div. 2)/D.cpp | C++ | cpp | 1,787 | no_license | #pragma GCC optimize(2)
#include<bits/stdc++.h>
#define rep(i,x,y) for(int i=x;i<y;++i)
#define per(i,x,y) for(int i=y-1;i>=x;--i)
#define ms(x,y) memset(x,y,sizeof(x))
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define pii pair<int,int>
using namespace std;
const int N=2e3+5,inf=1e9+5;
typedef long long... |
4eee1dd347b427ced12836bd310e89991e9d23e5 | 730f4e8cd83361764fe671e4136dc77e44a73b9c | pcw109550/problem-solving | /LeetCode/path-with-maximum-gold.cpp | C++ | cpp | 1,219 | no_license | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
class Solution {
int result, M, N;
public:
int getMaximumGold(vector<vector<int>>& grid) {
// O(M ** 2 * N ** 2)
result = 0, M = grid.size(), N = grid[0].size();... |
9aef2903b939e4f2f785288f24a7d644581629ac | 404894e1d8ea5cea349bcdf5ef8bccdb7bc1291e | FaridWaid/sms4-praktikum-grafikakomputer | /Modul 7/No4/main.cpp | C++ | cpp | 1,857 | no_license | #include<windows.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include <stdlib.h>
static GLfloat spin = 0.0;
void display(void) {
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
glRotatef(spin, 0.0, 0.0, 1.0);
glColor3f(1.0, 1.0, 1.0);
glRectf(-25.0, -25.0, 25.0, 25... |
055e335c8da72b32837e63d26d748fbd56eb39de | c509609fb933e6927a946d33139868ebada8807f | biyotteu/algorithms | /C++/1,2,3 더하기3.cpp | C++ | cpp | 381 | no_license | #include <bits/stdc++.h>
#define MOD 1000000009
using namespace std;
long long dp[1000005];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
dp[0] = 1;
for(int i=1;i<=1000000;i++){
dp[i] = dp[i-1];
if(i>=2) dp[i] += dp[i-2];
if(i>=3) dp[i] += dp[i-3];
dp[i] %= MOD;
}
int t;
cin >> t;
w... |
f88edd431f82efea7850a9b1a5a45f168ebe28ff | a2ccdc7c388580de0f39b3802134098512963904 | alongubkin/modern | /compiler/ModernCompiler/FunctionNode.cc | C++ | cc | 2,103 | permissive | #include "FunctionNode.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Function.h"
std::string FunctionNode::GetNodeSummary() const
{
std::ostringstream stream;
stream << "FunctionNode { name: " << _name << ", returnType: " << _returnType << ", arguments: [";
std::vector<cons... |
06bbd8b816eaf0dededdaf4d44c3cdd7c466757f | 67c5e3ffba48be6be19f26a37da8335472b29bdb | ezehy/ebuxcore | /src/masternode.cpp | C++ | cpp | 28,948 | permissive | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 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 "masternode.h"
#include "addrman.h"
#include "masternodeman.h"
#include "... |
5c5653a4c651f2910570102329cf0fefe5876874 | 44e15057a76994f04a6ea06922d6302dae6c74e5 | nitoneum/core | /src/qt/bitcoinstrings.cpp | C++ | cpp | 13,614 | 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 recomme... |
914b04ae76b6ea3a96c3bb7fa8cbd688c1235953 | b914bfb9a3f14473ff38580530a7c2c62f76cddc | yoo-s/school | /cs162/fp/piano.hpp | C++ | hpp | 262 | no_license | #ifndef PIANO_HPP_
#define PIANO_HPP_
#include <iostream>
#include <string>
#include "room.hpp"
class Piano : public Room {
public:
Piano();
void options();
void go(bool& game, char action, Room*& current, Inventory inv);
};
#endif /* PIANO_HPP_ */
|
f2b13b0096df8b1d509df8ee1ac74a8639cb3ed7 | d54dffa71f265026447a22a18dddc3805b0fe61b | BuildJet/xls | /xls/ir/channel.cc | C++ | cc | 3,222 | permissive | // Copyright 2020 The XLS Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
cc8e803709a14bf74c7449b6cb617d1ccab63fff | 71e92b701ca051a63bb7bae9869743b0f54489ae | Xangis/magma | /editors/de310/source/obj/object.cpp | C++ | cpp | 14,180 | no_license | //
// File: object.cpp originally part of dikuEdit
//
// Usage: multitudes of functions for use with objects
//
// Copyright 1995-98 (C) Michael Glosenger
//
#include <iostream>
#include <stdlib.h>
#include "../types.h"
#include "../fh.h"
#include "object.h"
#include "objhere.h"
using name... |
b3c7c079a30dcbd50a38f14edba33133f88308ca | a3008f0d06ea481ac7c07ff13f2b947cbfa35c3f | MisguidedBadge/AI | /NeuralNetworkStuff/NeuralNetworkStuff/Main.cpp | C++ | cpp | 13,059 | no_license | /* Program Main File
- Use the referenced libraries in libraries.h
- output the results
*/
#include "libraries.h"
int main()
{
// Network Variables ////////////////////////////////////////////////
int batch = 12;
int pool = 50;
int height = 0; // Image Height
int width = 0; // Image width
int nk1 = 0; /... |
930890be4cea6f0130fe65c4c88af10b8862d920 | dd438661273fa00e82a421b199b555b31caa4ead | softlxf/tangram-es | /tests/unit/layerTests.cpp | C++ | cpp | 5,997 | permissive | #include "catch.hpp"
#include "scene/sceneLayer.h"
#include "data/tileData.h"
#include "scene/styleContext.h"
using namespace Tangram;
using Context = StyleContext;
// Functions to initialize SceneLayer instances
const int dg0 = 0;
const int dg1 = 1;
const int dg2 = 2;
const int group1 = 1;
const int group2 = 2;
... |
705166c08c6a71da647f40bec0d555425a7ec936 | 2419e5670d3663d5864d198275119f507f0c9569 | jingma-git/physics | /external/Bartels/src/linear_tri2d_corotational_dq2.cpp | C++ | cpp | 1,545 | no_license | #ifdef SIM_STATIC_LIBRARY
# include<../include/linear_tri2d_corotational_dq2.h>
#endif
template<typename HessianType, typename DefoType, typename DerivedV, typename Scalar, typename DerivedParams>
void sim::linear_tri2d_corotational_dq2(Eigen::DenseBase<HessianType> &out, const Eigen::MatrixBase<DerivedV> &q, const Ei... |
a2694dec6a7dfde8882946db678f6acf599b9185 | fd97a35276467f6379ee660a8268f1c84a4e9d68 | peter-frentrup/pMath | /richmath/src/gui/gtk/mgtk-recent-documents.cpp | C++ | cpp | 2,580 | no_license | #include <gui/gtk/mgtk-recent-documents.h>
#include <gui/recent-documents.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
using namespace pmath;
using namespace richmath;
void MathGtkRecentDocuments::add(String path) {
GtkRecentManager *manager = gtk_recent_manager_get_default();
if(path.l... |
189460a6920e554dd02ba433c5d9c32cdfb37372 | 8d803bf6c600993a0798d48fb6ff4b5e23b9c2e0 | hatkirby/fanmail | /designer.cpp | C++ | cpp | 3,785 | no_license | #include "designer.h"
#include <dirent.h>
#include <sstream>
#include <iostream>
designer::designer(
std::string imagesDir) :
colDist_ {0, 1, 100, 30, 5, 1, 1}
{
DIR* imgdir;
struct dirent* ent;
if ((imgdir = opendir(imagesDir.c_str())) == nullptr)
{
throw std::invalid_argument("Couldn't find images"... |
1885119416d816d2f0fab30ed65182d7cabd5321 | 2e4cc9afd0aaf8dff83899f785e30d195a0d7c1c | AlkaYadav/Geeks | /HackerRank/src/BitDiffer.cpp | C++ | cpp | 974 | no_license | /*
* BitDiffer.cpp
*
* Created on: Aug 26, 2015
* Author: user
#include <iostream>
using namespace std;
void printDistinctBits(long long int P,long long int M){
long long int count=0;
while(P&&M){
cout<<"P "<<(P&1)<<endl;
cout<<"M "<<(M&1)<<endl;
if((P&1) != (M&1)){
count++;
}
P=P>>1;
M=... |
593b6e983f16523760ac815ca0d760eaf4c169cb | b1a4e75ac0330aa5777ba9956bde37ce5f0178c5 | wwwK/nodegui | /src/cpp/include/nodegui/QtWidgets/QHeaderView/nheaderview.hpp | C++ | hpp | 424 | permissive | #pragma once
#include <QHeaderView>
#include "Extras/Utils/nutils.h"
#include "QtWidgets/QAbstractItemView/qabstractitemview_macro.h"
#include "core/NodeWidget/nodewidget.h"
class DLL_EXPORT NHeaderView : public QHeaderView, public NodeWidget {
Q_OBJECT
NODEWIDGET_IMPLEMENTATIONS(QHeaderView)
public:
using QH... |
2dd44cea6e93276812d069836d97617e8843835b | f1e649b7cdec5609ffb2aa179184fbdfe3bea26a | iridium-browser/iridium-browser | /third_party/webrtc/modules/congestion_controller/goog_cc/alr_detector.cc | C++ | cc | 4,014 | permissive | /*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
3cd91d4da5799e34d0dfa390d3dedbd52a131496 | 37dec0a8bb9e12fe0261bd588adedfe31bcf7683 | harr999y/OgreFramework | /NxOgreSample_Clothes/NxOgreSample_Clothes.cpp | C++ | cpp | 18,245 | no_license | #include "NxOgreSample_Clothes.h"
void NxOgreSample_ClothesApp::setupPhysX()
{
mWorld = NxOgre::World::createWorld();
NxOgre::ResourceSystem::getSingleton()->openProtocol(new Critter::OgreResourceProtocol());
NxOgre::SceneDescription sceneDes;
sceneDes.mGravity = NxOgre::Constants::MEAN_EARTH_GRAVITY;
sceneDes.mU... |
318111c47095ced81677a0df91aa647647c11d21 | 5eedea8ec1e90d57f8e60bd2302a5fee36f74187 | wengn/AL_USDMaya | /plugin/AL_USDMayaTestPlugin/AL/usdmaya/nodes/test_TransformMatrix.cpp | C++ | cpp | 54,630 | permissive | //
// Copyright 2017 Animal Logic
//
// 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 ... |
8e389dc92c862503dff953cf72cd3551975b2f88 | fc853e16c065f16a9152e7703baa634d19817025 | aaron-bray/ITKExamples | /src/Core/Common/BoundingBoxOfAPointSet/Code.cxx | C++ | cxx | 2,051 | 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... |
a320f4ba91e14d51c7fef20b684231a1f516ad9f | b7c4e07c0a9d88119e2b56321afb12a83bec7e05 | JeromeOrtali/PureBasic-Engine3D | /include/Engine3D.hpp | C++ | hpp | 3,409 | permissive | /* PureBasic Engine3D licence
* --------------------------
*
* MIT License
*
* Copyright (c) 2017 Jerome Ortali
*
* 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,... |
01e35d45f9fbe5bb04fbb14262524373ad4efdad | 93b81f89de0ed90e3e18defd4dab65b315982893 | Ph0en1xGSeek/ACM | /模板/Manacher_最长回文.cpp | C++ | cpp | 1,328 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int p[220005];
int bonder, id ;
int longest;
char str[110002];
char s[220005];
int i, n;
while(scanf("%s", &str[1]) != EOF)
{
bonder = 0;
id = 0;
longest = 0;
for(... |
0b833f8512d81536c72508d8d41c7aeb2e754d56 | 00a99f024665ade28b296de80116bf62e8671cc8 | joseleite19/competitive-programming | /SummerSchool2017/day4/3.cpp | C++ | cpp | 215 | no_license | #include <bits/stdc++.h>
#define ff first
#define ss second
#define mp make_pair
using namespace std;
void file(){
freopen("input.txt", r, stdin);
freopen("output.txt", w, stdout);
}
int main(){
return 0;
} |
de716d770b39986fe6408397b707b1ce5de9b8a4 | 6a2c3611b66c838e049b6075a30fd7cc8385028a | liang0/chromium | /cc/test/test_options_provider.cc | C++ | cc | 3,915 | permissive | // Copyright 2018 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 "cc/test/test_options_provider.h"
#include <limits>
#include <vector>
namespace cc {
class TestOptionsProvider::DiscardableManager
: public... |
ea1aa17187a544009618b161a65a0be80f3c2456 | 39fc0962ab9c73cb5107411ad487a43c1097d4b3 | HIP70890/ACE_TAO | /ACE/tests/Compiler_Features_23_Test.cpp | C++ | cpp | 750 | no_license | /**
* This program checks if the compiler doesn't have a certain bug
* that we encountered when testing C++11 features
*/
#include "test_config.h"
#include <array>
#include <string>
#include <cstdint>
std::array<std::string, 2> priority_names =
{
{
std::string("NOT USED"),
"P_PANIC"
}
};
std::strin... |
a6f67100e6f3ed7cbd369376267818a69ea81645 | 66e366c6c1fd33514a9599d7f0d79242e51f16ce | zanzo420/Medieval-Dynasty-SDK | /0.6.0.3/Internal/SDK/DE_GiveQuestReward_functions.cpp | C++ | cpp | 2,125 | no_license | // Name: Medieval Dynasty, Version: 0.6.0.3
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------... |
542171221f3e65ccfdf1058b8afe808d085a0d4b | 4592566899e8ad9e2a99aaacf94172ac65960608 | Lei0126/No.3_Road | /ablum/servo.cpp | C++ | cpp | 1,308 | permissive | #include "servo.h"
#include <math.h>
#include <wiringPi.h>
#include <softPwm.h>
#define servo_pin 1
#define RANGE 200
Servo::Servo(QObject *parent) : QObject(parent)
{
m_nowAngle =90;
m_finishTimer.setSingleShot(true);
init();
connect(&m_finishTimer, SIGNAL(timeout()), SLOT(onTimeout()));
}
Servo::~S... |
d6d4bc58c899475fc83981329ef5abe086881f62 | a8d2d76ee66a65d1361c46ba9a3984fd718116fc | sieutruc/augmentedReallity | /AR Presenter/ImageTargets_multi/jni/Texture.cpp | C++ | cpp | 2,554 | no_license | /*==============================================================================
Copyright (c) 2010 QUALCOMM Incorporated.
All Rights Reserved.
Qualcomm Confidential and Proprietary
@file
Texture.cpp
@brief
Implementation of class Texture.
====================... |
e473b84a7d63504134f0c3d1e9ddfd7421242ceb | 64b25a76da3bb143e85aa59fddf600ef0bd3f9a0 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-codeartifact/source/model/DeleteRepositoryPermissionsPolicyRequest.cpp | C++ | cpp | 1,530 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteRepositoryPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStrin... |
b834cb7709f7e37464491f3ad748bd128f841d49 | 222a8fe90a68d930f3bd5a915266702dd5cf7549 | Rakatashii/cpp_ch7 | /pointers_to_functions/pointers_to_functions/main.cpp | C++ | cpp | 1,049 | no_license | #include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
typedef double (*funk)(double);
double square(double n);
void print_table(double (*f)(double), vector<double> v);
void print_table2(double (*f)(double), vector<double> v);
int main(int argc, const char * argv[]) {
vector<double> nums1... |
fda83c97762b62cfb4dbb0aadc4b81b821bbd3a9 | 6c21b50b75326693470e998d3a5971bff8a650c9 | pedroborgesmelo/IntegerBilevelSolver | /test/test03.cpp | C++ | cpp | 5,184 | no_license | /*
* author: pedro.borges.melo@gmail.com
* date: March/2018
*
* the model is:
*
* min \sum_i x_i
* s.t. x_i \in N, x_i >= a_i
* y_i \in \arg \min {y_i s.t. y_i >= 2*x_i}
* y_i >= b_i
*
* for a_i and b_i selected randomly
*/
#include <iostream>
#include <functional>
#include <ilcplex/ilocp... |
fde66569e039981ca7a51b8beb7f773906345271 | 8c2402b251b4c7c74de4e14abeacbdf520a90bf7 | pruthvistony/rocBLAS | /clients/include/pinned_memory_allocator.hpp | C++ | hpp | 1,494 | permissive | //
// Copyright 2018-2020 Advanced Micro Devices, Inc.
//
#pragma once
#include <hip/hip_runtime.h>
//!
//! @brief Allocator which requests pinned host memory via hipHostMalloc.
//! This class can be removed once hipHostRegister has been proven equivalent
//!
template <class T>
struct pinned_memory_allocator
... |
9c340ba870c3ffeb7965927fb157f5479e5cc6ac | 2441b1e96800ce63e77c610d7dea0e460ab08b2e | Garker-gan/NewCode_SourceCode | /numberSquence.cpp | C++ | cpp | 1,842 | no_license | /*
使用KMP算法做数字串匹配(含暴力匹配)
Garker-gan
2020-10-19
*/
#include<iostream>
using namespace std;
#define MAX 1000000
#define max 10000
int NextTable[max];
int Text[MAX];
int Pattern[max];
//遍历模式串获取next数组,数组从1开始存储
void getNextTable(int m)
{
int j = 0;
NextTable[j] = -1;
int i = NextTable[j];
wh... |
ae81830ea122be58ee3d918a37be04ea00a0c261 | ad0b7ec991015bf3511102feedcedeea55185327 | pavlosva/THMMY | /A2-8551/operations.cpp | C++ | cpp | 1,146 | no_license | /**
* A2-8551.c
* Προγραμματιστικές τεχνικές, 2η εργασία
* Συναρτήσεις πράξεων μιγαδικών και πραγματικών αριθμών.
* Νικόλαος Κατωμέρης, 8551
* 18/10/2015
*/
#include "operations.h"
float add(float num1, float num2)
{
return num1+num2;
}
complex add(float re1, float re2, float im1, float im2)
{
complex ... |
2212893ad2ce6b7deeedc30f0c24c5d726100ce6 | 9761e7cce91871a738e199f881375dd5f6e8f6ff | OpenHero/gblastn | /c++/src/algo/blast/unit_tests/api/remote_blast_unit_test.cpp | C++ | cpp | 53,472 | permissive | /* $Id: remote_blast_unit_test.cpp 382374 2012-12-05 15:02:09Z rafanovi $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Gover... |
4c88ab1f58dc864d8bdc6e03db7a826cdadd1b7c | 3620f977cb84f62bc3fcbd7ac62cc774d876e672 | uhini0201/CodeChefChallenges | /CodeChefLongAug20/CHEFWARS.cpp | C++ | cpp | 606 | no_license | // Problem Link : https://www.codechef.com/AUG20B/problems/CHEFWARS
#include <bits/stdc++.h>
using namespace std;
#define whatis(x) cerr << #x << " is : " << x << endl;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
typedef long long ll;
typedef unsigned long long ul... |
faaac722ceacab2cc95054b29708b3677f16bb1f | 0d0c83b0487b43efc4cbcedee42849867713cb81 | Imfirn/SFML-3 | /SFML-3/Animation.cpp | C++ | cpp | 2,627 | no_license | #include "Animation.h"
Animation::Animation(sf::Texture* texture, sf::Vector2u imageCount, float switchTime) {
this->imageCount = imageCount;
this->switchTime = switchTime;
totalTime = 0.0f;
currentImage.x = 0;
uvRect.width = texture->getSize().x / float(imageCount.x);
uvRect.height = texture->getSize().y / float... |
0f5c0c5adf6b082178130604a32128d9b299ff63 | bee69f8942afe3a7b4da5dc35c0a09f198d84c95 | BGCX261/zprproject-svn-to-git | /Rozposzony algorytm ewolucyjny/AlgorithmControler/Factory.hpp | C++ | hpp | 1,058 | no_license | //
//
//
// @ Project : Rozproszony algorytm ewolucyjny
// @ File Name : SpecimenFactory.hpp
// @ Author : Paweł Marchewka, Bogdan Jezierski
//
//
#if !defined(_SPECIMENFACTORY_H)
#define _SPECIMENFACTORY_H
#include "../ToolsAndTypes/Creator.hpp"
#include <iostream>
#include "boost/shared_ptr.hpp"
#... |
d395eef47e6fc3680d242db9d65218cd78308cca | f82f944b714184fc62df81217177a12bfe53ce42 | WhiZTiM/coliru | /Archive2/6c/24384c171bd216/main.cpp | C++ | cpp | 2,121 | no_license | /*
* Write a program that takes as its first argument one of the words ‘sum,’ ‘product,’ ‘mean,’ or ‘sqrt’ and for further arguments a series of numbers.
* The program applies the appropriate function to the series.
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <iostream>
#includ... |
72e7cfc732ff48bfb4f33ebb4ec3af858ce922af | 8f2cf6fd9cfb9ef226b0dc01eece1c18df712bcc | drlongle/leetcode | /algorithms/problem_1575/solution.cpp | C++ | cpp | 4,550 | no_license | /*
1575. Count All Possible Routes
Hard
You are given an array of distinct positive integers locations where locations[i] represents the position of
city i. You are also given integers start, finish and fuel representing the starting city, ending city, and
the initial amount of fuel you have, respectively.
At each st... |
315e87d2064551c00e18320eaa39c7f74ca3a8ee | 6f89d68511af3d72db5fa6d4910b8eebe3234793 | pyfsi/Kratos | /kratos/utilities/kratos_log.cpp | C++ | cpp | 4,484 | permissive | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Pooyan Dadvand
//
//
#incl... |
c1e47a3b3ee59783ca573af22b0010b715a222d2 | 1a2cbef18dfb3164a29fa00063a23dbbcc9cce4a | RickyJun/live_plugin | /back/RtmpLivePushSDK/boost/boost/units/systems/si/codata/atomic-nuclear_constants.hpp | C++ | hpp | 1,677 | permissive | // Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.tx... |
1b25a9ef5a8122461bd4bf4f4c3597452abc7871 | f1e8d1df2e42799e86f5e48400f5fe7b42cfb224 | dqyi11/SVNBackup | /Proj/MOO/NSGA-III-cpp/problem_DTLZ.cpp | C++ | cpp | 6,900 | no_license |
#include "problem_DTLZ.h"
#include "alg_individual.h"
#include "aux_math.h"
#include "aux_misc.h"
#include <cmath>
#include <vector>
using std::size_t;
using std::cos;
// ----------------------------------------------------------------------
// CProblemDTLZ
// ----------------------------------------... |
3e3cec25286be828d2ada709ace1355f94155c71 | adfb8aaf06d26b677a35865f68f4619378a38d35 | Adityadilliwal/100 | /Q42.cpp | C++ | cpp | 469 | no_license | #include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main ()
{
char str[100],temp;
cout<<"Enter string: ";
cin>>str;
int n=strlen(str);
for(int i=0;i<n-1;i++)
{
for(int j =i+1;j<n;j++)
{
if(str[i]>str[j])
{
temp=str[i];
... |
89efd66ac6b0f98f28be2a070331ac8ad52dae5f | 425703b774459be2d8bb1e0b9939a780dca24142 | marco-c/gecko-dev-wordified | /third_party/msgpack/include/msgpack/v2/cpp_config_decl.hpp | C++ | hpp | 1,579 | permissive | /
/
/
/
MessagePack
for
C
+
+
C
+
+
03
/
C
+
+
11
Adaptation
/
/
/
/
Copyright
(
C
)
2016
KONDO
Takatoshi
/
/
/
/
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
MSGPACK_V2_CPP_CONFI... |
167e855de31cf80fc4c63c083ca78584207ae43b | 1aa69d221569654b233770195e215ae63196900d | towhid1zaman/Problem__Solving | /codeforces/426/A.cpp | C++ | cpp | 1,402 | no_license | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
#define nl "\n"
#define X first
#define Y second
#define MAX INT_MAX
#define pb(a) push_back(a)
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) a*(b/gcd(a, b))
#define mp(a,b) make_pair(a,b)
#define check() {printf("OK\n");}
#define SORT(v) sort(v.beg... |
3f6b8653faf1f651e2c418ef9325d92117ef383c | 370c7516e95beb2e5be0c03f3406a79de3c8fdba | CU-0xff/juliet-cpp | /000/115/392/CWE762_Mismatched_Memory_Management_Routines__new_array_delete_struct_64b.cpp | C++ | cpp | 2,136 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE762_Mismatched_Memory_Management_Routines__new_array_delete_struct_64b.cpp
Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_array_delete.label.xml
Template File: sources-sinks-64b.tmpl.cpp
*/
/*
* @description
* CWE: 762 Mismatched Memory Manage... |
af348df8192ad8f4361c8c0f91626443f8f0cda7 | 0daf9c5e0213a4942209759a5285f082b55c46f1 | Mr-Leshiy/nnoops-long-arith-lib | /src/long_arithmetic/signed_big_integer.cpp | C++ | cpp | 1,254 | permissive | #include "nnoops/long_arithmetic/signed_big_integer.hpp"
namespace nnoops {
template struct BigInteger<8, uint8_t>;
template struct BigInteger<16, uint8_t>;
template struct BigInteger<32, uint8_t>;
template struct BigInteger<64, uint8_t>;
template struct BigInteger<128, uint8_t>;
template struct BigInteger<256, uint8... |
b38c72927633ea4be9141530ccc63fdd2b4bdf3b | dda73f54ac14a2e8ce10aca4b2591d58edbd29cb | NHERI-SimCenter/R2DTool | /UIWidgets/RendererTableView.cpp | C++ | cpp | 3,782 | permissive | /* *****************************************************************************
Copyright (c) 2016-2021, The Regents of the University of California (Regents).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are... |
6bf65a4110bdb215f6d023e51997588bb4a1e305 | 1bca3a7d1979951e84ff4c46156440422f25d411 | aamarin/ucsd_coursera_basic_data_structures_project | /projects/week1_basic_data_structures/2_tree_height/tree-height_ut.cpp | C++ | cpp | 1,690 | permissive | #include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include "catch.hpp"
#include "tree-height.hpp"
int createExpectedOutput(const std::string& fileName) {
std::ifstream infile(fileName);
int output = 0;
infile >> output;
return output;
}
std::vector<Node> buildTreeFromInput(c... |
9493ab514eefdc125c4eb1e7fb207054f62ddb98 | 18af91cf7d06a5e63e8831e7821319e8de618dde | TJFord/sard | /USER-OMP/angle_cosine_shift_exp_omp.cpp | C++ | cpp | 5,162 | no_license | /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04... |
e03317e800f8212c542a301ae1ae933bb73f7057 | dc8e02677197283fa12de762af81d7d6bd20c4ff | codingsf/gamnet | /example/utility_example/atomicptr_example.cpp | C++ | cpp | 578 | no_license | #include "../../Gamnet/Library/Atomic.h"
#include <iostream>
#include <thread>
Gamnet::Atomic<int> atomic(0);
// 1. delclear Atomic<T> variable
void ThreadFunction()
{
for(int i= 0; i<10; i++)
{
Gamnet::AtomicPtr<int> ptr(atomic);
(*ptr)++;
std::cout << (*ptr) << std::endl;
}
}
int main() {
Gamnet::... |
9dc90030b5ea2b4aebc997705b37b61e600016bb | e2999e32bf8b3998547b7ec2920e46936f51fa3a | ImgBotApp/CloakCoin | /src/enigma/pow.cpp | C++ | cpp | 4,822 | permissive | /*
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 u... |
dfdce84592a1572fab94ad2d97f1859bf04669fa | 156d66df99973eea2b65b67b48cf2841acf07b12 | dereksodo/usaco | /Ch4/4.4.1.cpp | C++ | cpp | 1,319 | no_license | /*
ID: zjd32151
TASK: shuttle
LANG: C++
*/
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <set>
#include <vector>
#include <map>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <cassert>
#include <climits>
using namespace std;
typ... |
49b58367986856fbe65088e846701e3c21b15a92 | 8c535a682d0e0aaa0e829cb39916876c98b76254 | theo-char/armnn | /src/backends/backendsCommon/test/layerTests/FakeQuantizationTestImpl.cpp | C++ | cpp | 2,319 | permissive | //
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FakeQuantizationTestImpl.hpp"
#include <backendsCommon/CpuTensorHandle.hpp>
#include <backendsCommon/test/TensorCopyUtils.hpp>
#include <backendsCommon/test/WorkloadTestUtils.hpp>
#include <test/Tenso... |
51c95f9ed24b3a0d1831910b36a093c738ba31b9 | 7f26dfa927da6594263c350c9fcf4763f2fe21ca | haoboxuxu/leetcode-algorithm | /c++/lcof67_把字符串转换成整数.cpp | C++ | cpp | 656 | no_license | class Solution {
public:
int strToInt(string str) {
int k = 0;
while (k < str.size() && str[k] == ' ') k++;
bool flag = true;
if (str[k] == '-') flag = false, k++;
else if (str[k] == '+') k++;
int res = 0;
while (k < str.size() && str[k] >= '0' && str[k] <= ... |
6433eee533881b412e6f2fe2b879537d914650d6 | a24bfffefa5d224cf57b22d7dcb4f1556c4dd254 | kigooz/testrun2 | /src/qt/addressbookpage.cpp | C++ | cpp | 12,987 | no_license | // Copyright (c) 2011-2013 The EarthDollar developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addressbookpage.h"
#include "ui_addressbookpage.h"
#include "addresstablemodel.h"
#include "optionsmodel.h"
#in... |
2452ae4e47cc66bdb60ed366c5e7e8781c34eb78 | 1adb97b5ccbab32c8b2cd850f5f286f8615ecbb5 | mao-yu-2020/cornerstone | /include/fs_log_store.hxx | C++ | hxx | 5,609 | permissive | /*
* Copyright (c) 2016 - present Alpha Infra 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 applicabl... |
0d951b62a25b73067e0d6457aa6525324613ad2c | db0506aa04a5d9e3db37ee45aed404f6c0e043a1 | maozlev/cpp-ex1-b | /snowman.cpp | C++ | cpp | 4,485 | permissive | #include "snowman.hpp"
#include <iostream>
#include <stdexcept>
#include <array>
using namespace std;
namespace ariel{
const int maximum_digits = 99999999;
const int maximum_leagele_digits = 44444444;
const int fixed_one_for_array = 1;
const int ZERO = 0;
const int make_short_by_ten = 10;
const int one_digit_from_rig... |
75df508197b144c523fac1acdf61ae3e5a596ff4 | 2c9e7e3ea0ef2fa4ed6d7125bc6ce453ee837831 | arufonsekun/programming-club | /C++/uri/1170.cpp | C++ | cpp | 435 | no_license | #include <iostream>
#include <cstdio>
using namespace std;
unsigned short int computeDays(float food){
unsigned short int days = 0;
while(true){
if (food <= 1){
return days;
break;
}
else{
food /= 2;
days++;
}
}
}
int main(){
unsigned short int cases;
float food;
cin >> cases;
for(unsign... |
d6b30f2b3b7df0eae456453f30684d9dcae74fe5 | f557ff0afa5520d56032fcb25edbaca2a59ca2e5 | chenxing-xc/ClickHouseHDFS | /dbms/src/Interpreters/DDLWorker.cpp | C++ | cpp | 42,652 | permissive | #include <Interpreters/DDLWorker.h>
#include <Parsers/ASTAlterQuery.h>
#include <Parsers/ASTQueryWithOnCluster.h>
#include <Parsers/ParserQuery.h>
#include <Parsers/parseQuery.h>
#include <Parsers/queryToString.h>
#include <IO/WriteHelpers.h>
#include <IO/ReadHelpers.h>
#include <IO/Operators.h>
#include <IO/ReadBuffer... |
446d26d032997ebaf5ab091c1bbc07f2a9c8da53 | 28cb5b04ec96e6ef37b610a5c11c4fa38c2cea99 | osukarusan/particlephysics | /particlesystem/src/ParticleSystemUI.cpp | C++ | cpp | 6,205 | no_license | // generated by Fast Light User Interface Designer (fluid) version 2.1000
#include "ParticleSystemUI.h"
#include <fltk/xpmImage.h>
#include "WindowGLDisplay.h"
#include "ControlPanel.h"
#include <fltk/SharedImage.h>
static const unsigned char datas_record[206] = {
71,73,70,56,57,97,26,0,26,0,162,0,0,255,0,255,0,0,0,2... |
42576ce2df2951c163666cd0834a05bbe0a19c9f | 196c5dde0f1c69184a14fc59adad5aed96232a43 | cilium/proxy | /tests/cilium_tcp_integration.cc | C++ | cc | 2,015 | permissive | #include "tests/cilium_tcp_integration.h"
#include "envoy/network/address.h"
#include "test/test_common/environment.h"
#include "tests/bpf_metadata.h"
namespace Envoy {
const std::string TCP_POLICY_fmt = R"EOF(version_info: "0"
resources:
- "@type": type.googleapis.com/cilium.NetworkPolicy
endpoint_ips:
- '{{ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.