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 |
|---|---|---|---|---|---|---|---|---|
54cbd942013bed58bb61620eb7f9bf7345c0cfd5 | 7929103dc21c468d8672f96ccc6bb8de0925ab83 | John-Shaw/leetcode-solutions | /leetcode/Linked_List_Cycle.cpp | C++ | cpp | 666 | permissive | //
// Linked_List_Cycle.cpp
// leetcode
//
// Created by 邵建勇 on 15/7/2.
// Copyright (c) 2015年 John Shaw. All rights reserved.
//
#include <stdio.h>
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
bool hasCycle(ListNode *head) {
... |
ff1998ed4618971743a65b57b7df3aca347940a6 | fcdbde7b2fea096af4dbc47726def1d321a19a25 | lineCode/ObEngine | /include/Camera.hpp | C++ | hpp | 2,046 | permissive | #pragma once
#include <SFML/Graphics.hpp>
#include "Coordinates.hpp"
#include "Rect.hpp"
#include "Referencial.hpp"
namespace obe
{
namespace World
{
/**
* \brief The Camera that views the Scene (World)
*
* Example :
*
* \code
* Camera& camera = Wo... |
91aecb798c90026fa08bf97f3f4cc16cacdad542 | 6d1fc5f2f24cd9975bc1878187064dff8cf12fba | Fynx/BuriedSecrets | /src/DataManager/Prototype.hpp | C++ | hpp | 1,581 | no_license | /* YoLoDevelopment, 2014-2015
* All rights reserved.
*/
#pragma once
#include <QtCore>
#include "Common/Enums.hpp"
class TextureSetData;
/**
* \class Prototype
* A Prototype represents a set of non-changeable data for one specific kind of game object.
* Data is stored in a map and accessible with functions.
... |
aa51522b65256414261bc49e73881c41b42e2cf1 | 061c2bb00284a5626be7583813ef0c8d03719df9 | sdCaramel302812/JellyEngine | /EventManager.cpp | C++ | cpp | 215 | no_license | #include "EventManager.h"
queue<UpdateEvent<Entity *> *> EventManager::update_event;
queue<RenderEvent<Entity *> *> EventManager::render_event;
EventManager::EventManager()
{
}
EventManager::~EventManager()
{
}
|
652d777ef0da5ab6c1a8433a147b8b42a5b1d110 | 1cf322b321ccef7c462a11c10173f81e9f39e2c7 | arsh317/Data-stuctures-and-Algo | /Arrays and math/Min jumps array.cpp | C++ | cpp | 939 | no_license | int Solution::jump(vector<int> &A) {
/* Dp sol
if(A.size()==1){ return 0; }
int arr[A.size()];
for(int i=0; i<A.size(); i++){ arr[i]=0; }
for(int i=1; i<A.size(); i++)
{
int min=INT_MAX;
for(int j=0; j<i; j++)
{
if(A[j]>=i-j && arr[j]!=INT_MAX &... |
457441c69009473c7fb899055816cfe3eab61f8f | 5dc7563d8236629c706a7fe3f8f38e68663d6457 | wwsorcas/trip | /iwave/ang/lib/fftops.cc | C++ | cc | 5,852 | permissive | #include "fftops.hh"
//*******************************************************************************************************
/* Weight vector: v=exp(-i*2PI/2N) */
int ffttrig(int nfft,float_complex *trigs)
{
int i;
float_complex cc;
float dinc=2.f*acos(-1.0)/nfft;
// WWS
float_complex sm1(0.0f,1.0f);
fo... |
1fcc00c4f4d75b8cacadc77e6368db59025e0379 | aba8dd3378f1ab38a0318c7b30a2662458e6d6bf | arorashu/aoc-2020 | /day22/day22.cpp | C++ | cpp | 3,983 | no_license | /*
day 22 - part a and b
compile: g++ day22.cpp
run: ./a.out < p22-input.txt
*/
#include <iostream>
#include <deque>
#include <string>
#include <set>
using namespace std;
struct roundState {
deque<int> p1;
deque<int> p2;
};
bool operator< (const roundState& lhs, const roundState& rhs) {
if(lhs.p1 ... |
4cd012cc3bcd6a03cc00923bec91dc5bbde28a11 | 050487b399918584c105a8e2f98db0378c800839 | Xbox-dev/dvd2xbox | /xbox/LCDFactory.cpp | C++ | cpp | 603 | no_license |
//#include "stdafx.h"
#include "lcdfactory.h"
#include "../dvd2xbox/d2xsettings.h"
#include "../lib/smartxx/smartxxLCD.h"
#include "../lib/libXenium/XeniumLCD.h"
#include "../lib/x3lcd/x3lcd.h"
ILCD* g_lcd=NULL;
CLCDFactory::CLCDFactory(void)
{
}
CLCDFactory::~CLCDFactory(void)
{
}
ILCD* CLCDFactory::Create()
{
... |
0d95d55b26d4afae1466fb3b1bd86e4e1ca57410 | 69c01fe7ed2df808cc7d643e3fd4002ab20fc917 | ehrlich-uva/Offline | /Sandbox/src/Source00_source.cc | C++ | cc | 7,414 | permissive | // A very simple source module.
//
// Original author: Rob Kutschke, 2014
// Adapted from Sources/src/FromEMFMARSFileWeighted_source.cc
//
#include <iostream>
#include <fstream>
#include <boost/utility.hpp>
#include "fhiclcpp/types/Name.h"
#include "art/Framework/IO/Sources/Source.h"
#include "art/Framework/Core/Inpu... |
f1cc6bf4d36f07b744ad9d8fd71c93ea6d754648 | 4451f66d31a7c3f7c7379829a0b10286dfed4586 | nberardi/hMailServer | /trunk/source/Server/IMAP/IMAPCommandLogout.cpp | C++ | cpp | 768 | no_license | // Copyright (c) 2010 Martin Knafve / hMailServer.com.
// http://www.hmailserver.com
#include "stdafx.h"
#include "IMAPCommandLogout.h"
#include "IMAPConnection.h"
#include "../Common/BO/IMAPFolders.h"
#include "../Common/BO/IMAPFolder.h"
#include "../Common/BO/Messages.h"
#ifdef _DEBUG
#define DEBUG_NEW... |
c9387a804945fd77a2649fab2d918eb074d938dd | 99c08eb74a410d4530a21ae40de12999c818372f | MiloHX/Parrot | /parrot/src/platform/OpenGL/OpenGLRendererAPI.cpp | C++ | cpp | 943 | permissive | #include "prpch.h"
#include "platform/OpenGL/OpenGLRendererAPI.h"
#include "glad/glad.h"
namespace parrot {
void OpenGLRendererAPI::init() {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_DEPTH_TEST);
}
void OpenGLRendererAPI::setViewport(u... |
dd145abf320b4f4b22b2329cca9531e5b2429bfb | 6dc0e1ce57505e4d1d881bea7b5f1314fd3bf2b2 | sorydi3/PracticaFinalMonopolyMTPII | /Tauler.cpp | C++ | cpp | 2,243 | no_license | //#include "stdafx.h"
#include "Tauler.h"
Tauler::Tauler()
{
_min = 0;
_max = 0;
_cptl = 0;
_n = 0;
_t = NULL;
}
int Tauler::getSize()const {
return _n;
}
void Tauler::resetPropietats()
{
for (int i = 0; i < _n; i++) {
if (_t[i]->getType() == 'P') {
//cout << "propietari es igual a propietat" << _t[i]->g... |
9b1ca735e2a66bfc308b8576f3c8bb57a0d3aeb1 | 75c0b046ded8b11f9af1a3804736b6f1134875da | absir/Rose | /apps-src/apps/librose/base_map.cpp | C++ | cpp | 12,160 | permissive | /* $Id: base_map.cpp 37221 2009-07-24 21:48:38Z crab $ */
/*
Copyright (C) 2006 - 2009 by Rusty Russell <rusty@rustcorp.com.au>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Li... |
ffba155972be9eabcfa005c2d98d0b038b6e53e5 | 063199df67de8ed71099fd3a6988b741d716d527 | farhan0011/farhantanvir0011-gmail.com | /lis iterative.cpp | C++ | cpp | 833 | no_license | #include<bits/stdc++.h>
using namespace std;
int dp[1010][1010];
int arr[1010];
int n,maxInA;
int f(int in,int last)
{
for(last = 0;last<=maxInA;last++)
{
dp[n][last] = 0;
}
for( in = n-1;in>=0;in--)
{
for( last = 0;last<=maxInA;last++)
{
int a = 0,b=0;
... |
0b27e40697c6d8b628314322064d5d3e5f99362b | 093e94a4d8b1ad73ff4966929518f2d124dd6a09 | bdkpr/MissionRnD-C-Arrays2-Worksheet | /src/countGreaterNumbers.cpp | C++ | cpp | 2,015 | no_license | /*
OVERVIEW: You are given a bank statement where transactions are ordered by date. Write a function that finds the number of transactions in that statement after a given date.
-- find the count of numbers greater than a given number in a sorted array.
E.g.: Input: A[3] = { { 10, "09-10-2003", "First" }, { 20, "19-10-2... |
4603f9a3134cdc958877393456e0b6a09a9f6c69 | ae145cfd1f8915c7cb5e4e1b7a71f51086f74753 | kusku/red-forest | /EngineUAB/Code/Videogame/Characters/Enemies/Rabbit/LogicStates/RabbitIdleState.cpp | C++ | cpp | 6,330 | no_license | #include "RabbitIdleState.h"
#include "Utils\BoostRandomHelper.h"
#include "SoundManager.h"
// --- Per pintar l'estat enemic ---
#include "DebugGUIManager.h"
#include "DebugInfo\DebugRender.h"
#include "LogRender\LogRender.h"
#include "Core.h"
// ---------------------------------
#include "Characters\State... |
bb578194194c248d5b37678ad973fb8af43e04de | 08e2705ef1bf30c18962240be30fb3354f69cea6 | xygroup/clang | /lib/Lex/PPExpressions.cpp | C++ | cpp | 27,938 | permissive | //===--- PPExpressions.cpp - Preprocessor Expression Evaluation -----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
0a01fa14edec446dbb006c6e17f48cd0694b78fa | 19b00043274c389f41734a94e994cb772956a269 | ashn01/algorithm | /ValidParentheses.cpp | C++ | cpp | 704 | no_license | //https://leetcode.com/problems/valid-parentheses/description/
//Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
//
//The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not.
class Solution {
publi... |
92d9e152464eec3fc57709a6497366d683fbad6e | a4d1b3d0f15404740accc5ca35f4483736224613 | mborgerson/OpenXBOX | /src/kernel/RtlAssert.cpp | C++ | cpp | 507 | no_license | #include "common.h"
/*
* RtlAssert
*
* Import Number: 264
* Calling Convention: stdcall
* Parameter 0: PVOID FailedAssertion
* Parameter 1: PVOID FileName
* Parameter 2: ULONG LineNumber
* Parameter 3: PCHAR Message
* Return Type: VOID
*/
int Xbox::RtlAssert()
{
K_ENT... |
12250b60cfad4b3c04d1281a0cad281728c5bdf7 | 4d76dfe91052fbe7e764842ae9917a1092258c1f | T-head-Semi/llvm-project | /clang/lib/Parse/ParseStmt.cpp | C++ | cpp | 92,225 | permissive | //===--- ParseStmt.cpp - Statement and Block Parser -----------------------===//
//
// 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
//
//===---------------------------... |
3677f9a807437ce8c11ddf06aebf7076a5c98ff6 | dde4ef7089185379638c19e98a737b09a638279f | Rajon-Chowdhury/Math-Number-Theory | /Movius inversion/LOJ_1375.cpp | C++ | cpp | 808 | no_license | #include<bits/stdc++.h>
#define REP(i,n) for (int i = 1; i <= n; i++)
#define mod 1000000007
#define pb push_back
#define ff first
#define ss second
#define ii pair<int,int>
#define vi vector<int>
#define vii vector<ii>
#define lli unsigned long long
#define endl '\n'
using namespace std;
const int mx = 300... |
f9df127f9c16d8c2c1c24dbf7e3f72a4a3b4d834 | a85ca46817ff306a08277c976befde3e44adf241 | youngwo-o/Algorithm | /Programmers/Kakao_2018_2.cpp | C++ | cpp | 683 | no_license | #include <vector>
#include <string>
//#include <cmath>
//#include <algorithm>
using namespace std;
vector<string> solution(int n, vector<int> arr1, vector<int> arr2) {
vector<string> answer;
for (int i = 0; i < n; ++i) {
int res = arr1[i] | arr2[i];
string ans = "";
//int p = pow(2, n - 1);
for (int j = 0;... |
386fa4005445fa03cdbf7ebd88783f25782a3c6d | efb0b9e892aacbdf4d5197dd510ed8b9b7337fc9 | JulienGrv/GPS-IF23-UTT | /GPS-Fix-Data/Acquisition/DisplayManager.cpp | C++ | cpp | 2,723 | permissive | //
// Created by Fox on 04/06/2015.
//
#include "DisplayManager.h"
LiquidCrystal DisplayManager::lcd = LiquidCrystal(LCDRS,LCDEN,LCDD4,
LCDD5,LCDD6,LCDD7);
bool DisplayManager::initialized = false;
int DisplayManager::display_mode = -1;
int DisplayManager::environment = CLEAR;
int DisplayManager::sa... |
8c86d85ffef1066f26b3bfa6e807ac726917cde2 | 0ebd2ed6b7edcf38a8384d6d72e027875b200352 | 2ee2ee2ee/Competitive_Programming | /dmopc191p2.cpp | C++ | cpp | 1,609 | no_license | #include <bits/stdc++.h>
using namespace std;
string s1 = "Good writing is good ",s2 = " writing is good ",s3 = " is good writing.";
string zero = "Good writing is good writing is good writing.";
string one = "Good writing is good Good writing is good writing is good writing. writing is good Good writing is good writi... |
4a8a94bb733e8d29032e87a1fac34071ed4a938c | 2e0242248a609cd27afa029675f8f2523351e522 | wilson-ko/dr_util | /test/button_filter.cpp | C++ | cpp | 1,414 | no_license | #include "button_filter.hpp"
#include <gtest/gtest.h>
int main(int argc, char ** argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
namespace dr {
TEST(ButtonFilterTest, filterAlwaysHigh) {
ButtonFilter bf(true, false);
// pass through high signals always
EXPECT_FALSE(bf.filter(false));
... |
510617a9425b1817999a83aa950d768b717b4d36 | e27e4c9e4b9888576276b9e8c8f6a2345c10d4f9 | mehedihasan1165/Algorithm-Design-and-Analysis-Lab | /Dynamic Programming/longestIncreasingSequence.cpp | C++ | cpp | 633 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
int sequence[100];
int arr[100];
int main(){
int n, ans;
cin >> n;
for (int i = 0; i < n; ++i){
cin >> sequence[i];
}
arr[0] = 1;
for (int i = 1; i < n; ++i){
for (int j = i; i >= 0; --j){
if (sequence[j]... |
05f15d7155e702cfc7321322002afca7d79f3803 | 0fc434150eacd9969470b9522ebcac4ecd5269e8 | william9w/interfaz | /Ejercicio_57.cpp | C++ | cpp | 894 | no_license | /*
Instituto Tecnologico de Tijuana Depto de Sistemas y Computación
Ing. En Sistemas Computacionales
Practica enlenguaje c++ para la materia de lengiterfaz:
Ejercicio 57: Encontrar el promedio de N numeros. Insertar en primer lugar el valor de N, Seguido por los N numeros.
Autor :Mendoza Perez Max William
max.mendo... |
0d43ede48f0538847e8c2a7413906eaac5416361 | 15a073022b74b1a5ef429c6fb70398c64e6be6f9 | ludocosmo/wrtc-client | /third_party/asio/include/asio/ssl/detail/shutdown_op.hpp | C++ | hpp | 1,228 | permissive | //
// ssl/detail/shutdown_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
//
#ifnd... |
7a57409eba04eb06105bacdfdf413b779c77fe14 | d35d8dfe483744ce69cf62536ef7d60e24ef418b | maiple/opengml | /include/ogm/project/resource/ResourceFont.hpp | C++ | hpp | 1,051 | permissive | #pragma once
#include "Resource.hpp"
#include "ogm/asset/AssetTable.hpp"
#include "ogm/bytecode/BytecodeTable.hpp"
#include "ogm/ast/parse.h"
#include "ogm/bytecode/bytecode.hpp"
#include <memory>
namespace pugi
{
class xml_document;
}
namespace ogm::project {
class ResourceFont : public Resource {
public:
... |
aacabb1c0129c2e386252a76e3deda6899ef1a71 | ed4beacbd76a9c515a724bde95f1e8abc037bafa | dmatetelki/seed | /lib/subsystem_1/dummy_class.cpp | C++ | cpp | 262 | no_license | #include "dummy_class.hpp"
#include <iostream>
namespace subsystem_1 {
Dummy_class::Dummy_class()
{
std::cout << "Dummy_class ctor" << std::endl;
}
Dummy_class::~Dummy_class()
{
std::cout << "Dummy_class dtor" << std::endl;
}
} // namespace subsystem_1
|
cb27aaf0d32fb611dfa3768829c2aaddc6a21b12 | 97488d501a60376717c82081d9d8b1244ad45e62 | jonasporto/ReboundTheGame | /Commons/type_id.hpp | C++ | hpp | 1,068 | permissive | #pragma once
#if _WIN32
#include <typeindex>
#endif
namespace util
{
#if _WIN32
using type_id_t = std::type_index;
template <typename T>
type_id_t type_id() { return std::type_index(typeid(T)); }
#else
///
/// \brief Class to encapsulate type_id
/// Its implementation is by iavr (http://codereview.st... |
43ce0dd9360024a3c5bdf1a614d1b20ccc566cb5 | a13d6f7ab3a3f77cde1ffa903fbc040e1966db83 | FRC1410/infiniterecharge2020 | /Zappin' Kraken v1.0.6/src/main/cpp/Auto/Modes/FiveBallTrench.cpp | C++ | cpp | 766 | no_license | #include "Auto/Modes/FiveBallTrench.h"
#include "Auto/Groups/AutoLimelightShoot.h"
#include "Auto/Actions/ResetPosition.h"
#include "Auto/Actions/DriveToDistance.h"
#include "Auto/Actions/IntakeBalls.h"
#include "Auto/Actions/TimerDelay.h"
#include "Commands/Actions/SetDesiredIntakePosition.h"
#include "RobotMap/Co... |
67ac3d08116944b64f82238afe6819e188f76d81 | 59790a0f2749a3dbb96b2af70c95830aac21279d | alex-korobko/scad-modus-spider | /spider/spider/threads_functions.cpp | C++ | cpp | 24,243 | no_license | #include <Ap.h>
#include <Ph.h>
#include <Pt.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/neutrino.h>
#include <sys/syspage.h>
#include <inttypes.h>
#include <fcntl.h>
#include <signal.h>
#include <iostream.h>
#include <sys/socket.h>
#include <net/if.h>
#i... |
58da69c318b37ebc373e75c589c2e9a67b92ad54 | f1d8c6951a9d70235f849218700d8905fe8dcb57 | Alejandro-Monje/linked-list | /llist.cpp | C++ | cpp | 9,377 | no_license | // ====================================================
//Your name: Alejandro Monje
//Complier: g++
//File type: llist implementation file
//=====================================================
using namespace std;
#include<iostream>
#include"llist.h"
//Constructor
//- initialize Front and Rear to be NULL and Co... |
5554188b464e2320ba6be8b887bfbdf9d6013894 | 9c5c322e23692b6833057b8faa512762f8f96a30 | apple/llvm-project | /mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp | C++ | cpp | 138,640 | 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
//
//===---------------------------... |
ab00b15c79749c00312c45a1bb3c13260fe25a6c | 4d32530d8d2b0833f200be16b8861db8edd45075 | yjbong/problem-solving | /boj/10875/10875.cpp | C++ | cpp | 8,495 | no_license | #include <cstdio>
#include <vector>
#define INF 1000000000000000000ll
#define HORIZONTAL 0
#define VERTICAL 1
#define NORTH 0
#define EAST 1
#define SOUTH 2
#define WEST 3
using namespace std;
typedef long long ll;
ll L; // 격자판 크기 = (2L+1)*(2L+1)
int N; // 머리 방향 회전 횟수
typedef struct{
ll x;
ll y;
}POINT;
typedef st... |
7be33a84b5c840d11368979b90fadb1493c79c18 | aa05fd1230684c8f5c9cb98c6f851fd19d4247ba | nshahpazov/algorithms-in-cpp | /graph-algorithms/dijkstra-hospitals.cpp | C++ | cpp | 2,257 | no_license | #include <stdio.h>
#include <vector>
#include <queue>
#include <iostream>
#include <climits>
using namespace std;
vector<vector<pair<int, int> > > graph;
const int MAXN = 10001;
const int INFINITY = INT_MAX;
int n, m, h;
int dist[MAXN];
int hospitals[MAXN];
bool visited[MAXN];
void init_vertices(){
... |
90fb864cc8a7ab219d6514b59f71ea2caa682be7 | 8bf63f2f7225da144966650455fd399798bbbd9e | smtroehler/ArmariumGame | /source/TimeManager.cpp | C++ | cpp | 5,125 | no_license | //***********************************************************************//
// //
// - "Talk to me like I'm a 3 year old!" Programming Lessons - //
// //
// $Program: Frames Per Second //
// //
// $De... |
ffefbf00dcf79a41ccfe678578b760f80b8620ab | f6256329e2352802753534a3a0beede9d2bab381 | MOVE-II/move-on-helium-sensors | /src/modules/ADCS/Sidepanel.hpp | C++ | hpp | 987 | permissive | #pragma once
#include <mbed.h>
#include <include/adcs_protocol.h>
#include <lib/Checksum/Checksum.hpp>
#include <lib/SensorThread/SensorThread.hpp>
#define SIDEPANEL_PRINT_CHECKSUM_ERRORS
//#define SIDEPANEL_RAW_DATA
/**
* Driver for the ADCS Sidepanel
*/
class Sidepanel : public SensorThread {
public:
Sidepan... |
9d1bc0ba186db5d49f23f67adcd8f4c815c2fe8f | 4515eaefef8206d9aa96adae657da2d36961e8ef | jayparekhjp/openCV-Facial-Recognition | /openCV/sources/modules/nonfree/test/test_detectors.cpp | C++ | cpp | 10,261 | permissive | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... |
8f5ff294b4bbcb4c7af5829af1040621f4bd96a2 | 71f7094f04f37d0d3bf786fc6745e49d9a9079be | adityalahiri/CPP-Code | /ohonemin.cpp | C++ | cpp | 982 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int num_tests = 0;
cin>>num_tests;
stack<int>s;
int min_curr = 0;
while(num_tests--){
int choice = 0;
cin>>choice;
if(choice == 1){ // push
int x = 0;
cin>>x;
if(s.empty()){
min_curr = x;
s.pus... |
e5b4664e1d0f848abfefddf2259d6da5ae8fec21 | 88883e752ba115f052dbfa76b5c7978ef554752d | LukasM94/rc_car | /shared/GamePad/src/GamePad.cpp | C++ | cpp | 5,446 | no_license |
#include <GamePad.h>
#include <string>
#include <algorithm>
#include <string>
#include <string.h>
#include <debug.h>
#include <assert.h>
#if defined(__x86_64)
#include <json/json.h>
#include <json/reader.h>
#include <json/writer.h>
#include <json/value.h>
#else // if defined(__arm__)
#include <jsoncpp/json/json.h>
#in... |
8a711d375dadb212da4ffcf02a5a5b60b6ae5f76 | 408ce85d3e67e1032afd57b83daf228abf67930d | pu2oqa/muServerDeps | /_Include/boost/type_traits/remove_cv.hpp | C++ | hpp | 2,223 | no_license | ////////////////////////////////////////////////////////////////////////////////
// remove_cv.hpp
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
// Hinnant & John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompany... |
5dfff5431cbaaf22b20455fa168b92f523fa5272 | 607b2a653e04b0cdcca71c9fb02eacd9483a0570 | ZC1231/MTCNN | /src/main.cpp | C++ | cpp | 17,050 | permissive | #include "mtcnn.h"
#include "browse.h"
#define USE_SHELL_OPEN
#ifndef nullptr
#define nullptr 0
#endif
#if defined(_MSC_VER)
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#else
#include <unistd.h>
#endif
//ref:https://github.com/nothings/stb
#define STB_IMAGE_STATIC
#define STB_IMAGE_IMPLEMENTATION
#includ... |
3c761a153ed763081d41e0ccebebeea529ada566 | b94586f49a984e92f888d99efb6527f1b8e7ecaa | legau1000/IndieStudio | /src/main.cpp | C++ | cpp | 428 | no_license | /*
** EPITECH PROJECT, 2019
** Indie Studio
** File description:
** main.cpp
*/
#include "../Errors/Error.hpp"
#include "../include/env/env.hpp"
#include "../include/Indie.hpp"
#include "../include/def/def.hpp"
bool checkEnv(char **env);
int main(UNUSED int ac, UNUSED char **av, char **env)
{
Indie nwGame;
E... |
20ddd6d6ee0015fbc6b08d56db6b3ece1824a1ab | 35c33cb3d294b1a0014875959cb1dcbf088c35fd | vsevolod-oparin/team_notebook | /strings/suffix_sort/suffix_sort.cpp | C++ | cpp | 2,438 | no_license | #include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
using namespace std;
void coloring(const string& s, int* const color)
{
int n = s.length();
int col[256];
memset(col, 0, 4 * 256);
FOR(i, 0, n) col[s.at(i)] = 1;
FOR(i, 1, ... |
46ed4416a8a5f09dfdb95cd5f7c410c0faee2078 | 92274afce76708d3028041a6cc3733dc09880c42 | Choster-jpg/KP_LP | /LP_KP/GBR.cpp | C++ | cpp | 8,104 | no_license | #include "GBR.h"
#include <string.h>
#define GRB_ERROR_SERIES 130
namespace GRB
{
#define NS(n) Rule::Chain::N(n)
#define TS(n) Rule::Chain::T(n)
Rule::Chain::Chain(short symbolCount, GRBALPHABET s, ...)
{
this->chainOfTerm_nTerm = new GRBALPHABET[this->size = symbolCount];
int* ptr = (int*)&s;
for (int i ... |
62a4d7a77b26de0c6a0c2f9c9c5290ce4f13b529 | 7f0a061a71d0da51930757c7f894733ffe46be60 | suuyaoo/webkit | /Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp | C++ | cpp | 8,456 | no_license | /*
* Copyright (C) 2012 Igalia S.L.
*
* 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) any later version.
*
* This library ... |
a4aa1aecc9af607284d9613c05a7cc19eb3b7b9c | b5cccc729ab1a1fede974bc8c80a8fa3fe6cc7e7 | lineCode/ZFFramework | /demo/zfsrc/ZFFramework_test/ZFUIKit_test/ZFUIKit_ZFUIOnScreenKeyboardState_test.cpp | C++ | cpp | 2,059 | permissive | #include "ZFUIKit_test.h"
ZF_NAMESPACE_GLOBAL_BEGIN
ZF_GLOBAL_INITIALIZER_INIT(ZFUIOnScreenKeyboardState_test)
{
this->observerOwner = zflineAlloc(ZFArrayEditable);
ZFLISTENER_LOCAL(sysWindowOnCreate, {
ZFLISTENER_LOCAL(action, {
zfLogTrimT() << "[ZFUIOnScreenKeyboardState] state changed:... |
e6bd6096cb7dbaf24509870f41b5340985599505 | 115c7f207c0cea59f8660b551d5f1b43ab42476f | fx-ha/dogechain | /src/test/txvalidationcache_tests.cpp | C++ | cpp | 16,774 | permissive | // Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <consensus/validation.h>
#include <key.h>
#include <validation.h>
#include <miner.h>
#include <pubkey.h>
#include <t... |
507559b0313b007af9f102e8cd07fb5c823876f3 | cee60bdfe32d6d8dff5cf3dc4503f94bccd56b89 | arunabh-alt/SDE_EdFoal | /9th day task/Bracket_checking.cpp | C++ | cpp | 1,444 | no_license | /* Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Example 1:
Input: s = "()"
Output: true
Example 2:
... |
89eec0b5fad666fdbaf603a32c0024c10859a0d1 | 56999218aa23383c1bf8eeef41fedff9a350184d | OctavioBustos/tatara | /tests/test-matrix-mult.cpp | C++ | cpp | 1,254 | no_license | #include <gtest/gtest.h>
#include "../src/tp3.h"
#include "timing.h"
#include <iostream>
TEST(test_multiplicacion, test_matriz_cuadrada) {
Matriz M1 = {
{1,2,3,4},
{5,4,3,2},
{6,6,6,7},
{1,2,2,1}
};
Matriz M2 = {
{2,0,0,0},
{0,2,0,0},
{0,0,2,0},
... |
84580bdff1b2cb4c3b49195e5c97714ea9ced9cf | 8bd6eda0181a55d97840cb952c9b878f529bf3d7 | 2851999/UnnamedEngine | /UnnamedEngine/src/core/Rectangle.cpp | C++ | cpp | 2,071 | no_license | /*****************************************************************************
*
* Copyright 2015 Joel Davies
*
* 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
*
* ... |
814f66033d1313badde4a1e7310736d696bff1f4 | 77bb2bb54c80995c388194a9353deda2a6adbb8d | leduynguyen/foin | /src/util.cpp | C++ | cpp | 35,807 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util.h"
#include "chainparams.h"
#include "sync.h"
#include "ui_interfa... |
53a9d7ba0e3f8e44c55c587f3bce1231abcabe8d | d3c888c537d8f39609a17cad390a82bdca792047 | Flat-flyer/C-Game-Engine | /GameEngineProject/Engine/Core/Camera.cpp | C++ | cpp | 2,574 | no_license | #include "Camera.h"
#include "CoreEngine.h"
Camera::Camera() : position(glm::vec3()), fieldOfView(0.0f), forward(glm::vec3()), up(glm::vec3()), right(glm::vec3()), worldUp(glm::vec3()), nearPlane(0.0f), farPlane(0.0f), yaw(0.0f), pitch(0.0f), perspective(glm::mat4()), orthographic(glm::mat4()), view(glm::mat4())
{
f... |
991e537f11694eec41d3c1f6f84ea0c4a4968426 | 0a8b55f26b55f509e06c2ae7f078f5691742ace2 | Qzhenlong/LeetCode | /GenerateParentheses.cpp | C++ | cpp | 3,038 | no_license | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
/*
题目:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()()()"
解析:给出n对括号对,返回可能的组合种类
递归思路:
括号匹配问题与栈结构相符... |
6247f31bf2e04f9ae60172f44a2bf4e867c88490 | 8c080e90238e6503b9f27d7f24c3012d3d1546ea | networkit/networkit | /include/networkit/linkprediction/JaccardIndex.hpp | C++ | hpp | 1,258 | permissive | /*
* JaccardIndex.hpp
*
* Created on: 23.03.2015
* Author: Kolja Esders
*/
#ifndef NETWORKIT_LINKPREDICTION_JACCARD_INDEX_HPP_
#define NETWORKIT_LINKPREDICTION_JACCARD_INDEX_HPP_
#include <networkit/linkprediction/LinkPredictor.hpp>
#include <networkit/linkprediction/NeighborhoodUtility.hpp>
namespace Net... |
dce61b7019548f92467807ebc6a8d2982cdc9b7f | a5745cb74ed14aea4baa485445e7e231cee5141d | marco-c/gecko-dev-wordified | /third_party/highway/hwy/tests/expand_test.cc | C++ | cc | 8,806 | permissive | /
/
Copyright
2022
Google
LLC
/
/
SPDX
-
License
-
Identifier
:
Apache
-
2
.
0
/
/
/
/
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
... |
90f9a3a7a1ffbc7002c9b62cd375947f5cef7cb3 | b0eb3794532e30ac60d45f391fb53e561b7652d4 | 15-466/15-466-f20-base5 | /main.cpp | C++ | cpp | 6,252 | no_license | //Mode.hpp declares the "Mode::current" static member variable, which is used to decide where event-handling, updating, and drawing events go:
#include "Mode.hpp"
//The 'PlayMode' mode plays the game:
#include "PlayMode.hpp"
//For asset loading:
#include "Load.hpp"
//For sound init:
#include "Sound.hpp"
//GL.hpp wi... |
13ab7751ae2851d1d65a8c172ef9b541425fcaaa | 3af6eedd85cbaaccb82ecd0085ccf9ef6face562 | waaberi/chromium | /chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc | C++ | cc | 12,076 | permissive | // Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h"
#include "base/bind.h"
#include "base/no_destructor.h"
#include "base/strings/string_number_c... |
228ac9c7f82530cf2d1039039b6ba29c7712ff9b | 77f105b24e715a977752e1a6f106bebf6d2189da | yr-wang-hit/irods | /server/core/include/irods_resource_manager.hpp | C++ | hpp | 12,150 | permissive | #ifndef __IRODS_RESOURCE_MANAGER_HPP__
#define __IRODS_RESOURCE_MANAGER_HPP__
// =-=-=-=-=-=-=-
#include "rods.h"
#include "irods_resource_plugin.hpp"
#include "irods_first_class_object.hpp"
#include <functional>
namespace irods
{
extern const std::string EMPTY_RESC_HOST;
extern const std::string EMPTY_RESC_... |
8448d6a7d9930a8d46ec63b8002508bd9b179125 | 7b5bdddce09ad2957f2098cae359e6b0ee46b881 | sethjohnson/GraphicsClasses | /source/WindowManager_GLFW.cpp | C++ | cpp | 1,219 | no_license | #include "WindowManager_GLFW.h"
#include <GLFW/glfw3.h>
#include <iostream>
bool WindowManagerGLFW::initWindow()
{
if (!glfwInit ()) {
fprintf (stderr, "ERROR: could not start GLFW3\n");
return false;
}
// uncomment these lines if on Apple OS X
glfwWindowHint (GLFW_CONTEXT_VERSION_... |
dbd30867bd917f2aa7d94229301af0f8d89fec2d | 8dfa0489e21496c3fbbeb0c0487af65b1a2fb2f9 | helloworld1983/CxxUtilities | /includes/CxxUtilities/Bitstream.hh | C++ | hh | 12,723 | no_license | /*
* Bitstream.hh
*
* Created on: 2012/01/02
* Author: Soki Sakurai
*/
#ifndef CXXUTILITIES_BITSTREAM_HH_
#define CXXUTILITIES_BITSTREAM_HH_
#include <iostream>
#include <vector>
#include <iomanip>
#include <CxxUtilities/Exception.hh>
namespace CxxUtilities {
class BitstreamException: public CxxUtilities:... |
b2a179d21f2d081cb92228fc17c6807508f44673 | 4b3be3e12cd7969a6e797b19da3568494aa13449 | DamonOuyang/gitVersionLib | /test_code/CustomSlider-master/debug/moc_bsrwidget.cpp | C++ | cpp | 6,119 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'bsrwidget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.1)
**
** WARNING! All changes made in this file will be lost!
***********************************************************... |
81ef86b2a0f99794926d69f59c512e77f2dcc5be | 9a440594715ddf25eac2409f9090f824a22fb424 | Scarzard/Project_1 | /Andro_Dunos/Greyball_K.cpp | C++ | cpp | 2,345 | permissive | #include "Application.h"
#include "GreyBall_K.h"
#include "ModuleCollision.h"
#include "ModuleRender.h"
#include "ModulePlayer1.h"
#include "ModuleParticles.h"
#include "ModuleUserInterface.h"
#include "ModuleEnemies.h"
#include "ModuleMixer.h"
Enemy_Greyball_K::Enemy_Greyball_K(int x, int y) : Enemy(x, y)
{
hitboxW... |
91171e44d35a091b3780a9a49315166381518f63 | a9a7064ce7ff538f458b7892a04e512451090f7a | The-OpenROAD-Project/OpenROAD | /src/odb/src/defin/definBase.cpp | C++ | cpp | 3,082 | permissive | ///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (c) 2019, Nefelus Inc
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//... |
9e6acd95b75e204cd379a9cd3532a4953da79ec2 | e64f96f2c6c10e8e81141dbf727faab7e2177614 | iennedaemen/FinsAdventure | /Fins Adventure/PowerUp.cpp | C++ | cpp | 729 | no_license | #include "stdafx.h"
#include "PowerUp.h"
#include "utils.h"
#include "Matrix2x3.h"
const float PowerUp::radius{ 8 };
PowerUp::PowerUp(const Point2f& center, Type type)
: m_Type{type}
, m_Shape{Circlef(center, radius)}
, m_Texture{"Resources/PowerUps.png"}
, m_TextClip{ (m_Texture.GetWidth() / 4) * (float(m_Type) ... |
a274ae3b122281c73733140d2cb1cc8015007a93 | a931169e5bd907d3a451c04b43bf26f5a93eb3e5 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_old_hunk_3259.cpp | C++ | cpp | 468 | no_license | else
what = MSG;
/* The entry should be ignored if it is a full URL for a 401 error */
if (error_number == 401 && what == REMOTE_PATH) {
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server,
"cannot use a full URL in a 401 ErrorDocument "
"directi... |
d358a23e67d9f9e51ca64751ce9f43a1a97e8afe | 3750001695059864a1b5ef780cf44545f3ab672d | ManasviGoyal/LeetcodePractice | /recover-binary-search-tree/recover-binary-search-tree.cpp | C++ | cpp | 803 | 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... |
08f7aea5a0985df06fb4c5c7b224ccbd53b18336 | 04378bb5e3b7d4c60bcf6c67476a71fa9888c763 | v8-coin/V8Coin | /src/dsnotificationinterface.cpp | C++ | cpp | 2,100 | permissive | // Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2019 The V8COIN Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
#include "dsnotificationinterface.h"
#include "instant... |
d32505be862346718dc3b45793ca01676f501ba8 | 78f3da21c3a5e18f360e43426c0823a6e3210bca | HAHAcell/chromium | /chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc | C++ | cc | 118,090 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
#include <stdint.h>
#include <set>
#include <string>
#include <utility>
... |
28ca6347fe45aadf48bf2a658d031b39c63605d7 | 34494223e151356f1ebb34b73f88c5071056ad48 | arthurhero/opencv_contrib | /modules/dnn/src/dnn.cpp | C++ | cpp | 29,590 | permissive | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
ef2523e7fc8ebbe0f5f845bde85660ad28bef615 | ab30c8c635da0ff7245753f15d9294da84f6581d | gurizou7/c-gengo | /シューティングゲーム/A/Game.cpp | C++ | cpp | 2,122 | no_license | #include "stdafx.h"
#include"DxLib.h"
#include"Manager.h"
#include"Game.h"
#include "Object.h"
#include "Player.h"
#include "BulletManager.h"
#include"EnemyManager.h"
#include <windows.h>
#define BUFFSIZE 1024
#define CHARBUFF 124
void getGurrentDirectory(char *currentDirectory) {
GetCurrentDirectory(CHA... |
b88468fd1ec508707795a4d98cd488f0cb46100a | 71811654ddfafb8a2b4a4f0c54fd6e186a9f4885 | tavisit/AdventOfCode2018 | /02nd Day/FirstPart/main.cpp | C++ | cpp | 604 | no_license | #include <iostream>
#include <fstream>
#include <string.h>
#include <algorithm>
#include <math.h>
using namespace std;
ifstream in("data.in");
char c[1000];
int checkSum=0,two,three;
int f[30],n;
int main()
{
while(in.getline(c,100)){
for(char ch='a';ch<='z';ch++)f[ch]=0;
n=strlen(c);
for(in... |
78aa6774d081a774f9f994563358e6b9e0178fee | 11a76b061208ccbe5435bfa78e2317317d304ee5 | WhiZTiM/coliru | /Archive2/02/08466f77cf2d3f/main.cpp | C++ | cpp | 304 | no_license | #include <cassert>
int clash_g = 333;
struct G {
int clash_g = -332;
void fn() { assert(clash_g + ::clash_g == 1); }
};
int main() {
int clash_l = 333;
struct L {
int clash_l = -332;
void fn() { assert(clash_l + clash_l == -664); } // 666 instead of 1
};
G().fn(); L().fn();
} |
1bb93f9c327d1d86f6606a327d45fc877161b3b0 | 9fb55caf37454f8c975d7283bc3963701d060d83 | jer22/OI | /hdu/bestcoder42/1003/1003.cpp | C++ | cpp | 887 | no_license | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
int n, m, K;
int arr[105][105];
int dp[105][105][105];
int main() {
freopen("1003.in", "r", stdin);
while (~scanf("%d %d %d", &n, &m, &K)) {
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
scanf("%d... |
0b918b1b9d73e557c5d6057f681232ee9cc1bc9d | cd75ca5baa925053886664ee80bffc6e8d0ab568 | peihanlee/test | /313.super-ugly-number.cpp | C++ | cpp | 1,768 | no_license | /*
* @lc app=leetcode id=313 lang=cpp
*
* [313] Super Ugly Number
*
* https://leetcode.com/problems/super-ugly-number/description/
*
* algorithms
* Medium (43.88%)
* Likes: 520
* Dislikes: 131
* Total Accepted: 72.1K
* Total Submissions: 163.9K
* Testcase Example: '12\n[2,7,13,19]'
*
* Write a pro... |
6aba8685c866ef19e2fbe0f06f334e0f6e0e8a9a | 005c6cef105641fc3ce3517bd0d9d842f6f4ebb7 | GXhua/puno | /.libs/puno_automatic_generated/inc/types/com/sun/star/chart2/RelativeSize.hpp | C++ | hpp | 2,018 | no_license | #ifndef INCLUDED_COM_SUN_STAR_CHART2_RELATIVESIZE_HPP
#define INCLUDED_COM_SUN_STAR_CHART2_RELATIVESIZE_HPP
#include "sal/config.h"
#include "com/sun/star/chart2/RelativeSize.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
#include "typelib/typeclass.h"
#include "typelib/... |
8571b0260220a539f11415075de2ef28331e5d35 | 33a440e7380ec438107876e16dc00db25655710e | live-for-dream/foundationdb | /fdbclient/Schemas.cpp | C++ | cpp | 24,331 | permissive | /*
* Schemas.cpp
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project 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... |
ded53f0be048629af34a5c5b2a318cff4da431f1 | 3b49129cceb89b19691856f6be3f8b8302a85a07 | denysvitali/fhir | /cc/google/fhir/stu3/extensions.cc | C++ | cc | 9,726 | permissive | // Copyright 2018 Google LLC
//
// 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 ... |
62456e28b439d161a2f25f9c45ad5d263c43840f | 45eede25ee971342c2848b4e2f46c100bed3e74b | TeamVault/tauCFI | /C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-1957.cpp | C++ | cpp | 2,389 | no_license | struct c0;
void __attribute__ ((noinline)) tester0(c0* p);
struct c0
{
bool active0;
c0() : active0(true) {}
virtual ~c0()
{
tester0(this);
active0 = false;
}
virtual void f0(){}
};
void __attribute__ ((noinline)) tester0(c0* p)
{
p->f0();
}
struct c1;
void __attribute__ ((noinline)) tester1(c1* p);
struct c1
{
bool ac... |
e72cd83a25ad6dc9013369b619e097da14436441 | cdd12747e5890722fdc2374f15956f7c35f3cd60 | TrellixVulnTeam/Chromium_7C66 | /extensions/browser/info_map.cc | C++ | cc | 8,767 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/browser/info_map.h"
#include "base/strings/string_util.h"
#include "content/public/browser/browser_thread.h"
#include "exten... |
4958a0467db3858c228d3e8fc5f7ff35a71798a5 | 9159e6f3fe0d7913924b7080f596e81c27ac1ec8 | xtblock/chromium | /chromeos/cryptohome/userdataauth_util.cc | C++ | cc | 6,116 | permissive | // Copyright 2021 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/cryptohome/userdataauth_util.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "chromeos/cryptohome/cryptohome_util.h... |
72c63a19b7324f375854d01abd576d5ccf4ebd78 | a7eb50c403b9a92c478d8c55432fbcc25786769b | vslavik/poedit | /deps/boost/libs/geometry/test/srs/srs_transformer.cpp | C++ | cpp | 4,084 | permissive | // Boost.Geometry
// Unit Test
// Copyright (c) 2017-2018, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// 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://ww... |
8e96d26ea34568ed8e34a1657c6da0b3e44f15f5 | 056ce9910d81b3f1e03bdc3d39f98968a68ff8be | adslinfosoft/bitozcoin | /src/test/sigopcount_tests.cpp | C++ | cpp | 2,031 | permissive | // Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "pubkey.h"
#include "key.h"
#include "script/script.h"
#include "script/standard.h"
#include "uint256.h"
#include "t... |
59fe0a7241f2050df9b5d30e20b7dada4640a3e9 | b6eda57e055619cc45e7692e4c133f2feea99990 | burakkayya/Student-Information-System | /Ogrenci.cpp | C++ | cpp | 670 | no_license | //OGRENCI CPP
#include "Ogrenci.h"
#include "Ders.h"
#include <vector>
#include <string>
#include <string.h>
#include <iostream>
#include <stdio.h>
using namespace std;
Ogrenci::Ogrenci(int _no, string _ad, string _soyad) :no(_no), ad(_ad), soyad(_soyad){}
void Ogrenci::dersEkle(Ders _ders) {
dersler.push_back(_ders... |
a53cc70bdeea1cd79a18d6e620115d2ed9373143 | 8b298b06f6fb449067b1faec02a3202a5c1b1a2e | minaminao/competitive-programming | /cpp/atcoder/atcoder/abc013_4.cpp | C++ | cpp | 1,312 | no_license | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f... |
2e62e1712930991ca9bf601f079bb6b8f9d14d2f | be84c1f451828d12b0c8a6750add6b28465e4785 | xtblock/chromium | /components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc | C++ | cc | 38,086 | permissive | // Copyright 2017 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 "components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h"
#include <algorithm>
#include <limits>
#include <utility>
#... |
1ca4fde4281571b78992a8aecaef081e13564c40 | db6321e6b6361eb417555772610de2b48ac0e95a | liuxueyang/liuxueyang.github.io | /assets/src/ybt/recurrence/1312.cpp | C++ | cpp | 2,079 | no_license | // ==================================================
// C library
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
// Containers
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
// Input/Out... |
9bd2daaae0e5272b308c6daaf03878bb55a498fe | ccd56169a58e3ea73e61ae50d556f37501e8d4f3 | jacking75/book_semina_samples | /CPP11_STL/enum_01/enum_01.cpp | C++ | cpp | 1,151 | permissive | #include <iostream>
// unscoped enumeration
enum ITEMTYPE : short
{
WEAPON,
EQUIPMENT,
GEM = 10,
DEFENSE,
};
// scoped enumeration
enum class CHARACTER_CLASS : short
{
WARRIOR = 1,
MONK,
FIGHTER,
};
enum struct BATTLE_... |
2f1152eebfba93702f7c4dc256c6bf6f67e2c5fa | 5252edf7d1467ff2f9f6bf3e3dc50b69a2f1924c | leewoongi/Algorithm | /BackJoon/17406/Woon/17406.배열돌리기4.cpp | C++ | cpp | 2,876 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef struct NODE {
int r;
int c;
int s;
}node;
int map[51][51];
int init_map[51][51];
int tmp_map[51][51];
vector<node> v;
vector<int> index;
void m_init(int n, int m) {
for (int i = 1; i <= n; i++) {
fo... |
d774f5501df1f64e0841d96d606c294aecd2734d | 1b32a09eff401446349288c2ea350c86e5104d00 | Susu-kr/Class_CPP | /Chapter16/16-5.cpp | C++ | cpp | 566 | no_license | #include <iostream>
#include <string>
#include <memory>
using namespace std;
class Report {
private:
string str;
public:
Report(const string s) : str(s)
{
cout << "객체가 생성되었습니다.\n";
}
~Report() { cout << "객체가 삭제되었습니다.\n"; }
void comment() const { cout << str << "\n"; }
};
int main() {
{
auto_ptr<Report> ps... |
0419c37bfddc7e74399e44e718b9e77c5e88547e | b0c04041ba37807d914afecc0de44ddcdeafc61a | pauladams8/chromium | /content/browser/network_service_instance_impl.cc | C++ | cc | 40,799 | permissive | // Copyright 2017 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 "content/browser/network_service_instance_impl.h"
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "base/bind.h"
... |
a8baf76bb723f8d0d86594af2e78605b3b877d54 | f866c58866bf32de5d378e78e69f223e616b7b65 | BitcoinAdult/Bitcoin-Adult-Source-Code-v.1.1.0.0---New-Code | /src/qt/receiverequestdialog.cpp | C++ | cpp | 5,628 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "receiverequestdialog.h"
#include "ui_receiverequestdialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#i... |
4a76787e156c92808b2e88af72890fecd66095d0 | 715045c46f504e04d9decb31affe0736b91d7f67 | vahagnbabajanyan/learning | /qtcute/open_menu/user_gui.hpp | C++ | hpp | 1,556 | no_license | #ifndef _USER_GUI_HPP_
#define _USER_GUI_HPP_
#include <QWidget>
#include <QTableWidget>
#include <QSpacerItem>
#include <iostream>
#include <string>
#include <vector>
#include "user.hpp"
class QLabel;
class QLineEdit;
class QPushButton;
namespace gui
{
class loginUser : public QWidget
{
Q_OBJECT;
public:... |
7b43e14e6195f85a3f779e0864e85385c3304b29 | 86652aa151968dbe255a6defeb89a781996d090f | Druffel12/MemoryCpp | /Pointers 1-2/Playlist.cpp | C++ | cpp | 235 | no_license | #include "Playlist.h"
#include <iostream>
void printPlaylist(const Playlist & pl)
{
for (int i = 0; i < pl.trackCount; i++)
{
std::cout << pl.tracklist[i].TrackName << std::endl;
}
}
void shufflePlaylist(Playlist & pl)
{
}
|
0e660cfed04b22a24f4173d3f60f87d644f0c21c | 044c1dde12ea0ceff836b6c7e2d336cb21b2a757 | alvaromaoc/FIB-A-Practica | /src/grafo.cc | C++ | cc | 5,219 | no_license | #include "grafo.hh"
Grafo::Grafo(int N, bool A, int q, int D)
{
int nodos = pot(N,D);
this->id = vector<int>(nodos); // Inicializamos el vector de nodos padre, cada uno es su propio padre inicialmente
for (int i = 0;i < nodos;++i) id[i] = i;
this->sz = vector<int>(nodos,1); // Inicializamos el vector d... |
76dc175c7f35ef3071396638f14f53348819cdf1 | 0a7a49ecfeb46dcba7e891d062c58aba67173656 | akanarika/CLeetcode | /332. Reconstruct Itinerary.cpp | C++ | cpp | 676 | no_license | class Solution {
private:
unordered_map<string, multiset<string>> fromto;
vector<string> res;
void visit(string from) {
while (!fromto[from].empty()) {
string curr = *fromto[from].begin();
fromto[from].erase(fromto[from].begin());
visit(curr);
}
re... |
7d86044bc1f9fc428319fa09132e91fcde12239a | a340a3fb48c17df8a768f8383c607317527bbbc4 | svn2github/OpenMPT | /tags/libopenmpt-0.2.3773-beta4/soundlib/patternContainer.cpp | C++ | cpp | 5,688 | permissive | /*
* PatternContainer.cpp
* --------------------
* Purpose: Container class for managing patterns.
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#include "stdafx.h"
#include "patternContainer.h"
#in... |
5448e0b96722a06c45e05116a0210591e6c1e3db | f923d100e8b53edc784deee77cfb0a6d30bf929a | Error323/CORPSE | /src/Renderer/Models/ModelDrawerBase.hpp | C++ | hpp | 293 | no_license | #ifndef PFFG_MODELDRAWERBASE_HDR
#define PFFG_MODELDRAWERBASE_HDR
struct PieceBase;
class CModelDrawerBase {
public:
virtual ~CModelDrawerBase() {}
virtual void Init(PieceBase*) = 0;
virtual void Draw(const PieceBase*) const = 0;
virtual void Free(const PieceBase*) const = 0;
};
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.