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 |
|---|---|---|---|---|---|---|---|---|
ffc88dc74b4dca78d4ffcfeaea73e2371e6fe188 | c722fc363cc4b1fc56e79196e91e63efbff21176 | jjzhang166/OpenGL-3.3-Engine-project | /opengl_3_3engine/TextureManager.cpp | C++ | cpp | 1,133 | no_license | //TextureManager.cpp - implementation of the class
//last update : 30/07/2012
#include "TextureManager.h"
namespace OpenGL_3_3Engine
{
TextureManager::~TextureManager()
{
std::cout<<"destructor for tex Man called!"<<std::endl;
for(std::map<std::string,TextureRecord*>::iterator tex = m_textureMap.begin(); tex !=... |
096293a25524bfe35f0b25f150fabee532c4cc3c | 7f8b7763255ad26dee89fde02ca7e67906a5adc4 | serkankayser/bus_reservation | /Bus_Reservation Project/Source.cpp | C++ | cpp | 57,368 | no_license | #include <windows.h>
#include <string>
#include <cstdlib>
using namespace std;
int a = 0;
HMENU hmenu; // declaram un obiect de tip HMENU
void IncarcaPoza();
void AddMenus(HWND); // functie prototip
void AddControls(HWND hwnd); // functie prototip adaugare controale
HBITMAP hPozaLogo1, hPozaLogo2, hB... |
9c68f54515e98c2e247f834388a3f51812b70674 | 4aefa3c28e9be85ec991986b319885a7e0b6e6f9 | ravikishore1993/Spoj | /MIRRORED.cpp | C++ | cpp | 608 | no_license | #include<stdio.h>
#include<iostream.h>
using namespace std;
main()
{
char b,d,q,p,r=2,s=3;
printf("Ready\n");
while(1<2)
{
r=getchar();
s=getchar();
if(r==32&&s==32)
break;
if(r=='b' && s=='d')
printf("Mirrored pair\n");
else if(r==... |
c1a94b2e8be3d0d4524df6561967dab5ee7dce86 | c7c2bddd7d060726a3148a94244159c94124f83f | ECS-251-W2020/chromium | /third_party/skia/src/gpu/vk/GrVkTextureRenderTarget.cpp | C++ | cpp | 11,877 | permissive | /*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/vk/GrVkTextureRenderTarget.h"
#include "src/gpu/GrTexturePriv.h"
#include "src/gpu/vk/GrVkGpu.h"
#include "src/gpu/vk/GrVkImageView.h"
#include "src/gpu/vk/... |
959f062151ce8d6f8a29b1c18986220992e632ce | 78d086f7fd838366e9c0ab485cba8b337cf1162d | cluesblues/kio | /src/core/dataprotocol.cpp | C++ | cpp | 9,731 | no_license | /*
Implementation of the data protocol (rfc 2397)
SPDX-FileCopyrightText: 2002, 2003 Leo Savernik <l.savernik@aon.at>
SPDX-License-Identifier: LGPL-2.0-only
*/
#include "dataprotocol_p.h"
#include "global.h"
#include <QByteArray>
#include <QCharRef>
#include <QTextCodec>
#ifdef DATAKIOSLAVE
# include... |
9c7587a1998f58d1762afbacbe8cd28aa7b521db | a7e10954910393e57e3d491780e9d63c3c4b2037 | VladStefanDieaconu/PA | /skel-lab5/skel-lab05/cpp/task-4/main.cpp | C++ | cpp | 2,180 | no_license | #include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
class Task {
public:
void solve() {
read_input();
print_output(get_result());
}
private:
int n, k;
string caractere;
vector<int> freq;
void read_input() {
ifstream fin("in");
fin >> n >> k;
fin >> caractere;
caractere ... |
78ebbfee4d13065fc59d64d95b979ff23de96788 | 3470dfecef5dc88c053b72009599be1fb342937b | VincentSu/RePhone_API_for_Arduino | /LNFC.cpp | C++ | cpp | 3,537 | no_license | /*
Copyright (c) 2014 MediaTek Inc. All right reserved.
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..
This library is distributed in the hop... |
5f56cb884e3de7d0c7b97da11c95274a8f02a0b6 | e9ecdda5a2af406e0c914e5edb1bcd7c209b9168 | artifexor/boomerang | /loader/MachOBinaryFile.cpp | C++ | cpp | 17,570 | no_license | /**
* \file
* \brief Contains the implementation of the class MachOBinaryFile.
*
* This file implements the class MachOBinaryFile, derived from class
* BinaryFile. See MachOBinaryFile.h and BinaryFile.h for details.
*
* \authors
* Copyright (C) 2000, The University of Queensland
* \authors
* Copyright (C) 20... |
0c934979ee3382c173bbed911ee4ccb009d87daa | b18f112c48930a04b5bfcd83c7721ca5a44c2376 | WattanaixKU/204214-problemsolving-lab | /grader/week03/w03-b02-listwork2.cpp | C++ | cpp | 727 | no_license | #include <iostream>
#include <list>
using namespace std;
int main()
{
int n,inp;
char mode;
cin >>n;
list<int> ll;
for(int i=0;i<n;i++)
{
cin >> mode >> inp;
if(mode == 'I')
ll.push_front(inp);
else if(mode == 'A')
ll.push_back(inp);
else
... |
7d426bf2c365819a3786f50cc6b7b6e86989329a | b0844db92f7b57b0bc8a2373966de3306e7998ce | Thrinaria/Codebase | /boost_1_34_1/boost_1_34_1/libs/ptr_container/test/ptr_map_adapter.cpp | C++ | cpp | 1,649 | permissive | //
// Boost.Pointer Container
//
// Copyright Thorsten Ottosen 2003-2005. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/li... |
83ee108062d62d671d3e7e144ef953b494d66f41 | c4bbf0455d3e2bc9ac6fa02c25d2370511402f86 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/MP+dmb.sy+pos-ctrl-data-[ws-rf]-ctrlisb.c.cbmc.cpp | C++ | cpp | 60,755 | no_license | // 0:vars:4
// 8:thr0:1
// 9:thr1:1
// 10:thr2:1
// 4:atom_1_X0_1:1
// 5:atom_1_X2_1:1
// 6:atom_1_X7_2:1
// 7:atom_1_X8_0:1
#define ADDRSIZE 11
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rn... |
c3c887cc3435f2fe0b222ee0ac7a4e38425f1de7 | 960e31b9d2a173021e3ae4f137a468d73a433d76 | antmicro/Surelog | /src/Library/ParseLibraryDef.cpp | C++ | cpp | 9,619 | permissive | /*
Copyright 2019 Alain Dargelas
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... |
8d11719585e3cbb553b34f440683506ba590dc38 | 4cc0d9a22d6f56dc74a8b874d7a948559705c1c4 | DuongNguyenHai/GrowBox | /program/stuff/data.cc | C++ | cc | 5,006 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.h> /* for setitimer */
#include <unistd.h> /* for pause */
#include <signal.h> /* for signal */
#include <iostream>
#include <fstream>
#include <iomanip>
#include "DHT22.h"
#include "DS18B20.h"
using namespace std;
#define GMT 7*60*60
#define UNIX_TIME(time)... |
3a3c363e237c5abf207145513720ff3858e16fa8 | d5caf9c88296373eba57b3f0430fcbcf77cef21c | anandyeah123/Impo-codes | /LinkedList/insertionLL.cpp | C++ | cpp | 742 | no_license | #include<iostream>
using namespace std;
struct Node{
int data;
Node* next;
};
void push(Node** head_ref,int new_data){
Node* new_node= new Node();
new_node->data=new_data;
new_node->next= *head_ref;
*head_ref=new_node;
}
void insertAfter(Node* prev_node,int new_data){
Node* new_node=new No... |
2b757047cfddd9e960a1facd498dd342249d10f7 | d5c79cbedf9f861b73ccbc36cc35bf535e606859 | carbonrobotics/TRTorch | /core/conversion/conversionctx/ConversionCtx.cpp | C++ | cpp | 5,052 | permissive | #include <iostream>
#include <sstream>
#include <utility>
#include "core/conversion/conversionctx/ConversionCtx.h"
namespace trtorch {
namespace core {
namespace conversion {
// clang-format off
std::ostream& operator<<(std::ostream& os, const BuilderSettings& s) {
os << "Settings requested for TensorRT engine:"
... |
3ebdf7b56127e931461099df7f61fbc8c8fb053c | 852bc2055479e31737804274bea8a4089176bf81 | Shulikov-v/OpenPapyrus | /Src/OSF/scintilla/lexers/LexMMIXAL.cxx | C++ | cxx | 5,371 | permissive | // Scintilla source code edit control
/** @file LexMMIXAL.cxx
** Lexer for MMIX Assembler Language.
** Written by Christoph Hösler <christoph.hoesler@student.uni-tuebingen.de>
** For information about MMIX visit http://www-cs-faculty.stanford.edu/~knuth/mmix.html
**/
// Copyright 1998-2003 by Neil Hodgson <neilh@sc... |
fc906391e9be8573bfd7686f5222efb0b2f28d15 | 21c7c33ac5f6e34a36000fd13230592f8b9914a6 | SaifHaiderMalik/OOP | /Labs/Saif/Misc/t17.cpp | C++ | cpp | 520 | no_license | #include<iostream>
using namespace std;
//Friend Function //Friend Classes
class Employee {
int empID;
friend class HR;
};
//Without friend private member of class is not accesible
//employee members Only accesible through object
// acceser(setter and getter) functions are expensive functions
//Alt... |
bf07ef15d01f195d8b17d62cbb79775c71bb9694 | 4c8a242384db3b29588cd646c0f7a3b5774a7e56 | MAAV-Software/embedded | /side_projects/old_ekf/KalmanFunctions.cpp | C++ | cpp | 7,610 | no_license | /*
* KalmanFunctions.cpp
*
* Created on: Jul 2, 2015
* Author: clark
*/
#include "kalman/KalmanFunctions.hpp"
#include <cassert>
#include <cstring>
using namespace std;
// TODO: optimize the calls to sin/cos
void systemDeltaState(const arm_matrix_instance_f32* currState,
const arm_matrix_instance_... |
7ea94a4204d7d29e2c34e0ea8206fc202122fab7 | 657ec31331fe9145b79e79fe00a81d7ed0fa332b | yu3044/sdk | /runtime/vm/compiler/stub_code_compiler_ia32.cc | C++ | cc | 97,444 | permissive | // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "vm/globals.h"
// For `AllocateObjectInstr::WillAllocateNewOrRemembered`
#include "vm/compile... |
28bce380d6674de52bd55a44ed709c7ae698d6b9 | 6cad2fa64bec6cca21848496863a6ac52a42a97c | DiligentGraphics/DiligentCore | /Tests/DiligentCoreAPITest/src/SamplerTest.cpp | C++ | cpp | 21,103 | permissive | /*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* 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.... |
085a55006be102dd55e29af83346bd0f39104966 | 0b0f8cb2311f9c4b274eeb2e797e2acb656d53f4 | SpectreSpect/PathTracing_V2 | /PathTracing_V2/ShaderResourceView.cpp | C++ | cpp | 3,027 | no_license | #include "ShaderResourceView.h"
ShaderResourceView::ShaderResourceView(ID3D11Resource* pResource, DXGI_FORMAT Format, D3D11_SRV_DIMENSION ViewDimension, UINT MostDetailedMip, UINT MipLevels)
{
LoadData(pResource, Format, ViewDimension, MostDetailedMip, MipLevels);
}
ShaderResourceView::ShaderResourceView(const wchar... |
3f62e9d9ee2bafc5f2529fd87c10ad9d28cb4efe | c36169a2701dd9c4a8bb3d971fefcb4bc2c681e7 | heowoohyuk/OOP | /Week10/car.cpp | C++ | cpp | 519 | no_license | #include "car.h"
car::car(){
this->car_name=nullptr;
}
car::car(int a, int b){
this->wheel_number=a;
this->max_speed=b;
}
car::car(int a, int b, char* c){
this->wheel_number= a;
this->max_speed=b;
this->car_name=c;
}
car::car(int a, int b, char* c, bool d){
this->wheel_number=a;
this->max_speed=b;
this->ca... |
af11f7e67f0e9c396ff1964a166712fbd74c7e8c | d7b2426af8d0b68441e249408282376cc21b4706 | Asoke26/Database_Implementation | /QueryOptimizer.cc | C++ | cc | 16,414 | no_license | #include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <bits/stdc++.h>
#include "Schema.h"
#include "Comparison.h"
#include "QueryOptimizer.h"
using namespace std;
//int SIZE{};
QueryOptimizer::QueryOptimizer(Catalog& _catalog) : catalog(&_catalog) {
}
QueryOptimi... |
c677dabc42150ea8e135cb6a7a40c385d37a98d8 | 789a97660995289d4c1a4a7406571b428a3ded69 | Valkyrie-MT/NETMF4.3_Community | /DeviceCode/pal/tinycrt/tinycrt.cpp | C++ | cpp | 12,713 | no_license | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
/////////////////////////////////////////////////////////... |
d88af088ba37044cb6cf3fb70e8ffa35ce654229 | 484ce353fe9d40a997bc91d773e93305daa77dbf | TheDeadFish/win32-helper | /src/openfile.cc | C++ | cc | 3,685 | no_license | #include <stdshit.h>
#include "../bin/win32hlp.h"
xarray<cch*> __stdcall dynOpenFileDlg_unpack(
WCHAR* path, size_t nFileOffset)
{
SCOPE_EXIT(free(path));
xarray<cch*> lst = {};
if(!nFileOffset) return lst;
WCHAR* name = path+nFileOffset;
if(name[-1] != '\0') name[-1] = 0;
ei(name[-2] == '\\') name[-2] = 0;
... |
4a8bdb2212e4d4a9fbe946259b499912d1b6ddf3 | 8aa4811beed937c338e2b049b96b36a0b438f943 | rnascunha/xerock | /src/libs/my_async/include/my_async/websocket/impl/session_static_callback_impl.hpp | C++ | hpp | 3,575 | permissive | #ifndef WEBSOCKET_SESSION_STATIC_CALLBACK_ASYNC_IMPL_HPP__
#define WEBSOCKET_SESSION_STATIC_CALLBACK_ASYNC_IMPL_HPP__
#include "../session_static_callback.hpp"
namespace My_Async{
namespace Websocket{
template<bool UseSSL,
typename InContainer,
typename OutContainer,
std::size_t ReadBufferSize>
typename Sessio... |
e7574ee37c4eb093ed678a8bb32fd975e4b872c6 | b4ec5abff19533e2591c83b47be1aeaae515ac36 | ferdonline/nrn | /src/nrnpython/nrnpy_hoc.cpp | C++ | cpp | 78,343 | permissive | #include <nrnpython.h>
#include <structmember.h>
#include <InterViews/resource.h>
#include <nrnoc2iv.h>
#include <ocjump.h>
#include "ivocvect.h"
#include "oclist.h"
#include "nrniv_mf.h"
#include "nrnpy_utils.h"
#include <vector>
#if defined(__MINGW32__) && NRNPYTHON_DYNAMICLOAD > 0
// want to end up with a string li... |
2b4ba4dca8eba12d550a7cf75cc06bf483d04468 | 792fcb534148d87945d967b8f70589b2e1def636 | annp1987/envoy | /source/common/buffer/buffer_impl.cc | C++ | cc | 8,452 | permissive | #include "common/buffer/buffer_impl.h"
#include <cstdint>
#include <string>
#include "common/api/os_sys_calls_impl.h"
#include "common/common/assert.h"
#include "common/common/stack_array.h"
#include "event2/buffer.h"
namespace Envoy {
namespace Buffer {
// RawSlice is the same structure as evbuffer_iovec. This wa... |
439a33952a2534189bbd72c26302aa5afbbadb0b | ed3767d93ca10040c2c012cf1eabce8e1a12d377 | idfortytwo/numerical_methods | /lab7/lab7_sor.cpp | C++ | cpp | 2,373 | no_license | #include <iostream>
#include <old2/vector_old.h>
#include <old2/matrix_old.h>
#include <fstream>
using namespace std;
#define NMAX 30
#define TOLF 1e-8
#define TOLX 1e-8
template <int N>
void LDU_decomposition(const Matrix<N, N> &A, Matrix<N, N> &L, Matrix<N, N> &D, Matrix<N, N> &U) {
L = {{0}};
D = {{0}};
... |
8d92917666edb841cb35c87308059ca6ea16144d | d44beb99633bf71bce5a34daace1c36d30e56fb7 | mYoda/CustomBrs | /src/base/files/file_proxy_unittest.cc | C++ | cc | 11,261 | 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 "base/files/file_proxy.h"
#include <map>
#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file.h"
#include "base/files/s... |
765022e6147a4e5417b4ff41c9ba4988b52cf789 | 8dfecaa45ab4a4af53f18a46daf341fcb960cc04 | ygybjc/CloverBootloader | /rEFIt_UEFI/Platform/KERNEL_AND_KEXT_PATCHES.cpp | C++ | cpp | 2,099 | permissive | /*
* KERNEL_AND_KEXT_PATCHES.cpp
*
* Created on: 4 Feb 2021
* Author: jief
*/
#include "KERNEL_AND_KEXT_PATCHES.h"
#include "MacOsVersion.h"
bool KEXT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
{
BOOLEAN ret = FALSE;
if (MatchBuild.isEmpty() || Build.isEmpty()) {
return TRUE; //unde... |
fde8cc3744f83dbb6d049106982bcee660f7eb2c | a2a3d021576fa3b7d0bc6f424285c9909aa2e376 | twensman566/Solitaire2.0 | /solDriver.cpp | C++ | cpp | 21,182 | no_license | /**
solDriver.cpp
Purpose: Simulate games of Solitaire, determine if a game was won, and give a rate of wins/games
@author tetrominoes
@version 1.0 Feb. 2019
*/
#include <iostream>
#include <vector>
#include "deck.h"
#include "foundationPile.h"
#include "tableau.h"
#include "card.h"
#include "pile.h"
#i... |
88e33943aea32c127aa07dc41e80ad21f33edf9f | 6501321c802cbb7f87ad49eff996bc0ce6e1ec39 | carlosmouracorreia/CompilersProject | /targets/postfix_stack.cpp | C++ | cpp | 816 | no_license | #include <string>
#include "ast/all.h"
#include "targets/postfix_stack.h"
void pwn::postfix_stack::do_sequence_node(cdk::sequence_node * const node, int lvl) {
for (size_t i = 0; i < node->size(); i++) {
node->node(i)->accept(this, lvl);
}
}
void pwn::postfix_stack::do_defunc_node(pwn::defunc_node * const no... |
7a57796b8c7933d96be9aa0c512808739fbd0514 | 715681cba0b10b4549f54a3c8432ae778dc52dda | yasminalvx/Uri-cplusplus | /1184.cpp | C++ | cpp | 717 | no_license | //Yasmin Alves
//03.07.2020
#include <iostream>
#include <iomanip>
using namespace std;
float soma ( float M[12][12]);
int main() {
char T;
float temp, M[12][12];
cin >> T;
for (int i = 0; i < 12; i ++) {
for (int j = 0; j < 12; j++) {
cin >> temp;
M[i][j] = temp... |
6e064b41fbf5894c80d29630e556ce164e261914 | 00d83ea6204101c4d576e9ee81012eb75759ef0c | pwnall/usaco | /milk.cc | C++ | cc | 1,042 | no_license | /*
PROG: milk
LANG: C++11
*/
#include <algorithm>
#include <fstream>
#include <vector>
struct farmer {
int price;
int quantity;
farmer(int price, int quantity) {
this->price = price;
this->quantity = quantity;
}
bool operator <(const farmer& other) const {
if (price != other.price)
retur... |
816c9a3ffbb978772fdb0760a26d4e0d2001d8d3 | 3b0d86862a9e5fa280e86f0af04a19d7640a15fe | Sahilbatra1211/c- | /c++/C-Free/Temp/basic_largestno.cpp | C++ | cpp | 305 | no_license | //largest no from given 5 no.
#include<iostream.h>
#include<conio.h>
int main()
{
int i=0,a,b,c,d,e;
cout<<"enter 5 no's";
cin>>a>>b>>c>>d>>e;
if(a>i)
{
i=a;
}
if(b>i)
{
i=b;
}
if(c>i)
{
i=c;
}
if(d>i)
{
i=d;
}
if(e>i)
{
i=e;
}
cout<<"max no"<<i;
} |
9b4798acda69aefa61be475d68b770245a5c0ecf | db33e05dd3486e3c78249ff97b0fe53f70261291 | binhphuoi2812/Demo | /FlappyPlaneGame/FlappyPlane/Engine/Math/Math.cpp | C++ | cpp | 996 | no_license | #include "Math.h"
#include <math.h>
namespace Math
{
double ConvertToRadians(double degrees)
{
return (degrees * PI) / 180;
}
double ConvertToDegrees(double radians)
{
return (radians * 180) / PI;
}
Vector3 RotatePoint(Vector3 point, Vector3 pivot, float rot)
{
double radRot = ConvertToRadians(rot);
... |
a8386e727519ac91aa4f3db420b40eb3014db16e | 87e10c11f8db97cbed8fd83a3b7d38228fe8ddcb | shining-yang/OpenGL-tutorial_v0014_21 | /tutorial17_rotations/tutorial17.cpp | C++ | cpp | 11,876 | no_license | // Include standard headers
#include <stdio.h>
#include <stdlib.h>
#include <vector>
// Include GLEW
#include <GL/glew.h>
// Include GLFW
#include <glfw3.h>
GLFWwindow* window;
// Include GLM
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion... |
7d866ea0ed78418e26b016ff9bf5351afddb80ba | 0e07bfb0c7b7b022c98f835f49ca946b2cd50360 | rishabhgarg25699/Competitive-Programming | /Sorting Algos/quickSort.cpp | C++ | cpp | 967 | no_license | #include <iostream>
using namespace std;
int partitionIndex(int *a,int low,int high)
{
int pivot=a[high]/*element jisse humko correct position par le jana hai*/;
int i=low-1;
for(int j=low;j<high;j++)
{
if(a[j]<pivot)
{
i++;
swap(a[i],a[j]);
}
}
sw... |
7bc70a5a83f7937295240f4ad42d1d47eb57bc0c | 1fae1e65b2039262c4ce6e36318a8aa427fca6f5 | abhi-jha/testing-in-cpp | /unittest-cpp/main.cpp | C++ | cpp | 738 | no_license | #include <iostream>
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "WordsTree.h"
#include "Engine.h"
TEST_CASE("This is a test name"){
}
TEST_CASE(){
}
TEST_CASE("This is the first test case"){
}
TEST_CASE("Called with empty digit list --> return no results"){
WordsTree emptytree;
Engine t9engi... |
d56fef00f529b6148e6e22fe94a17698a09bf6ec | 6428c4f2155b65d13b20f06b8fb2e24873b0d6df | batherit/BatheritEngine | /Code/PrevTestLab_Win32/PrevTestLab_Win32/CGameWorld.cpp | C++ | cpp | 1,493 | no_license | #include "CGameWorld.h"
#include "CGameObject.h"
CGameWorld::CGameWorld(int cx, int cy) :
client_width_(cx),
client_height_(cy),
pick_point_(CVector2D(ClientWidth() / 2.0f, ClientHeight() / 2.0f))
{
}
CGameWorld::~CGameWorld()
{
}
void CGameWorld::Update(float tick) {
for (unsigned int a = 0; a< agents_.size();... |
129adfc5869845650994ed4a192eb19d35058c90 | 88885f2280da5f60bf261617f612263b9500ab62 | zhangzheng1205/TestInCS2 | /MFCApplication1/MFCApplication1View.cpp | C++ | cpp | 3,245 | no_license | // 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
// (“Fluent UI”)。该示例仅供参考,
// 用以补充《Microsoft 基础类参考》和
// MFC C++ 库软件随附的相关电子文档。
// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
// https://go.microsoft.com/fwlink/?LinkId=238214.
//
// 版权所有(C) Microsoft Corporation
// 保留所有权利。
// MFCApplication1V... |
7a23513599c567f5c621c73aec537674380c9010 | abbc929dccf224b36d07e9a2b8c79911a0999d4f | minhphqhn/minhphqhn | /on tap b3.cpp | C++ | cpp | 365 | no_license | #include <stdio.h>
int main(){
int n;
printf("Nhap so n=\n");
scanf("%d",&n);
if(n<=0){
printf("Khong tim thay\n");
}else if(n<3){
printf("So thu %d = %d\n",n,1);
}else if(n<4){
printf("So thu %d = %d\n",n,2);
}else{
int x1=1,x2=1,x3=2;
for(int i=4;i<=n;++i){
x1=x2;
x2=x3;
x3=x1+x2;
}
prin... |
59cd8f84fc45c33fcdf9acc35d0dafdb2eced1e6 | 6ea38796c39a1f845f1f85b5e3c3859363a6563a | pauldreik/fuzzcppcheck | /corpus/taken_from_cppcheck_tests/stolen_11971.cpp | C++ | cpp | 220 | no_license | using S = union s;
using PS = S *;
using T = union t { int a; float b ; };
using TP = T *;
using U = union { int a; float b; };
using V = U *;
using W = union { int a; float b; } *;
S s;
PS ps;
T t;
TP tp;
U u;
V v;
W w; |
c937e00b7aa95ff52479a048134875926195c143 | 43c15944415482bf3736139b2fd45ec3fc459be0 | SirKoto/AMM_Project | /AMM_Project/src/IModel.cpp | C++ | cpp | 6,788 | no_license | #include "IModel.h"
#include <map>
#include <iostream>
#include <smmintrin.h>
IModel::IModel(const Model& model) :
mBaseModel(model),
mNumLocations(static_cast<uint32_t>(model.getLocations().size())),
mNumTypes(static_cast<uint32_t>(model.getCenterTypes().size())),
mNumCities(static_cast<uint32_t>(model.g... |
bae94c6aa9c74e68101b9588593de62715db51f3 | eaea0044d7ce1e19eac81479842b62856c3cabb0 | malaifa/source | /src/protocols/cryst/spacegroup.cc | C++ | cc | 35,310 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
1a7f078fbfafd033e56a67ff329a60c7a38ad89d | eac5820624b26cfe0dc8d8d4ec0c5d7cf15aa585 | zslwyuan/LLVM-9-for-Light-HLS | /LLVM_src/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.fail.cpp | C++ | cpp | 787 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
c84a6dd4ab578ef794c94c86bc5decd3b8b5f2d3 | 4b8801a640f7035181aaa1427923f6ebcc1a8e5a | ECSE437-Fall2019/OpenOffice | /main/xmloff/source/forms/layerexport.hxx | C++ | hxx | 13,168 | 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... |
68b4f63c23125af400bbd7d9784114871b55720a | 745dc0e1ee67f33c670d77a6deab2789b8e31345 | pspinals/AliPhysics | /PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskNewJetSubstructure.cxx | C++ | cxx | 35,239 | permissive | //
// Few substructure observables to try with the new PbPb data
//
//
//
#include "AliAODMCHeader.h"
#include "AliAnalysisManager.h"
#include "AliEmcalJet.h"
#include "AliEmcalParticle.h"
#include "AliEmcalPythiaInfo.h"
#include "AliGenPythiaEventHeader.h"
#include "AliJetContainer.h"
#include "AliLog.h"
#include "Ali... |
a924025b3531c9bc7bab829082a92cf7715ef9c0 | 502534b4d807aa0140e9b585a0de910acfa6f4d5 | komrad36/CUDAK2NN | /main.cpp | C++ | cpp | 5,138 | permissive | /*******************************************************************
* main.cpp
* CUDAK2NN
*
* Author: Kareem Omar
* kareem.omar@uah.edu
* https://github.com/komrad36
*
* Last updated Oct 12, 2016
*******************************************************************/
//
// Fastest GPU implementation of a b... |
1121b164f083ea872e77b7e85b420215b079126c | 1c5becb47f55f2a40b7ccf88391185743d73b8fc | hiroin/webserv | /webserv/googletest/ft_split_use_find_first_of_test.cpp | C++ | cpp | 651 | no_license | #include <gtest/gtest.h>
#include "../ft.hpp"
// googletestのインストール手順
// https://rinatz.github.io/cpp-book/test-how-to-gtest/
// g++ -std=c++11 ../HTTPMessageParser.cpp HTTPMessageParser_test.cpp -o test -L/usr/local/lib -pthread -lgtest -lgtest_main
TEST(ft, ft_split_use_find_first_of)
{
std::vector<std::string> re... |
64c70e832be2758123c110188f4b14e579b837f2 | a8b2dd72feffbafbea647744963f3902e45c8254 | vaishnavi2699/CPP-Logical-programs | /notescount.cpp | C++ | cpp | 840 | no_license | // Write a Cpp program to count total number of notes in given amount.//10,20,50,100.
#include<iostream>
using namespace std;
int main()
{
int amt,a,b,c,d,total;
cout<<"enter number to print number of notes";
cin>>amt;
if(amt%10==0)
{
if(amt>=100)
{
a=amt/100;
amt=amt-(a*1... |
f1c34cc5c115a027adb86eb9e513af1149222e3a | 95ddffd03ab83ab4489cefb1e14331612ab617dd | abhishekg785/LogDevice | /logdevice/replication_checker/ReplicationCheckerSettings.cpp | C++ | cpp | 6,216 | permissive | /**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/replication_checker/ReplicationCheckerSettings.h"
#include <boost/... |
7a5ae8dfccc03afb5367b43813a22a014c16d49f | bea495a2b48bc415f186bcaa6d5fef4cfc009387 | Gaztin/witcherMod | /modDll/SPTLib/Windows/DetoursUtils.cpp | C++ | cpp | 2,768 | permissive | #include <assert.h>
#include "../sptlib-stdafx.hpp"
#include "../sptlib.hpp"
#include "DetoursUtils.hpp"
#include "../../mingw.mutex.h"
namespace DetoursUtils
{
using namespace std;
static map<void*, void*> tramp_to_original;
static mutex tramp_to_original_mutex;
void AttachDetours(const wstring& moduleName, si... |
21149f7d5c8349b983dcb3910de2b01e4c73a85c | f15972632c9e736a5559682afda586a0e0eb1341 | r-barnes/alignment_boilerplate | /unittests/test_simple_sw.cpp | C++ | cpp | 918 | permissive | #include <albp/doctest.hpp>
#include <albp/doctest_vectors.hpp>
#include <albp/simple_sw.hpp>
using namespace albp;
TEST_CASE("Matrix Init"){
Matrix2D<int> mat = {
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12}
};
CHECK(mat.width == 4);
CHECK(mat.height == 3);
CHECK(mat(0,0) == 1);
CHECK... |
130eb368c0e9e50a02b30c13ce8f8f1a6830f3f3 | 939a43575fa77e33d9358bbce6b864716857e151 | mfbjaved/AirplaneSimulator | /main.cpp | C++ | cpp | 1,799 | no_license | // Author: Sean Davis
#include <iostream>
#include <fstream>
#include <iomanip>
#include "passenger.h"
#include "flight.h"
#include "flights.h"
#include "utilities.h"
using namespace std;
enum {DONE, ADD_PASSENGER, REMOVE_PASSENGER, ADD_FLIGHT, REMOVE_FLIGHT, FND_P};
const int MAX_CHOICE = FND_P;
int getChoice()
... |
337ef216f06c30ccbbf63854bc20dd5b06e8263a | cbe1ce8954ffcd1cbfb74756933ab95cddaf1b4a | zH4x/SoT-SDK-2.2.0.1 | /SDK/BP_FishingFish_Pondie_05_Colour_03_Bronze_functions.cpp | C++ | cpp | 1,005 | no_license | // Name: SoT, Version: 2.2.0b
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//-----------------------------------------------------... |
b68e5f27dfae84cf45b7b9fb7050b0eb84ff5e48 | d873d0722d754f90b23d5aab2d5d638d7e75adc9 | laura-ft/emscripten-fastcomp | /lib/Target/JSBackend/NaCl/ExpandI64.cpp | C++ | cpp | 47,893 | permissive | //===- ExpandI64.cpp - Expand i64 and wider integer types -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------------... |
b52c175571bb5b263a17cbedb90c8dac47df8e8a | b40ccedb1b8b4ea5bf80914988edab59e201fa64 | fbradasc/OpenVSP | /src/gui_and_draw/STEPStructureOptionsScreen.cpp | C++ | cpp | 5,418 | permissive | //
// This file is released under the terms of the NASA Open Source Agreement (NOSA)
// version 1.3 as detailed in the LICENSE file which accompanies this software.
//
// STEPStructureOptionsScreen.cpp: implementation of the STEPOptionsScreen class.
//
//////////////////////////////////////////////////////////////////... |
4d9e16e4ad9458c6d70d071dc15200398de09158 | 992cb803481fbf765a5ff426bf1f38279f081adc | defland/bnncore | /src/qt/intro.cpp | C++ | cpp | 9,675 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2018 The Bluenode Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "intro.h"
#in... |
889402bc6f40ac3e02b84b92df1d321bc29812ed | 8b9ef33b6527d8f98f7c1c92ed5ff86f70a3ea56 | chenyu1927/hello-world | /Allocator/StackAlloc.cpp | C++ | cpp | 1,710 | no_license | #include <memory>
#include <iostream>
using namespace std;
template <typename T>
struct StackNode
{
T __data;
StackNode* __prev;
};
template <typename T, typename Alloc = std::allocator<T> >
class StackAlloc
{
public:
typedef StackNode<T> Node;
typedef typename Alloc::template rebind<Node>::other Allocator; //FIX... |
d288dacaccb1bb6677e71c9994b7dc773a4f6c40 | c8663f72ad682ce21c4339d09971a8869eed829b | metux/chromium-suckless | /dbus/message.cc | C++ | cc | 30,722 | 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 "dbus/message.h"
#include <string>
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#i... |
1614f5ced6351101ece2db091e7fbf70c53f4458 | db236d1020a43c9d6421ee2708fa1daa46adcffa | jtlap/nt2 | /modules/core/statistics/unit/scalar/normrnd.cpp | C++ | cpp | 2,770 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
baf28925a99264bf12353d77eb340ed5e0c77a90 | 7ce92f58f66ab10534690b6d422f8a509b2f215e | KeeganRen/superfun-face-times | /GaussianPyramid.cpp | C++ | cpp | 3,036 | no_license | /* This code is from Ce Liu's Optical Flow code: http://people.csail.mit.edu/celiu/OpticalFlow/ */
#include "GaussianPyramid.h"
#include "math.h"
GaussianPyramid::GaussianPyramid(void)
{
ImPyramid=NULL;
}
GaussianPyramid::~GaussianPyramid(void)
{
if(ImPyramid!=NULL)
delete []ImPyramid;
}
//---------------------... |
d928807e222aeea125c885068d8798e76da922a0 | 572c6919e1caec7046cfed577a0431b8ecef262f | nikhilgautam21/Data-Structures-Algorithms | /Sorting Algorithms/Selection-sort.cpp | C++ | cpp | 850 | no_license | /*
Selection Sort
Time Complexity:
Worst: O(n*n);
Sorting InPlace: Yes
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;
#define fo(i,n) for(int i=0;i<n;i++)
#define ll long long
#define pb push_back
#define PI 3.1415926535897932384626
void swap(int *x, int *y... |
38ea2c47d3e8903f701901b481a3e5ac2d1a95e9 | 1e0423199a7da7d8fadb32a48f6b291d0caf85fa | googlecreativelab/giantemoji | /gmojiAndroid/src/ofApp.cpp | C++ | cpp | 12,772 | permissive | // Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... |
7e88ebf839bddeb77a96871fe3457c4bd340e4cb | 84be2041abc9882be28d2a1b0279b6184431d53a | dromanov/daScript | /src/simulate/simulate_fusion_tableindex.cpp | C++ | cpp | 2,844 | permissive | #include "daScript/misc/platform.h"
#ifdef _MSC_VER
#pragma warning(disable:4505)
#endif
#include "daScript/simulate/runtime_table_nodes.h"
#include "daScript/simulate/simulate_fusion.h"
#include "daScript/simulate/sim_policy.h"
#include "daScript/ast/ast_typedecl.h"
#include "daScript/simulate/simulate_visit_op.h"
... |
8c935d4f8d05e1101164476109b6c8b46a727f2b | 0b7f486d0f66596ca672714047ff6b0c52a4299d | fzg/ppd-paris-descartes | /src/misc/Randomizer.cpp | C++ | cpp | 259 | no_license | #include "Randomizer.hpp"
Randomizer::Randomizer() {
}
Randomizer::~Randomizer() {
}
int Randomizer::Random(int a, int b) {
std::random_device rd_;
std::mt19937 gen_(rd_());
std::uniform_int_distribution<> dis(a, b);
return dis(gen_);
}
|
b7029b543b77c37c474723c56d447c28a288ec56 | 697017c07465ea224860d543bcea3326ee52a734 | ChukCharles/Coursera | /3. Red/week2/3.RouteManager/RouteManager.cpp | C++ | cpp | 1,482 | no_license | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <set>
using namespace std;
class RouteManager {
public:
void AddRoute(int start, int finish) {
reachable_lists_[start].insert(finish);
reachable_lists_[finish].insert(start);
}
int FindN... |
518c3f7fcf4dfde63c7a9d1c023061ce34ec9350 | 8f1c9e363e71ffc7c2b50bd551e1f775e325de69 | magnese/miscellaneous | /mpi_workshop/stridesend.cpp | C++ | cpp | 1,800 | no_license | /*
* Let processor 0 have an array x of length 10P, where P is the number of
* processors. Elements 0 , P , 2P , . . . , 9P should go to processor zero,
* 1 , P + 1 , 2P + 1 , . . . to processor 1, et cetera. Code this as a sequence of
* send/recv calls, using a vector datatype for the send, and a contiguous buffer... |
00a1f254956b9f2d7aecabb480a70ca74503e584 | c29b472cce10c682a7a1f11e94b73c907423a7a8 | Menooker/dgl | /src/runtime/cuda/cuda_device_api.cc | C++ | cc | 7,231 | permissive | /*!
* Copyright (c) 2017 by Contributors
* \file cuda_device_api.cc
* \brief GPU specific API
*/
#include <dgl/runtime/device_api.h>
#include <dmlc/thread_local.h>
#include <dgl/runtime/registry.h>
#include <cuda_runtime.h>
#include "cuda_common.h"
namespace dgl {
namespace runtime {
class CUDADeviceAPI final :... |
7f380d9c35cc7430828e02edb0a8f2b4615b435e | daf6b34c399a9a928181128e4040626e76421fa4 | Surabhi0910/Hacktoberfest2020 | /C++/Tasks/pair_sum_in_array.cpp | C++ | cpp | 634 | no_license | #include <iostream>
using namespace std;
//You have been given an integer array/list(ARR) and a number X.
//Find and return the total number of pairs in the array/list which sum to X.
int pairSum(int *input, int size, int x){
//Write your code here
}
//all changes to be made in the above function only... |
c02933b7b1c50f0d3cfae0b38ca13a3e9e3c244a | bb9c58e0fa92f1c7b4b6f05d49c68a47ec14d02e | WuyangPeng/Engine | /TheLastOverlord/Code/BackgroundClient/BackgroundClientMiddleLayer/Audio/AudioManager.cpp | C++ | cpp | 838 | permissive | /// Copyright (c) 2010-2022
/// Threading Core Render Engine
///
/// 作者:彭武阳,彭晔恩,彭晔泽
/// 联系作者:94458936@qq.com
///
/// 标准:std:c++20
/// 最后的霸王版本:0.8.0.12 (2022/07/22 23:10)
#include "BackgroundClient/BackgroundClientMiddleLayer/BackgroundClientMiddleLayerExport.h"
#include "AudioManager.h"
#include "BackgroundClient/Bac... |
a71fc6ded63cdca50d69ed4ffcba90183fdf8833 | 6d5c5461a9053f411decd73564142f20f05c855c | Djiffit/Algoritmit-Ongelmanratkaisussa | /003-Tilavuus/main.cpp | C++ | cpp | 226 | no_license | #include <iostream>
#include <cmath>
using namespace std;
int main() {
cin.sync_with_stdio(false);
double radius;
cin >> radius;
double volume = (pow(radius, 3) * 4 * M_PI) / 3;
printf("%.6lf", volume);
} |
35f6b3536a750cdd73b5092254beda9058abe027 | 5b53a0bc021f8ce10f1f54a9e0d71d06bcfa4869 | BerZerKku/AVR_PIg | /src/protocols/standart/protocolPcS.cpp | C++ | cpp | 1,233 | no_license | /*
* protocolBspS.cpp
*
* Created on: 15.07.2013
* Author: Shcheblykin
*/
#include "protocolPcS.h"
clProtocolPcS::clProtocolPcS(uint8_t *buf, uint8_t size, stGBparam *sParam) :
clProtocolS(buf, size, sParam) {
}
bool clProtocolPcS::getData() {
bool stat = false;
eGB_COM com = (eGB_COM) buf[2];
if (c... |
7e74fd167972c1f6c8e3f9c71460b26f194d9a8b | d384f3f75641217a9be29daee06e3d70f6e7b8bd | vyesubabu/metview | /odb_api_bundle-0.17.6-Source/odb_api/src/odb_api/SQLCallbackOutput.cc | C++ | cc | 4,435 | permissive | /*
* (C) Copyright 1996-2012 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an... |
ec0ba40e968f577958f37ccf980b66f843154ebb | 1cecb4f191faf27d08026738ac22c896cb495177 | Geloi/xskit | /core/src/stream.cpp | C++ | cpp | 1,676 | permissive | /*
* Copyright (C) 2015 Focalcrest, 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 agree... |
17bce682852ca5cb3db00ce90348de4ec095371c | 923b89419eb65199a2d6dc1ae6987c77d75e65d1 | Yaboi-Gengarboi/cs201 | /labs/Lab7/intio.cpp | C++ | cpp | 1,380 | no_license | // intio.cpp
// Chris Hartman
// 14 Sep 2018
// based on original by
// Glenn G. Chappell
// 1 Feb 2018
//
// For CS 201 Fall 2018
// Source for Integer I/O Package
#include "intio.hpp" // Header for this package
#include <iostream>
using std::cout;
using std::cin;
#include <string>
using std::string;
using std::getl... |
00d167d00bcda6c454bfa55e1caa7856e65e8c27 | 40b802b518c7bd1dd6e37f06b0477c73c8924408 | syedaunn/proteus | /codegen/expressions/expressions-dot-evaluator.hpp | C++ | hpp | 3,562 | permissive | /*
RAW -- High-performance querying over raw, never-seen-before data.
Copyright (c) 2014
Data Intensive Applications and Systems Labaratory (DIAS)
École Polytechnique Fédérale de Lausanne
All Rights Reserved.
Permission to use, copy, modify and distribute this software and
its documentation is... |
ace754900c455a66004387a16cd2b56c3597f9a5 | bb76baeddecc7bec3184cc5be658a01d1cceafe7 | chromium/chromium | /chrome/browser/extensions/background_app_browsertest.cc | C++ | cc | 2,526 | permissive | // Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <utility>
#include "base/containers/contains.h"
#include "base/gtest_prod_util.h"
#include "chrome/browser/background/background_mode_manager.h"
#include "chrome/brow... |
ae5b2879878838a59957db33820dfe62d3f0f1fe | 83a370cb4668797f02c7147bef733f8748b744bd | Muzer/colpeachstein3d | /main.cpp | C++ | cpp | 846 | no_license | #include "sdl_renderer.h"
#include "sdl_input.h"
#include "map_data.h"
#include "map_renderer.h"
#include <thread>
int main()
{
colpeachstein3d::sdl_renderer foo;
colpeachstein3d::sdl_input inp;
map::map m1;
m1.cells.push_back({});
m1.location.insert({{0,0}, 0});
m1.location.insert({{1,0}, 0});
m1.loc... |
e47553ba18857c4db90206219372074de2058bc3 | 6947ff7809dba97c3b72474116bb20501a2ce2be | novaquark/aws-sdk-cpp | /aws-cpp-sdk-codedeploy/source/model/S3Location.cpp | C++ | cpp | 2,621 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
5be0d452e9b2014ce0a180c0bb8c38581df576c9 | 3bc2f425a36ec94f7cb43d272c1b1a5ebcd0edba | Wilsanity/StealthGame | /StealthGame_ProjectBase_4.25/StealthGame/Plugins/BlackHole/Intermediate/Build/Win64/UE4Editor/Inc/BlackHole/BlackHole.init.gen.cpp | C++ | cpp | 1,067 | no_license | // Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
657c41984513ff015a46a398595be64c0c7793db | c95cd6d7d8dbcbaf0c4f1a5968005c285a0854c3 | morymobile/leetcode | /3Sums/basic.cpp | C++ | cpp | 2,746 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
/* drafts
2, 3, 4, 5, 1
2, 3, 4, 5, 6
2, 5, 0, 7, 6, 4
7, 3, 8, 6, 2, 4
3, 7,
2 7
*/
int partition(vector<int> &num, int i, int j) {
if (i >= j)
return -1;
const ... |
f6b29bd76fff4e000e98cce4b51f43ce84d1528f | 7990e5c8080c5c458caaf781ce3f58bad429dbe7 | svdecomposer/mne-cpp | /applications/mne_scan/plugins/rtcmne/FormFiles/rtcmnesetupwidget.cpp | C++ | cpp | 7,609 | permissive | //=============================================================================================================
/**
* @file rtcmnesetupwidget.cpp
* @author Lorenz Esch <lesch@mgh.harvard.edu>;
* Christoph Dinh <chdinh@nmr.mgh.harvard.edu>
* @since 0.1.0
* @date February, 2013
*
* @section ... |
c3cb47a4861274c004ab4661e0f2ed08df340b65 | e0ccd43675197ecefcf80c38b782a94929a52694 | alexandraback/datacollection | /solutions_2749486_0/C++/sadiaatique/0.cpp | C++ | cpp | 1,383 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
string st;
int main()
{
freopen("00.in","r",stdin);
freopen("0.out","w",stdout);
int a,b,c,d,e,x,y,z,i,t,n,m;
cin>... |
bf2482e98f3384b4628a0c11c7de5a3502cc2dea | f11465b4e12b863a355416cccc29b584fbea31f1 | shivral/cf | /0900/00/903b.cpp | C++ | cpp | 741 | permissive | #include <iostream>
#include <string>
#include <vector>
void answer(const std::vector<std::string>& v)
{
std::cout << v.size() << '\n';
for (const std::string x : v)
std::cout << x << '\n';
}
void solve(unsigned h1, unsigned a1, unsigned c1, unsigned h2, unsigned a2)
{
std::vector<std::string> a;... |
e3dc9756269b9c0002a9ad4aeecf607222e1912f | 1d1d9472c40aade92c02c8f025c072722593a332 | Hanchaos/business | /src/package/workflow/module/module_picture_waiting.cpp | C++ | cpp | 6,655 | no_license | #include "workflow/module/module_picture_waiting.h"
#include "log/log_module.h"
#include "conf/conf_manager.h"
#include "com_xservice.h"
#include "XBusinessHandler.h"
using namespace XService;
PictureWaitModule::PictureWaitModule() {
module_name_ = "PictureWaitingModule";
module_type_ = kPicWait;
}
PictureWaitMod... |
f07bb5504d5605a4fad5d69172b64d9178063d7d | d388aeae9d4cb127808a30f583d41e222813159a | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/AuthenticationRule/UNIX_AuthenticationRule_LINUX.hxx | C++ | hxx | 1,821 | 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... |
5aae01b5abb6f19511952a4f9d2f812df2d86f92 | 845dad723b51db910526f0e66003aa38666bb0b1 | hasnum-stack/terminal | /src/cascadia/TerminalCore/Terminal.cpp | C++ | cpp | 20,623 | permissive | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "Terminal.hpp"
#include "../../terminal/parser/OutputStateMachineEngine.hpp"
#include "TerminalDispatch.hpp"
#include "../../inc/unicode.hpp"
#include "../../inc/DefaultSettings.h"
#include "../../inc/argb.h"
... |
bd5d9ef2e468a1566c37185c67d4cd67f54b716a | 48c3114ce71915901e95531b05068a3dbaa85cff | gotanod/thinmatrix-gl-tutorials | /src/entity.cpp | C++ | cpp | 621 | no_license |
#include "entity.hpp"
#include "textured_model.hpp"
namespace jac {
void entity::increase_position(float dx, float dy, float dz)
{
position += glm::vec3(dx, dy, dz);
}
void entity::increase_rotation(float dx, float dy, float dz)
{
rot_x += dx;
rot_y += dy;
rot_z += dz;
}
float entity::get_texture_x... |
413fbdf000e7c2fccbbef6e1feee89bfb097ea23 | 5c35069e1351e78fbd95d4db8f2f9b45ea5a9e62 | Anikcsejnu/Codebox | /C++/codejam/ngpc/sam.cpp | C++ | cpp | 572 | no_license | #include <bits/stdc++.h>
using namespace std;
void SieveOfEratosthenes(int n)
{
int c = 0;
bool prime[n+1];
memset(prime, true, sizeof(prime));
for (int p=2; p*p<=n; p++)
{
if (prime[p] == true)
{
for (int i=p*2; i<=n; i += p)
prime[i] = fa... |
0a76a94a73c72451d21f07b87147ad76cf3c78de | 06ca697eed52813099b3d048ec7fcfd6bbaebecd | gaby22v/C- | /ecuatia1/main.cpp | C++ | cpp | 353 | no_license | /*
Sa se calculeze 2+x-y
*/
#include<stdio.h>
#include<conio.h>
int x,y,a,b,c;
void ec1()
{
a=2+x-y;
}
void ec2()
{
b=x*a-2+y;
}
void ec3()
{
c=a-2*b+x;
}
int main()
{
printf("x=");scanf("%i",&x);
printf("y=");scanf("%i",&y);
printf("Prima ecuatie=%i",ec1());
printf("A doua ecuatie=%i",ec2());
printf("A trei... |
819dddd103602a615a85e349afa4a823428ba0cf | e164107dbb629bc8695c67fdc2484573e7e297f0 | uofs-simlab/ChasteOS | /ode/test/odes/OdeFirstOrder.hpp | C++ | hpp | 2,524 | permissive | /*
Copyright (c) 2005-2016, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
4c60f8d2f0ef957025c1085cb63cc04dd60d3035 | 8356c361ffe98e811d13c69f94de2d2317d3b9b9 | jordandong/myleetcodes | /LC_00116_PopulatingNextRightPointersinEachNode.cpp | C++ | cpp | 2,130 | no_license | /*
Given a binary tree
struct TreeLinkNode {
TreeLinkNode *left;
TreeLinkNode *right;
TreeLinkNode *next;
}
Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL.
Initially, all next pointers are set to NULL.
Note:... |
0952b2ad5a3f56971c093e5dd4fad343475740fd | ef2f456866aa3aa3990e87c1e2bab0e6845b135a | jasonblog/note | /c++/code/mybooksources/Chapter06/code/WebSocketServer/base/ConfigFileReader.cpp | C++ | cpp | 3,019 | no_license | /**
* 简单的配置文件读取类,ConfigFileReader.cpp
* zhangyl 2017.05.27
*/
#include "ConfigFileReader.h"
#include <stdio.h> //for snprintf
#include <string.h>
CConfigFileReader::CConfigFileReader(const char* filename)
{
_LoadFile(filename);
}
CConfigFileReader::~CConfigFileReader()
{
}
char* CConfigFileReader::GetConfigNa... |
e444b984200841cdf99c3dd68c19635cef709632 | 8d3fe1be9bb7277c65b07c4b00d193a6dfa327bb | gdewald/Winter-Wars-PC- | /zenilib/jni/application/Raknet/Source/ReplicaManager3.cpp | C++ | cpp | 92,469 | no_license | #include "NativeFeatureIncludes.h"
#if _RAKNET_SUPPORT_ReplicaManager3==1
#include "ReplicaManager3.h"
#include "GetTime.h"
#include "MessageIdentifiers.h"
#include "RakPeerInterface.h"
#include "NetworkIDManager.h"
using namespace RakNet;
// DEFINE_MULTILIST_PTR_TO_MEMBER_COMPARISONS(LastSerializationResult,Replica... |
fd54a9615ef5918276dec5b13edd188322eb9ae0 | 4297455a7d5a5faf9bf1b6e0deb69132197b7fae | panda-sheep/leetcode | /113_Path_Sum_II/path.cc | C++ | cc | 1,205 | no_license | /**********************************************************************
Given a binary tree and a sum, find all root-to-leaf paths where each
path's sum equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
... |
ad1bbffdcce8a1d4bd5a153b3a088e4684b3a141 | 4d0624e5a3253ede5c9ad00bb2f09343fabee0c5 | billkarsh/Alignment_Projects | /Retired_Proj/4_Cmap/cmap.cpp | C++ | cpp | 5,011 | permissive |
#include "File.h"
#include "ImageIO.h"
#include "Maths.h"
#include "TAffine.h"
#include <string.h>
#include <stack>
using namespace std;
static bool Transpose = false; // Use translation only?
static bool WithinSection = false; // overlap within a section
static bool AllFiles = false; // use files for e... |
fa7b71040321a75f1322ea3608e8cb502b6df9f7 | 6d26755da67b91b6f9e971e9aaa42d909fb86c12 | RaoZiJian/Ludumdare31_Rao | /frameworks/runtime-src/Classes/AppDelegate.cpp | C++ | cpp | 4,215 | no_license | #include "AppDelegate.h"
#include "SimpleAudioEngine.h"
#include "jsb_cocos2dx_auto.hpp"
#include "jsb_cocos2dx_ui_auto.hpp"
#include "jsb_cocos2dx_studio_auto.hpp"
#include "jsb_cocos2dx_builder_auto.hpp"
#include "jsb_cocos2dx_spine_auto.hpp"
#include "jsb_cocos2dx_extension_auto.hpp"
#include "ui/jsb_cocos2dx_ui_ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.