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 |
|---|---|---|---|---|---|---|---|---|
5899a7b4f9dedd8580d9078ad6d9ae79ed40d399 | 5b77c489248e97942eb7feb0b9c321bc8ce7d673 | MiohitoKiri5474/CodesBackUp | /C++/CodeForces/R-466-div.2/pA.cpp | C++ | cpp | 2,172 | no_license | // by. MiohitoKiri5474
#include<bits/stdc++.h>
#pragma GCC optimize ( "O3" )
#pragma loop_opt ( on )
using namespace std;
typedef long long LL;
// define tools
#define REPP(i,f,s) for ( int i = f ; i < s ; i++ )
#define REPM(i,f,s) for ( int i = f ; i >= s ; i-- )
#define REPALL(i,n) for ( auto &i: n )
#define debu... |
60cddc30c79f6fb335d6fe67aaaca669a7e6f95f | be19e3082d31f41c881133f5ca50e36900462e1a | wcysai/CodeLibrary | /Uri/2128.cpp | C++ | cpp | 4,785 | no_license | #pragma GCC optimize(3)
#include<bits/stdc++.h>
#define MAXN 105
#define MAXM 10005
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int u[MAXM],v[MAXM],color[MAXM];
int n,m,k;
struct ColorfulMatroid{
vector<int> cnt;
... |
137ef264a3560e1173ffc4dbb53737672dd7c789 | 097c3edc12d5c06f6d6061038b446b39e38a26f1 | k124k3n/competitive-programming-answer | /codewars/vowel-count.cpp | C++ | cpp | 245 | permissive | #include <string>
using namespace std;
int getCount(const string& inputStr){
int num_vowels = 0;
for(auto i: inputStr){
if(i == 'a' || i == 'u' || i == 'e' || i == 'o' || i == 'i'){
num_vowels++;
}
}
return num_vowels;
}
|
8c0d09de3f67243c9ea66cd841b87cb57270ce9f | efaed5140be317f2205186f56c71c23f26f96063 | Krazymud/Homework | /C++/mediator/User.cpp | C++ | cpp | 2,386 | no_license | #include "User.hpp"
#include "Mediator.hpp"
#include <string>
int User::Count = 0;
User::User(const string & name, const int & money,
const vector<pair<string, int> > & dresses) {
this->name = name;
this->money = money;
id = Count++;
for (int n = 0; n < dresses.size(); n++) {
Dress temp(dresses[n].first, dresse... |
88e08b7e325cc2208c1d840c342d9573afb948ec | 4af94067ffdd4f84476223bd790f53ccdf7021ba | ryohey/OpenCV-CLM | /OpenCV-CLM/OpenCV_CLM.cpp | C++ | cpp | 4,680 | no_license | ///////////////////////////////////////////////////////
// Constrained Local Model (CLM) Demonstration
//
// Written by:
// Xiaoguang Yan
// Email:
// xiaoguang.yan@gmail.com
// Homepage:
// http://sites.google.com/site/xgyanhome/
// Version:
// 0.9
// Date:
// June, 2011.
//////////////////////////... |
fa7ca79d2ecfc7f2a10647c9726ab79c00c89688 | 6a0d7b001ca59c672370be909aead2804353d384 | raz-ai/hifi | /libraries/entities-renderer/src/RenderableShapeEntityItem.cpp | C++ | cpp | 11,770 | permissive | //
// Created by Bradley Austin Davis on 2016/05/09
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "RenderableShapeEntityItem.h"
#include <glm/gtx/quaternion.hpp>
#i... |
3f89d7992633cda0ca931235d81c9f11f43c7252 | 6606a20f731af6870efec35181b96722f239c7ba | lxq2537664558/Source2 | /src/common/CsvFile.cpp | C++ | cpp | 3,005 | permissive |
#include "../sphere/threads.h"
#include "CException.h"
#include "CExpression.h"
#include "CsvFile.h"
#include "common.h"
CSVFile::CSVFile()
{
m_iColumnCount = 0;
m_iCurrentRow = 0;
m_pszColumnTypes[0] = NULL;
m_pszColumnNames[0] = NULL;
}
CSVFile::~CSVFile()
{
for (int i = 0; m_pszColumnTypes[i... |
f7506329f7754fa1001476c63ecec008ab44fd3c | 7b1df3a47cbb419a697b543aa9dd07662486045b | AkiLotus/AkikazeCP | /Vault/ACMandOI/Thay Tung 18-08-01/LAZER/LAZER_generator_3.cpp | C++ | cpp | 2,418 | no_license | #include "testlib.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <ctime>
#include <climits>
#include <cassert>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#inclu... |
77eeef02455db7d20db825879b3815ad6cb19989 | 4455f2dbd0629ff4709d54eca2b37a34e140d2a9 | gurjotsingh4398/Leetcode-solution | /118.Pascal'sTriangle.cpp | C++ | cpp | 492 | no_license | https://leetcode.com/problems/pascals-triangle/
class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> arr(numRows, vector<int> (1, 1));
for(int i = 1; i <numRows; i++) {
for(int j=1;j<=i;j++) {
if(i==j) {
arr[i]... |
a6d97eae59eb38a430152f3c13e7f95e6771f92f | 9bce09fffec02c9c9200d7a16ccce97e8a167931 | tomatrow/ucsd-cse100-programming-assignment-03 | /DictionaryBST.cpp | C++ | cpp | 583 | no_license | #ifndef DICTIONARYBST_CPP
#define DICTIONARYBST_CPP
#include "util.hpp"
#include "DictionaryBST.hpp"
/* Create a new Dictionary that uses a BST back end */
DictionaryBST::DictionaryBST(){}
/* Insert a word into the dictionary. */
bool DictionaryBST::insert(std::string word) {
return myDict.insert(word).second;
}
... |
0b9463b527b7124ce3a66bee1d8d53ae8de53661 | 69c75fb191a13d877b310f66726d30e953ed1812 | tyhenry/dt_openframeworks_2018 | /week06/01_particle_system/src/Particle.hpp | C++ | hpp | 397 | no_license | //
// Particle.hpp
// wk06_particle_system
//
// Created by Tyler Henry on 10/2/18.
//
#pragma once
#include "ofMain.h"
class Particle {
public:
Particle();
Particle(glm::vec2 _pos, glm::vec2 _vel, float _mass);
void applyForce(glm::vec2 force);
void update();
void draw();
... |
dabac9e3414c176695caae5f004ee8a9ab4a0aa3 | e6f27163a8f07b48ad86afc230313e069904da4a | bagnz0r/Carla | /source/modules/dgl/ImageSlider.hpp | C++ | hpp | 3,143 | no_license | /*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
... |
455739e47879d5c04a57d174bd2b85cba1fe15ce | 4c8bc04d4ab2205f862f23af651739cbbbb54762 | NataliaPopkova/asteroids_linux | /Laser.cpp | C++ | cpp | 723 | no_license | #include "Laser.h"
void Laser::Move(double elapsedTime) {
// Laser moves
Point2D_d speed{0, speed_};
rotate(rotation_, speed);
position_.x += speed.x;
position_.y += speed.y;
fire_timeout_ += elapsedTime;
}
bool Laser::IsOut() {
// Returns true if the Laser is out of the screen area so ... |
d848a8a29c4c50898b7fb5fee9c42219058b4da3 | af66565b4f2f2b97a37ae37bfb58cd50be07bce7 | mfkiwl/cheetah_inekf_lcm | /src/kin/Jvs_Body_to_FrontLeftFoot.cpp | C++ | cpp | 3,404 | permissive | /*
* Automatically Generated from Mathematica.
* Fri 13 Nov 2020 16:04:46 GMT-05:00
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "Jvs_Body_to_FrontLeftFoot.h"
#ifdef _MSC_VER
#define INLINE __forceinline /* use __forceinline (VC++ specific) */
#else
#define INLINE static inline /... |
d9cf67d0fcb27bb7d7634569e95d701061ad159c | e9a0ebe830d78bc59feb3fe91545504f024f292e | woolongcoin/woolongcoin | /src/qt/bitcoingui.cpp | C++ | cpp | 34,773 | permissive | /*
* Qt4 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2012
* The Litecoin Developers 2011-2013
* The WoolongCoin Developers 2013
*/
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
#include "sendcoinsdialog.h"
#include "signverifymessagedialog.... |
a62f112c4746330a604d70b41ae59460c74372f2 | 6d32f896f60669e736be3aae597e9beeb14325bc | fengjixuchui/cfi-eval | /cbench/cross_DSO/callback/object/injection/lib.cpp | C++ | cpp | 562 | permissive | #include "lib.h"
#include <cstdio>
#include <iostream>
#include <string>
void Execute(Admin *admin, User *user_a, User *user_b) {
std::cout << "Admin registration:" << std::endl;
admin->SetName();
admin->AdminStuff();
std::cout << "UserA registration:" << std::endl;
user_a->SetName();
user_a->AdminStuff(... |
9472b2b913dfd4bfce47078ef68bd21877bca051 | 81dc85e4a2a5bb5eced370ca5393ef42182d7afc | alexhein189/code-plagiarism-detector | /data/russia-team-e/sources/503-e-3.cpp | C++ | cpp | 2,764 | no_license | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
struct city {
string pre;
string cod[101];
int ncod;
};
city arr[101];
string s,ss,sss,now,now1,now2;
int n,m;
bool flag,superflag;
void Format(string sss) {
if (sss.length() == 3) co... |
90dbe7ce7272b2acb91fac41b80e9c6ac1c1ce2d | 60d7ecb8f31e327fd5b8218054c8aab8371cf028 | ECS-251-W2020/chromium | /cc/input/scrollbar_animation_controller.cc | C++ | cc | 12,303 | 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 "cc/input/scrollbar_animation_controller.h"
#include <algorithm>
#include "base/bind.h"
#include "base/numerics/ranges.h"
#include "base/time/t... |
f434624873c2212b5ba51a25b06e67bf1ddf41fa | 4a26d3b8f6f5664212f536dc09c3b69f3ecb7481 | tgittos/sdlbase | /src/Game.cpp | C++ | cpp | 434 | no_license | #include "Game.h"
Game::Game()
{
set_title("My Game", "My Game Icon");
}
void Game::onEvent(SDL_Event* e)
{
switch (e->type)
{
case SDL_QUIT:
m_running = false;
break;
}
}
void Game::onDraw()
{
//Open GL stuff
//GLDraw::SetColour(0, 0.5, 0.5);
//GLDraw::Square(10, 10, 100, 100);
//DirectX stuff
d3d... |
40583065865fafe44dd11c304be23b87634664cf | f579f2242a766006d6fc0df7b07297abd4f04ff6 | Volpanic/AIForGamesAie | /AIForGamesAie/AIForGamesAie/FishGame/LevelEditorState.cpp | C++ | cpp | 21,512 | no_license | #include "LevelEditorState.h"
#include "raylib.h"
#include "FollowPathBehavior.h"
#include "Graph2DEditor.h"
#include "Numbers.h"
#include "FollowPathBehavior.h"
#include "ObjectFactory.h"
#include "GameStateManager.h"
#include "UnderwaterLevelState.h"
#include "ObjectTracker.h"
#include "tinyxml2.h"
//#include "imgu... |
f45ef08eceba37a2a6bcd51b7cda23b3868498b1 | 2a7cd65d2f34b30000ad1aa96dc2f90e9ad4275f | LiunxPaisley/LeetCode | /022. Generate Parentheses/22. Generate Parentheses/22. Generate Parentheses.cpp | C++ | cpp | 790 | no_license | #include <iostream>
#include <vector>
#include <string>
using namespace std;
class Solution {
public:
void func(vector<string>& vec, string s, int left, int right, int wait) {
if (left == 0 && right == 0 && wait == 0) {
//cout << "s = " << s << endl;
vec.push_back(s);
return;
}
if (!left) {
func(ve... |
907aaacad57de5953ce6d871fe682a9d05e44704 | 111fe2b7ec31e3f68b53e8cacfd757dce603214e | vihanchaudhry/Cookie-game | /src/main.cpp | C++ | cpp | 9,814 | permissive | #include <SFML/Graphics.hpp>
#include <ctime>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <vector>
#include "main.h" //contain prototype of enum GAME_STATE, so when file compile, they have prototype in -> link all file
#include "ResourcePath.h"
#include "Overlap.h"
#include "OpeningScreen.... |
fb6c494e7d736448075227798c094f260b5ba601 | 179b51f540a412afe3cca3685d41e3577b103628 | Watch-Later/EasyDX | /EasyDx/DependentGraphics.hpp | C++ | hpp | 5,720 | permissive | #pragma once
#include <DirectXMath.h>
#include <d3d11.h>
namespace dx
{
class IndependentGraphics
{
private:
wrl::ComPtr<ID3D11Device> device3D_;
wrl::ComPtr<ID3D11DeviceContext> context3D_;
wrl::ComPtr<ID2D1Factory1> fanctory2D_;
wrl::ComPtr<ID2D1Device> device2D_;
... |
9aca28e58f199041eab3a867100a23c937b4b5b9 | 0b813e609ede5249cc7aa8d14cda28fe1a4006ae | zugarzeeker/Comsys | /lab04/fulladder/adder/sc_main.cpp | C++ | cpp | 1,618 | no_license | //------------------------------------------------------------------
// Simple Testbench for 4-bits adder file
//
// SystemC for VHDL engineers
// (c)www.ht-lab.com
//------------------------------------------------------------------
#include <systemc.h>
#include "adder.h"
#include "stim.h"
#include "chec... |
84e545f6c0a12f9e3c9d867b4cd9705470e9db04 | 66ec243a44e614700672667fac7918d5798743b8 | boss14420/Crypto-example | /sha3/cpp/main.cc | C++ | cc | 1,558 | no_license | /*
* =====================================================================================
*
* Filename: main.cc
*
* Description:
*
* Version: 1.0
* Created: 11/30/2014 05:52:50 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
... |
7241db121f54b74865c39dfcbe0e9055d2f32886 | c3686dcce7386cfb74bd4f2ca27de4afa0c4ac25 | softchicken/POLSKI-SPOJ | /977 TABLICA.cpp | C++ | cpp | 469 | no_license | /*
POLISH SPOJ
http://pl.spoj.com/problems/TABLICA/
https://github.com/softchicken/
*/
#include <iostream>
using namespace std;
int main()
{
int myArray[100];
int cellValue,counter=0;
while(cin>>cellValue) //VALUES SAVE TO THE ARRAY CELLS
{
myArray[counter]=cellValue;
... |
95e8bff91a87f743f9d54cb12edb4cfbe121efd9 | 83c9c9bf27e15848aaef509ab98e6c52a8e854e3 | flueke/marabou | /gutils-new/src/TNGMrbTextButton.cxx | C++ | cxx | 8,399 | no_license | //__________________________________________________[C++ CLASS IMPLEMENTATION]
//////////////////////////////////////////////////////////////////////////////
// Name: gutils/src/TNGMrbTextButton.cxx
// Purpose: MARaBOU graphic utilities: a list or group of text buttons
// Description: Implements cla... |
1a23da1c680ca6eaba9346167de3b61830357c06 | 111b7022487bb80138556cf4c50ebe7c2c3bc6a8 | alufers/zadanka | /oboz/pal/pal3.cpp | C++ | cpp | 395 | no_license | #include <iostream>
#include <string>
using namespace std;
int main() {
long n;
cin >> n;
for (int i = 0; i < n; i++) {
string slowo;
cin >> slowo;
bool pali = true;
for (int k = 0; k < ((int)slowo.size() / 2); k++) {
if (slowo[k] != slowo[slowo.size() - 1 - k]) {
pali = false;
... |
d480bfca8eec7d88a2a3c774afb1b8d9a490a6d0 | e0f6ed4835ce35786773adcb29624e6170f5baf8 | lawtonsclass/f20-code-from-class | /csci40/midterm2review/counter.cpp | C++ | cpp | 777 | no_license | #include <iostream>
using namespace std;
class Counter {
public:
Counter(int c = 0); // constructor
void inc();
// getter/accessor: gives back the count
// const because it doesn't change anything
int getCount() const;
private:
// usually, all your member vars are private
int count;
};
Counter::Coun... |
2c4767eb37747f3f225b7ec6ae9cd35431d62291 | e512843163bd68df79075b18bbb763e225197848 | micander/aerial_control | /variants/platforms/stm32f4discovery/platform.cpp | C++ | cpp | 756 | permissive | #include "variant/platform.hpp"
#include "hal.h"
#include "variant/i2c_platform.hpp"
#include "variant/pwm_platform.hpp"
#include "variant/spi_platform.hpp"
#include "variant/usart_platform.hpp"
Platform::Platform() {
}
template <>
I2CPlatform& Platform::get() {
static I2CPlatform i2cPlatform;
return i2cPlatfor... |
6d0ba78e646418ac1f1eccbdd7bee898fa66e5e4 | b89a552881cb9b16b405b54c95ecd6989824a73c | baidu/BaikalDB | /baikal-client/src/baikal_client_manager.cpp | C++ | cpp | 20,863 | permissive | // Copyright (c) 2019 Baidu, 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 by applic... |
ba83739912a22d91f199201b3438003da0cf02a8 | 7a8d013ff106b48c394160317519651901a4d4f4 | ericmpereira02/Programming-in-a-second-language | /Assignment 3/listGCD.cpp | C++ | cpp | 5,982 | no_license | /*
Author: Eric Pereira
Course: CSE2050
Assignment: Linked List Manipulation
*/
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
//class below creates a node
class Node {
//variables are set to private, only to be accessed by the node it... |
e5925e52141262899ca8cea5c266fae9a4570c04 | bf3714e0c200ab0048c7c35190bcb123aa416f3f | not-a-wjbu-war/Source-Code | /codeforces/B. Construct the String.cpp | C++ | cpp | 663 | no_license | /**
* authur: Bao Trung (Koi` Cute)
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define all(x) (x).begin(), (x).end()
#define set_arr(a,n); int a[n+5]; for(int i=0;i<n;i++)cin>>a[i];
#define set_vect(a,n); vector<int>a(n); for(auto &z : a)cin>>z;
const int mod ... |
020667025bba1d213e46b6bebd2d606dddb73a41 | 9ef56feb9261e3f3a89b5ac1a5e0ff530f2b822e | vandersonmr/ProgrammingContest | /URI/1379.cpp | C++ | cpp | 292 | no_license | #include <stdlib.h>
#include <stdio.h>
#include <algorithm>
int main() {
int a, b;
while(scanf("%d %d\n", &a, &b)) {
if (a + b == 0) break;
int c = -1000000000;
int m = (c + a + b) / 3;
if (std::min(a, b) >= m && std::max(a,b) <= m) {
}
}
return 0;
}
|
bd02045272f3f6e5b7f46fee69e65a09fda78a53 | 617c94469b2fa8d412acbe69c4bb1352e57a3f73 | mrNoactiv/DDL_Procesor-new | /Framework/common/compression/cUniversalCoderFastEliasFibonacci.cpp | C++ | cpp | 10,493 | no_license | #include "cUniversalCoderFastEliasFibonacci.h"
#include "cUniversalCoderFibonacci2.h"
#include "log256table.h"
#include "math.h"
#define SEGMENT 32
#define SEGMENT_FILTER 0xff
#define SEGMENT_TYPE unsigned int
#define IGNOREFASTARRAY 1
#define DIRECTWRITE 1
#define X64
// #define X32
#define TAB256
//#define BSRI
//#d... |
42d489324eb9203ee3a1b358a9fd308a390e4838 | bef231ad30c3e04a81bedafc0e86f0bb0a82af5a | flydagger/MeishanConcilManagementSystem | /client_server/concil_management_system_server/mainwindowserver.cpp | C++ | cpp | 48,874 | no_license | #include "mainwindowserver.h"
#include "ui_mainwindowserver.h"
#include "changepassword.h"
#include "adddata.h"
#include "querydata.h"
#include "exportdata.h"
#include "./QXlsx/xlsxdocument.h"
#include "./QXlsx/xlsxchartsheet.h"
#include "./QXlsx/xlsxcellrange.h"
#include "./QXlsx/xlsxchart.h"
#include "./QXlsx/xlsxric... |
d5c7ec4ad2c099e73d75d869067f51ef41fc9e43 | 2d077846196bdaf5183f6ee43ab582ede4ef4f52 | priyanshu-max/tensorflow | /tensorflow/compiler/xla/service/hlo_computation.cc | C++ | cc | 28,336 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
14376808cc383b5ef28815d9d21b982d6f62c320 | e5b7711b4b2bdd4ddf9edf142ac3c7c0b558f6c1 | Udayadroit/inventory-extraction | /src/gui/ParsingThread.cpp | C++ | cpp | 274 | permissive | /*
* ParsingThread.cpp
*
* Created on: 04.02.2010
* Author: sebastianc
*/
#include "ParsingThread.hpp"
namespace impact_tr4 {
ParsingThread::ParsingThread()
{
}
virtual void ParsingThread::run()
{
}
} // end of namespace impact_tr4
|
d18f870ef7f896eab3eeed978058c906b29585d5 | 3e7294e21b9aa9a044f0037c8cdfe477760317d6 | kawaxiaobao/webkit | /Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_color_picker.cpp | C++ | cpp | 5,547 | no_license | /*
Copyright (C) 2012 Samsung Electronics
Copyright (C) 2012 Intel Corporation. All rights 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 ... |
5c41b90c3c2e7e9931789a11eade6787e93b7c60 | 35fd2dd8a6969317a123e8d9e66b9db6d5fa2345 | diosmosis/node-bind | /node-bind/worker.hpp | C++ | hpp | 1,657 | permissive | ///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Benaka Moorthi
//
// 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)
//
//////////////////////////////////////... |
485e05d220ee716e767a5f065b072de737395a12 | b280b30e859cc57d62456a532041e600386775cb | coins-archive/RLD | /src/spork.cpp | C++ | cpp | 11,399 | permissive | // Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2019 The RLD developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "spork.h"
#include "base58.h"
#i... |
77db0754147f8659d4da064ffaa99a35699c580d | f85d1d43336d870456156d2dca40210a00ceb651 | pauljoo28/llvm-project | /clang/test/OpenMP/nvptx_parallel_codegen.cpp | C++ | cpp | 17,347 | permissive | // Test target codegen - host bc file has to be created first.
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia... |
1922daa8d5b5226ee54d9f14299f42a0ecf43c2a | ccdd1607c1dccddc143fdae0bfb926675df34ac8 | sauravjaiswa/Coding-Problems | /6th sem Technical Training/Mock Placement Practice/Practice2_Q7.cpp | C++ | cpp | 1,572 | no_license | /**Suppose you are given an array of n integers, and you need to find all pairs of values in the array (if any) that sum to a given integer k.
write code that performs this task for you and outputs all of the pairs that it finds.
For example, if k is 12 and the array is {10, 4, 7, 7, 8, 5, 15}, your code should output ... |
bb35816091f6b21cbe6dac3dc168679b7275fa66 | 170abd80a2b86e40bc85722aeb2c6c8ffd559e61 | andyburke/bitflood | /cpp/extern/xercesc++/2.6.0/src/xercesc/framework/psvi/XSAttributeDeclaration.cpp | C++ | cpp | 6,342 | permissive | /*
* Copyright 2003,2004 The Apache Software Foundation.
*
* 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 re... |
41f08508787541e5a0b6abe2e710ad804e2786c5 | 821a807061b2e4d73341dc8a4e9ca2620510927a | AkiLotus/AkikazeCP | /Vault/Codeforces Problems/626D.cpp | C++ | cpp | 13,079 | no_license | /**
Template by Akikaze
Applied for C++11/C++14 (Add -std=c++14 to your IDE.)
To make it compatible to C++98, remove all tuple typedefs,
unordered sets/maps/multisets/multimaps, and add a space
between two '<'/'>'s when declaring multi-dimensional vectors.
**/
/**
Code written by a random fan of momocashew and C... |
be4cc43b859869db7b760b5d81a09eb5bd0ceac0 | 15d2dff5250700e2626f10a4e8e599be22466dbf | araobp/spielzeug | /robot/esp8266_agent/l3gd20.cpp | C++ | cpp | 1,498 | no_license | #include "Arduino.h"
#include "l3gd20.h"
#include "i2c.h"
// Gyro/temperature sensor L3GD20
// L3GD20 device address (7bit)
const byte L3GD20 = B1101011;
// Register list
const byte WHO_AM_I = 0x0f;
const byte RES_OK = 0xd4;
const byte CTRL_REG1 = 0x20;
const byte OUT_TEMP = 0x26;
const byte OUT_X_L = 0x28;
const by... |
e569e2aadac7805815b1bb2580aff2c4f48c0290 | 801fc22e6fc83f13d642895d3e1ca88529c7eb41 | luigi-rosso/flutter-desktop-embedding | /library/common/internal/incoming_message_dispatcher.cc | C++ | cc | 2,228 | permissive | // Copyright 2019 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 ... |
d9d1d4774a9cd91d52503e7c345113b9a54c1629 | b3d2564801b539f3f65469ee748dfb2b063b432f | icaas/MachOExplorer | /moex-gui/src/view/mainwindow.cpp | C++ | cpp | 4,661 | permissive | //
// Created by everettjf
// Copyright © 2017 everettjf. All rights reserved.
//
#include "mainwindow.h"
#include <QDockWidget>
#include <QMenuBar>
#include "../utility/utility.h"
#include <QFileDialog>
#include "../controller/workspacemanager.h"
#include "../dialog/checkupdatedialog.h"
#include "../common/appinfo.h... |
f731866fdadf0cab465b5cc6fedb9c4fd7d4272d | 6bbb18050e0113b79dd8edfa5d05b17edbebb7d3 | DanielMaydana/FJALA-mod2 | /Eto/A/Dojo1/main.cpp | C++ | cpp | 895 | no_license | #include <iostream>
#include "sistema_facturacion.h"
#include "factura.h"
#include "fecha.h"
using namespace std;
int main(){
sistema_facturacion sf;
fecha t;
cout<<t.dia<<"\n";
cout<<t.mes<<"\n";
cout<<t.anio<<"\n";
sf.agregar_producto("Leche", "PIL", "1245235423451", 50, 5);
... |
cf1a9a2c59138de309936c1f47ce5a5d9416d44e | 600d8305378782913aecbadb42bcf04848201a2a | namralkeeg/qkeeg | /src/common/enums.hpp | C++ | hpp | 4,612 | permissive | /*
* Copyright (C) 2017 Larry Lopez
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish... |
953a2a8321cb7d42a5f919eb9cd030e1071b655a | debc3c76ce69035458f843fd36f5503e61329bde | CyanogenMod101Y300/android_hardware_qcom_media-caf | /dashplayer/DashFactory.cpp | C++ | cpp | 2,089 | no_license | /*
*Copyright (c) 2013, The Linux Foundation. All rights reserved.
*Not a Contribution.
*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Lic... |
6d37eddce0e035a84bdcd2a11d8e81c026da74c4 | 1acec1e162743e25dc3d72dcc65fcce93be9f5cb | zaourzag/chromium | /chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc | C++ | cc | 38,897 | 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 "base/base64.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_... |
fd1a6e08535ab9e4a03c38161ea61e46158c56d0 | 71319cc204e815139aa45176600d2145865da8d8 | joshuabezaleel/cp | /spoj/KQUERY.cpp | C++ | cpp | 1,460 | no_license | #include <algorithm>
#include <cstdio>
using namespace std;
#define getchar_unlocked getchar
int getint(){
int ret = 0;
char ch = getchar_unlocked();
while ((ch < '0' || ch > '9') && ch != '-') ch = getchar_unlocked();
do ret = (ret<<1)+(ret<<3)+ch-'0';
while ((ch = getchar_unlocked()) && ('0' <= ch && ... |
d3ab6a277551d6551347378ee696245a57c491f0 | 6a05a2e2fefc5b8ab29d270bc184025bd64ebb88 | Urielzm/ComputacionGraficaAvanzada | /03-Terrain/src/main.cpp | C++ | cpp | 44,501 | no_license | #define _USE_MATH_DEFINES
#include <cmath>
//glew include
#include <GL/glew.h>
//std includes
#include <string>
#include <iostream>
//glfw include
#include <GLFW/glfw3.h>
// program include
#include "Headers/TimeManager.h"
// Shader include
#include "Headers/Shader.h"
// Model geometric includes
... |
4c9a50e6bedb18cea0a4614649d9c4ebe8ebf820 | 30b9e154b9ed6e2ec0586f0e9a152990f5d69eb5 | naveen700/CodingPractice | /basics/calSimpleInterest.cpp | C++ | cpp | 336 | no_license | #include <iostream>
using namespace std;
int main(){
int p,r,t;
float si;
cout<<"Please Enter Principal Amount\n";
cin>>p;
cout<<"Please Enter Rate of Interest"<<endl;
cin>>r;
cout<<"Please Enter time\n";
cin>>t;
si= (p*r*t)/100.0;
cout<<"Simple interest is "<<si<<"\n";
... |
4ff39e1986df3fe72183ee575176f0ebdfee831a | ff26ddae61d362d2f7a1b3c24c5f97237be1d86f | tomevoll/stonecoin | /src/test/sanity_tests.cpp | C++ | cpp | 659 | 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 "compat/sanity.h"
#include "key.h"
#include "test/test_stonecoin.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXT... |
a6cb1534a7115226b3bcac27d8e8e1b6c5d7c2ac | e44c2168621a52b828c26c287a7991395a7e4f09 | busstoptaktik/PROJ | /src/projections/oea.cpp | C++ | cpp | 2,895 | permissive | #define PJ_LIB_
#include <errno.h>
#include "proj.h"
#include "proj_internal.h"
#include <math.h>
PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta=";
namespace { // anonymous namespace
struct pj_opaque {
double theta;
double m, n;
double two_r_m, two_r_n, rm, rn, hm, hn;
double cp... |
8e02fc601fb80d0acaf595b5679681efde5df22a | 8bc83356e0439e6bef7c4129b9b2ba74306eb5fd | Ii-xD-iI/USACO | /silver/2019/December/P1. MooBuzz.cpp | C++ | cpp | 588 | no_license | using namespace std;
#include "bits/stdc++.h"
#define len(X) (X).size()
#define int long long
void IO(string Bessie);
int32_t main() {
IO("moobuzz");
int n,k=0, r=4e18,l = 0;
cin>>n;
while(l!=r) {
int mid = ((l+r)>>1);
k = mid-(mid/3+mid/5)+mid/15;
if(k < n) l=mid+1;
else r=mid;
}
cout << r;
... |
fc2d097f6e218e4c306ea9e92d1eac04ce59dc91 | b63cdd6a8ff3a2139664ada2dc9c3ba16eb12e76 | jcfr/bender | /Modules/Loadable/Armatures/Logic/vtkSlicerArmaturesLogic.cxx | C++ | cxx | 15,171 | permissive | /*=========================================================================
Program: Bender
Copyright (c) Kitware 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.a... |
5e93e1787d6b8399e70c96b6ff11de976e2db613 | 0fb0e82da01bc768cc681495aaafd4a04c5a2713 | skudella/BoostedTTH | /BoostedAnalyzer/interface/TTbarReconstructionVarProcessor.hpp | C++ | hpp | 978 | no_license | #ifndef BOOSTEDTTH_BOOSTEDANALYZER_TTBARRECONSTRUCTIONVARPROCESSOR_HPP
#define BOOSTEDTTH_BOOSTEDANALYZER_TTBARRECONSTRUCTIONVARPROCESSOR_HPP
#include "BoostedTTH/BoostedAnalyzer/interface/TreeProcessor.hpp"
#include "BoostedTTH/TTHReconstruction/interface/ReconstructionQuality.hpp"
#include "BoostedTTH/TTHReconstruct... |
47d3c98f247f1b77f4ed829da44adbd9c0dd1b26 | e55f4893357da68ee08f517465d60c7c99fb2050 | AlexzDK/SquadSDK2021 | /SDK/AKS74U_Skeleton_AnimBlueprint_functions.cpp | C++ | cpp | 1,895 | no_license | // Name: Squad, Version: 13-01-2021
#include "../pch.h"
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
/*!!HELPER_DEF!!*/
/*!!DEFINE!!*/
namespace UFT
{
//---------------------------------------------------------------------------
// Functions
//-------------------------------------------------------------------... |
61e4c439299f76afa9384acad9c784b4d20b1acc | ca15cacaa043378abdfead4500dc22af3af94331 | wangfuli217/ld_note | /cheatsheet/ops_doc-master/Service/cfaq/example_c/class_static_member/main.cpp | C++ | cpp | 1,044 | no_license | #include <stdio.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
class A {
public:
void show() { cout << "Name: " << "A" << endl;}
private:
static void version() { cout << "version: " << 1.00 << endl; }
};
class B {
public:
void show() { cout << "Name: " << "B" << endl;}
public:
stati... |
f4835bedbb64ca2eaca30247f714c62a3861ab49 | c7215e88ec6ef5e85d766e8d58cae158dd6c46bd | mueslimak3r/42_cpp_piscine | /d00/ex01/C_contact.cpp | C++ | cpp | 1,698 | no_license | #include "C_contact.hpp"
static std::string keyword(int index)
{
static const std::string grammar[11] = { "first name", "last name", "nickname",
"login", "postal address", "email address",
"phone number", "birthday date", "favorite me... |
a38be347a6294e178359807a298d6bf06f3ed35c | 04e2aa0a8b4641c1d4bee6468da8764e3bea02c8 | lkkikkil/C-study | /알고리즘/1476/1476/1476.cpp | C++ | cpp | 309 | no_license | #include <iostream>
using namespace std;
int main() {
int E{ 0 }, S{ 0 }, M{ 0 };
cin >> E >> S >> M;
int year{ 1 };
while (!(E == 1 && S == 1 && M == 1)) {
E--;
S--;
M--;
year++;
if (E == 0) {
E = 15;
}
if (S == 0) {
S = 28;
}
if (M == 0) {
M = 19;
}
}
cout << year;
}
|
4e6db405a6f0bfffb4df9836044e9e82da6b1511 | 64cc5909df78f5703d45a45373cf6d6a35ac6649 | sysidos/swift-source | /swift/lib/Sema/SourceLoader.cpp | C++ | cpp | 6,013 | permissive | //===--- SourceLoader.cpp - Import .swift files as modules ----------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
2ad4c31881a6b2de2ce329bf75d2cb8a876a6488 | 39f773ce116fe4c39825166c9f83855777cef53f | alandreamsbig/CS432 | /Project/Camera.cpp | C++ | cpp | 7,847 | no_license | #include "Camera.h"
#include <cmath>
Camera::Camera()
{
eye = vec4(0,1,0,1);
up = vec4(0, 1, 0, 0);
n = vec4(0, 0, 1, 0);
u = normalize(cross(up, n));
v = normalize(cross(n, u));
at = eye - n;
createViewMatrix();
}
void Camera::printCamera()
{
std::cout << "eye: " << eye << " up: " << up << " v: " << v... |
7799081a8938e9f43984e15b45867f419a8d78e9 | 1348a309091ef6cc871faddc669beffda231ca3c | nims11/coding | /Codechef/sept12long/CHEFWD.cpp | C++ | cpp | 1,524 | no_license | /*
Nimesh Ghelani (nims11)
*/
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<map>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<utility>
#define in_T int t;for(scanf("%d",&t);t--;)
#define in_I(a) scanf("%d",&a)
#define in_F(a) scanf("%lf",&a)
#define in_L(a) scanf("%l... |
0575801e0e77de857e078f7ae6e94b64458c5ff9 | dd2c6eafabb7b64080e3584f3ea97e384f2512de | unalesra/CircularDoublyLinkedList | /CircularDoublyLinkedList/include/ListCreator.hpp | C++ | hpp | 267 | no_license | #ifndef LISTCREATOR_HPP
#define LISTCREATOR_HPP
#include "FileReader.hpp"
class ListCreator {
private:
CircularDoublyLinkedList* list;
FileReader fileReader;
int biggestObeb;
public:
ListCreator();
void CreateList();
~ListCreator();
};
#endif // !LISTCREATOR
|
8af7f1ddea59cef027e7c6a32c5632971f6fcd55 | 3a05804fddd0873d9fdb51ea96563cc14da244a0 | MaxFunProger/Roots-of-polynomial | /School_1/Source.cpp | C++ | cpp | 3,010 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
#include <string>
#include <map>
#include <set>
#include <iomanip>
#include <math.h>
const double kEps = 1e-9;
const double kEpsFunc = 1e-9;
const double kInf = 1e9;
int nn, mm;
double aa, bb, cc, dd, pp;
std::vector<double> input_vector;... |
70e945d7d5a403200c2d1edadb4e9cf5fb2ad543 | 57b1d234c90105db23ff950e6820166cc7878a34 | CorsicaL/Algorithm_Practice | /ABC115/c.cpp | C++ | cpp | 383 | no_license | #include <bits/stdc++.h>
#define MAXN (100010)
int h[MAXN];
int main() {
int n, k;
scanf("%d%d", &n, &k);
for (int i = 1; i <= n; ++i) {
scanf("%d", &h[i]);
}
std::sort(h + 1, h + n + 1);
int hmin = INT32_MAX;
for (int i = 1; i + k - 1 <= n ; ++i) {
hmin = std::min(hmin, h... |
5b5b13f0d54bcb871d04c5c7b610ad8d1a949577 | d3ecd3e1334bc64b43fde3160ae7d2f240de4ce6 | KendrickAng/competitive-programming | /kattis/supercomputer/supercomputer-segment.cpp | C++ | cpp | 2,529 | no_license | #include <bits/stdc++.h>
using namespace std;
class SumSegmentTree {
private:
const int ROOT = 1;
int lChild(int i) {
return 2*i;
}
int rChild(int i) {
return 2*i+1;
}
public:
int n;
vector<int> tree;
SumSegmentTree(int n) {
this->n = n;
tree.assign(4*n,... |
34ea7e85cf889156f0fa4a5be167ae5a671cb839 | f8f87c8cd4ed29a150bf4513af6d93df2d3499c3 | SolBaa/fire_simulator_cpp | /src/Particle.cpp | C++ | cpp | 831 | no_license | #include "Particle.h"
#include <math.h>
#include <stdlib.h>
namespace scr
{
Particle::Particle() : m_x(0), m_y(0)
{
init();
}
void Particle::init()
{
m_x = 0;
m_y = 0;
m_speed = (0.04 * rand()) / RAND_MAX;
m_direction = (2 * M_PI * rand()) / RAND_MAX;
... |
d46b550ceadfb8428479a8b00d1d742ad1119f10 | c7aa2be8cc92e57f655b30f7c4570260cfbfb15f | fenggeorgeyu/mapd-core | /QueryEngine/RelAlgTranslatorGeo.cpp | C++ | cpp | 39,791 | permissive | /*
* Copyright 2017 MapD Technologies, 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 o... |
0ca29450830919ea69b6140b890d846ac7078cd4 | 58ab0bf1918c3abc154d8b7e6d0c944cd71b50a9 | MChorfa/llvm-js-backend | /lib/CodeGen/RegAllocFast.cpp | C++ | cpp | 38,765 | permissive | //===-- RegAllocFast.cpp - A fast register allocator for debug code -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
c7e371ecde20403e5f0a71380f90a8839f5f7c5e | 243c69a8317bdd69fcb66a34e757b005a453e71a | hixio-mh/indielib-crossplatform | /IndieLib/tools/editor_tileless/Node.cpp | C++ | cpp | 2,634 | permissive | /*****************************************************************************************
* File: Node.cpp
* Desc: Node class. Each node is a backdrop of the map that contains an IndieLib entity
* that holds all its attributes
**********************************************************************************... |
3690777faf69ef7c226b3cd47c4f0a1a07c27261 | 147a92d2a6b2162ae687f3b7610ea665e78c6494 | soulsheng/magma | /src/ssytrd2_gpu.cpp | C++ | cpp | 10,729 | no_license | /*
-- MAGMA (version 1.4.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
August 2013
@author Raffaele Solca
@author Stan Tomov
@generated s Tue Aug 13 16:44:31 2013
*/
#include "common_magma.h"
#define A(i, j) (wa+(j)*... |
e6aa4b0ddfe0e49a61f19e8041f84cc97169e660 | 1b8f3ad6ef2c6cb4f251c891a9e53d785fac22c0 | sugatmankar/crimild | /core/src/Debug/DebugRenderComponent.cpp | C++ | cpp | 572 | permissive | #include "DebugRenderComponent.hpp"
#include "DebugRenderHelper.hpp"
#include "SceneGraph/Node.hpp"
using namespace crimild;
DebugRenderComponent::DebugRenderComponent( const RGBAColorf &color )
: _color( color )
{
}
DebugRenderComponent::~DebugRenderComponent( void )
{
}
void DebugRenderComponent::renderDebugI... |
90b0d24a8cbefadf0cfcf4d17aa697c0dca0b674 | 83e84097cc228867ee62d58c03961b4e4a49e57a | houqing/tensorflow | /tensorflow/compiler/xla/service/shape_inference.cc | C++ | cc | 152,669 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
e8680e35a109b74e17ed14b6899e4fa476b4cbe9 | 9778afb797d5a604024f8ae8685dc87220b684d7 | centauroWaRRIor/InteractiveGraphics | /InteractiveGraphics/InteractiveGraphics/hw_fixedpipeline.cpp | C++ | cpp | 2,184 | permissive | #include "hw_fixedpipeline.h"
#include <iostream>
using std::cout;
using std::endl;
HWFixedPipeline::HWFixedPipeline(
int u0, int v0, // top left coords
unsigned int _w, unsigned int _h) :// resolution)
HWFrameBuffer(u0, v0, _w, _h)
{
}
HWFixedPipeline::~HWFixedPipeline()
{
}
void HWFixedPipeline::draw()
{
// i... |
fb1df9435f566f3efb9e3f1080d69546e86f1bc2 | 45ca33702b286e1632a1bfda7a3fb1367fbc6976 | Catofes/BambooMC | /include/generator/ExtPrimaryGenerator.hh | C++ | hh | 1,131 | no_license | //
// Created by herbertqiao on 9/18/15.
//
#ifndef BAMBOOMC_EXTPRIMARYGENERATOR_H
#define BAMBOOMC_EXTPRIMARYGENERATOR_H
#include "generator/BambooGenerator.hh"
#include "G4Event.hh"
#include <vector>
#include "G4ParticleGun.hh"
class ParticleInfo
{
public:
ParticleInfo()
{
ParticleId = 0;
P... |
6818afea51e0aa09c3c8a515a3e77b14bd2d7552 | d5eaad1dbf33f400ec700465ccda064a742081ce | fareed5464/cs340.data_structures | /prog11/wdigraph1.cc | C++ | cc | 1,411 | no_license | #include "/home/onyuksel/courses/340/progs/12s/p11/wdigraph.h"
// default class constructor
wdigraph :: wdigraph ( int n ) : size ( n )
{
// allocate dynamic memory
label = vector < char > ( size );
adj_matrix = vector < vector < int > > ( size );
for ( int i = 0; i < size; i++ )
adj_matrix [... |
5fa15b5ad6bfe6918838209074368503b7a69c6d | b9bc3fc05f9a8830121f7856117e874f7ced3393 | Meng-Gen/UVa | /UVa/acm_492.cc | C++ | cc | 1,729 | no_license | #include <iostream>
#include <string>
#include <stdio.h>
inline int AlphaToLower(char c) {
return c | 0x20;
}
inline bool IsInRange(int value, int lower_limit, int higher_limit) {
return static_cast<unsigned int>(value - lower_limit) <=
static_cast<unsigned int>(higher_limit - lower_limit);
}
inline ... |
f594c239525790dd224de3f0f3ed8677ee85bb3e | 91e5411f8879167c519e5adab7269e4cab886d37 | 3013216006/ACM | /17-8-10/hdu6103.cpp | C++ | cpp | 674 | no_license | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
char s[5500];
int main(){
int T,m;
scanf("%d",&T);
while(T--){
scanf("%d",&m);
scanf("%s",s);
int l=strlen(s);
int ans=0;
int sum=0;
for(int j=l-1;j>=0;j--){
int r=j,r2=j,st=0;
sum=0;
for(int i... |
ddd12cade13c5a0199fb6f11959a51c80e75449a | 9d74436fb4cfefaaf87bcbc94a1f344563363dac | wzl108/LearnOpenGL | /LearnOpenGL/Game/BreakOut/BreakOut/GameLevel.cpp | C++ | cpp | 3,463 | no_license | /*******************************************************************
** This code is part of Breakout.
**
** Breakout is free software: you can redistribute it and/or modify
** it under the terms of the CC BY 4.0 license as published by
** Creative Commons, either version 4 of the License, or (at your
** option) any la... |
5a61d205453caec645742867b20d3825fb5f041a | e81b7d4be5b57c2aec73d73fab69708e1c1a9016 | wwwwodddd/Zukunft | /PE/442.cpp | C++ | cpp | 2,549 | no_license | #include <queue>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
char c[300];
long long f[300][2000];
int g[2000];
int t[2000][10], tt;
int v[2000];
int maxflag = 0;
namespace IchLiebeDich {
const int L = 40;
int a[L + 10];
int l;
void mul(int x) {
for (int i = 0; i < L + 5; i++) {... |
742e2efd9762794663b62f6676c69b00dcb93005 | 3e2124575a31c0e5725f5e7ae7ca58db74e76741 | insidewhy/vu8 | /src/vu8/Context.cpp | C++ | cpp | 4,912 | permissive | #include <vu8/Context.hpp>
#include <vu8/Throw.hpp>
#include <vu8/Module.hpp>
#include <fstream>
#include <sstream>
#include <iostream>
#include <stdexcept>
#include <dlfcn.h>
namespace vu8 {
v8::Handle<v8::Value> LoadModule(const v8::Arguments& args) {
v8::HandleScope scope;
if (1 != args.Length())
... |
a8148a1f1da8c2547123b6f700a58ef1d6149703 | b9260cba303194c97ed3b42759a342811dd31e8e | PeterParfenov/ModelTree | /src/Track.cxx | C++ | cxx | 4,541 | no_license | #include <iostream>
#include "Track.h"
#include "TRandom.h"
ClassImp(Track);
Track::Track(const Track &orig) : TObject(orig), fTriggerBits(orig.fTriggerBits)
{
fPdg = orig.fPdg;
fPvect[0] = orig.fPvect[0];
fPvect[1] = orig.fPvect[1];
fPvect[2] = orig.fPvect[2];
fPvect[3] = orig.fPvect[3];
fMass = orig.fM... |
5546c6a2d55f24c5da4c7311b016d1f798b775ab | 2b159f728435ee11ea61f2cf49991519e5daa015 | jensk2k/OrangeSpace | /OrangeSpace/BigStar.cpp | C++ | cpp | 656 | no_license | #include "BigStar.h"
BigStar::BigStar()
{
//TextureLoader::LoadTexture(texture, "Textures/StarBig.tga");
texture = GameSetup::bigStarTexture;
}
BigStar::~BigStar()
{
}
void BigStar::Render()
{
glPushMatrix();
glTranslatef(position.x, position.y, 0.0F);
glScalef(scale.x, scale.y, 1.0F);
glEnable(GL_TEXTURE_2D... |
4fbcf7e82c252f45287a7eaeb1837ab8b577c75f | 1310958b02e29ccdea48ecac62cdfe21bdaf15a7 | pepero/algo | /tosort/inorderNonRec.cc | C++ | cc | 2,960 | no_license | #include <iostream>
#include <vector>
using namespace std;
typedef vector<int> VecInt;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
/*
VecInt inorderTra(TreeNode* root){
TreeNode* node = r... |
d81ceebe59fb1bb0f73188dc0dd7262ecc4619ee | f0bfda42a1fbd566251980bd972e0d4ed0de4752 | pudnax/glsl-language-server | /src/workspace.cpp | C++ | cpp | 840 | permissive | #include "workspace.hpp"
Workspace::Workspace(){};
Workspace::~Workspace(){};
bool Workspace::is_initialized()
{
return m_initialized;
};
void Workspace::set_initialized(bool new_value)
{
m_initialized = new_value;
};
std::map<std::string, std::string>& Workspace::documents()
{
return m_documents;
};
v... |
800f381183ed414a180f3e3790e716b4fc2dfd38 | adb566cb41835f47a23fb688af2bcca6f93d6210 | arangodb/arangodb | /3rdParty/V8/v7.9.317/src/wasm/wasm-engine.cc | C++ | cc | 38,738 | permissive | // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/wasm/wasm-engine.h"
#include "src/base/platform/time.h"
#include "src/diagnostics/code-tracer.h"
#include "src/diagnostics/compilation-st... |
93d41542002fa9e0a69026f5f2b1405a49951d2e | c0f2df6440fae6553687f0b0b3a9909811aaa8b7 | bysheva/oneDAL | /cpp/oneapi/dal/test/engine/common.hpp | C++ | hpp | 6,402 | permissive | /*******************************************************************************
* Copyright 2021 Intel Corporation
*
* 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.o... |
8618a0f43951186b0991d892bfe7656d6a084b83 | e829836aef4e93e93182abc6bd0cff46d25219aa | jinzhengyu1212/Clovers | /Codeforces/CF1428/CF1428-F.cpp | C++ | cpp | 2,820 | permissive | #include<bits/stdc++.h>
using namespace std;
const int N=500005;
const int inf=(int)1e9;
typedef long long ll;
int n;
char s[N];
int tot=0;
int mi[N<<2],mp[N<<2],cnt[N<<2],ls[N<<2],rs[N<<2],tag[N<<2];
ll sum[N<<2];
struct Segment{
void pushup(int x){
sum[x]=sum[ls[x]]+sum[rs[x]];
if(mi[ls[x]]<mi[rs... |
aeebff45778c8d74a3f3019d60a48f194e02d7ba | 0b9529f784abe0032817df7f067e8d17dbebf9f1 | nthucat/LSV-PA | /src/ext-lsv/lsv_print_sopunate.cpp | C++ | cpp | 5,403 | permissive | #include "base/abc/abc.h"
#include "base/main/main.h"
#include "base/main/mainInt.h"
#include <vector>
#include <algorithm>
namespace {
bool Fanin_idxcmp (Abc_Obj_t i, Abc_Obj_t j) { return (i.Id < j.Id); }
static int Lsv_CommandPrintSopunate(Abc_Frame_t* pAbc, int argc, char** argv);
void init(Abc_... |
0dbf26865e490034fd53ba88afb0fb8b52803d4d | d55fb44c1242fc529a2d8c20e1cf0c6ce0c82cf2 | ghazp/Spelprojekt | /GameClient/SimonsEvil.cpp | C++ | cpp | 502 | no_license | #include "SimonsEvil.h"
#include "EntityHandler.h"
#include "SimonsEvilEffect.h"
const float SimonsEvil::COOLDOWN = 180.0f;
SimonsEvil::SimonsEvil() : Skill(Skill::SIMONS_EVIL, COOLDOWN)
{
}
SimonsEvil::~SimonsEvil()
{
}
bool SimonsEvil::activate(unsigned int _senderId)
{
if(this->getCurrentCooldown() == 0)
{
... |
add3b37ede4e7451d7cf7aa5d5d5ee2fece5823e | 2a178bb202164271fddea20ad546363435ad877d | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_patch_hunk_2303.cpp | C++ | cpp | 934 | no_license | ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"inserting socache entry larger (%d) than subcache data area (%d)",
total_len, header->subcache_data_size);
return -1;
}
- /* If there are entries to expire, ditch them first. */
+ /* First reclaim space... |
c009111a16bdc7d9c464745bf2bd4f7517c7cc6d | 21d7918e9349a46f0d9f00b28c58f1258b1d930a | chrishoen/Dev_Image | /SVLib/svStackParms.cpp | C++ | cpp | 13,071 | permissive | //******************************************************************************
//******************************************************************************
//******************************************************************************
#include "stdafx.h"
#include "svSysParms.h"
#include "svRCLoop.h"
#define ... |
97a3303ab85cec3c24e04b6c2f76511c5fa9da43 | f95f4b51348bd51b9e7c914055595d20bfe8c711 | pumpuidev/referencia | /C++/level1/Ki1.cpp | C++ | cpp | 1,058 | no_license | #include <iostream>
#include <cmath>
using namespace std;
bool Helyes (int N){
string tmp;
if (cin.fail()){
cout<<"hibas \n";
cin.clear();
getline(cin,tmp,'\n');
return false;
}else {
if (cin.peek()!='\n'){
getline(cin,tmp,'\n');
}
if (N<... |
5d1d3ff17243d76e185c3851e22545dda0f574ec | c8611c4230e393d386e781a989ac3998a6567e50 | kosakowski/OGS5GEMDEV | /sources/GEO/geo_sfc.cpp | C++ | cpp | 57,842 | permissive | /**
* \copyright
* Copyright (c) 2015, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
/******************************************************... |
5be9fe5f8ed139b9b9b219f446372acf2e1c7703 | 932bde2094b1343229c9ef144b8f81699e315724 | TobiasKozel/GuitarD | /src/headless/benchmark.cpp | C++ | cpp | 1,594 | permissive | /**
* Simple little benchmark wich tests a preset at different blocksizes
* on a 20 second audio snippet (silence, but shouldn't matter)
*/
// #include "./compile_unit/GHeadlessUnit.h" // you can also use the compile_unit version and link against it to speed up things
#include "./GHeadless.h"
#include <fstream>
#in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.