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 |
|---|---|---|---|---|---|---|---|---|
cbb9d0108cfafdde4c8ade942c324a69e2f1e920 | acd5fe8ecc7709d0eeadf9a838fe86ccb60e35b6 | kevinkuriachan/CSCE121 | /Notes/Stack/htmlValidator/finish/arrstack.cpp | C++ | cpp | 1,161 | no_license | #include "stack.h" // We implement this functionality
#include <string> /* Using the C++ standard string type */
#include <assert.h>
using namespace std;
#define CAPACITY 10
struct stack_t {
string data[CAPACITY]; // Pointer to array of items
int count; // Number in the stack so far
};
stack_t *create_stack()... |
cfd0ca9edcf15a9f7df86798ad212c1c0b969285 | 2e13d64bca1e5bdf0383694e31fa50b26977810f | MGfoundation/mgcpp | /include/mgcpp/system/cuda_error.hpp | C++ | hpp | 642 | permissive |
// Copyright RedPortal, mujjingun 2017 - 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef _MGCPP_SYSTEM_CUDA_ERROR_HPP_
#define _MGCPP_SYSTEM_CUDA_ERROR_HPP_
#include <cuda_runtime.h>... |
afbfe1f63dda095ceaa1a765b7154e5233287709 | 4d42763b5b9ed9835d99d0480d84769bf6e8b156 | 2019Shun/AtCoder | /ABC/121_140/127/d.cpp | C++ | cpp | 3,394 | no_license | #include <bits/stdc++.h>
#include <vector>
#include <numeric>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9+7))
#define REP(i, n) for(int i=0;i<int(n);++i)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define RREP(i, n) for(int i=int(n)-1;i... |
23d016babda3447dc60f332e4cc76b2c14e3ba16 | cceae6db3b6bd1cdaaae68932a1e0a1abac15315 | prawalgangwar/harp | /harp-daal-app/daal-src/lang_service/java/com/intel/daal/algorithms/implicit_als/training_distributed_partial_result_step3.cpp | C++ | cpp | 3,150 | permissive | /* file: training_distributed_partial_result_step3.cpp */
/*******************************************************************************
* Copyright 2014-2016 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 ... |
a08a7b634b2948481e448b977eaca78308733a7c | 6408b2ac91e5c75e30f49b0b7dd7d753905e317e | miagebdx/pharmApp | /Src/mainTerm.cpp | C++ | cpp | 2,768 | permissive | #define pathFichierListe "liste.txt"
#include "Abstract/Controller.cpp"
#define clear system("clear")
#include <string.h>
int main(int argc, char const *argv[])
{
if(argc!=2){
printf("Usage: %s start\n",argv[0]);
return EXIT_FAILURE;
}
if (strcmp(argv[1],(const char*)"start")==0)
{
clear;
Controlle... |
d741055549fcce57821ba971cdfd192531a997ea | 6a8f117a33251d2af1df29593b35d76b8775ddad | communitycoinz/Timcoin | /src/qt/test/test_main.cpp | C++ | cpp | 1,289 | permissive | // Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include ... |
acdb6f5a5b3ce8af51bc228ea264d52b70a9fc79 | e7f44c9d5c9155178839c24673f88be9119e4cb9 | jonathanpoelen/falcon.parse_number | /include/falcon/literals/integer_constant.hpp | C++ | hpp | 271 | permissive | // Copyright (c) 2015 Jonathan Poelen
// Distributed under the MIT License.
// (See accompanying file LICENSE.md)
#ifndef FALCON_LITERALS_INTEGER_CONSTANT_HPP
#define FALCON_LITERALS_INTEGER_CONSTANT_HPP
#include "../parse_number/literals/integer_constant.hpp"
#endif
|
a80020b6a9ca860fcb43f672bf119320f104aefa | dca8b4113c40d66b837e30ad4b40b46712555169 | ChoudhariApoorva/Better-error-messages-for-template-programs | /main.cpp | C++ | cpp | 213 | no_license | #include<iostream>
using namespace std;
int main()
{
InputClass ic1;
InputClass ic2;
bar(ic1,ic2);
C c1;
B b1;
multitype(b1,c1);
FriendFuncClass fc1;
FriendFuncClass fc2;
foo(fc1);
bar(fc1,fc2);
}
|
a42585dda6bd293308128e08d95d80212a3b8a6c | a269b5697a686b31d4ba2e36226b6c81bb5956a3 | watilde/my-v8 | /test/cctest/compiler/test-js-constant-cache.cc | C++ | cc | 14,740 | permissive | // Copyright 2014 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/v8.h"
#include "src/assembler.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/type... |
c4dc02babfcfa159e7ebdd21a106e27ff9d5af36 | b50e080ce615aaf46cb0a775c27090909f44440e | gufoe/flood | /server/src/server.cpp | C++ | cpp | 3,767 | no_license | #include <redox.hpp>
#include <iostream>
#include <uWS.h>
#include <cstdint>
#include <vector>
#include <cmath>
#include <cstdlib>
#include "h/json.hpp"
#include "h/types.hpp"
#include "h/const.hpp"
using namespace std;
using namespace redox;
using namespace nlohmann;
Redox redis;
bool init_redis() {
return redis.... |
6c08b2ce9eea51ee5c15ad5701fa2ed4a90f58b2 | 0ef1fb4ef138bfe5ea93e2951f1a281ce974df8a | Bravewtz/WTZ_LQL_Plane_Game | /src/JudgeCollision.cpp | C++ | cpp | 4,003 | no_license | #pragma once
#include "stdafx.h"
#include "GameObject.h"
#include "JudgeCollision.h"
#include "resource.h"
#include "MyBall1.h"
#include "EPlane.h"
#include "Explosion_1.h"
#include "Plane.h"
#include "EBall.h"
#include "EBall1.h"
BOOL CJudgeCollision::JudgeIntersection(CGameObject* a, CGameObject* b)
{
... |
cb23262ef1e09f0dfab58b43281353c7d8ef6439 | 6d974d4492f213b8ce51818a8ee97a7e45718233 | DavyVan/PhDStillNeedLeetCode | /problems/263-Ugly-Number/kernel.cpp | C++ | cpp | 349 | no_license | #include "kernel.h"
bool isUgly(int num)
{
if (num <= 0)
return false;
if (num == 1)
return true;
while (num % 2 == 0)
num /= 2;
while (num % 3 == 0)
num /= 3;
while (num % 5 == 0)
num /= 5;
if (num != 1)
return false;
... |
f1ac60b38f645bbe8a7d6f3d29a5c13b5184518e | 5d947b24ac1989d8300c96f3faa5aaff09bf0c07 | CarSandoval/Petri | /Petri2/Nodos.cpp | C++ | cpp | 6,262 | no_license | #include "Nodos.hpp"
#include "Arbol.h"
#include <iostream>
//#include "Test.hpp"
list *Nodo::init_nodos_creados()
{
list *aux;
vector vec_aux;
_Nodos aux_nodo;
aux_nodo.VECTOR = vec_aux;
aux_nodo.BOOL = false;
aux->push_back(aux_nodo);
return aux;
}
list *Nodo::init_nodos_vivos()
{
list *aux;
vector vec_a... |
f05a19462325860761590942d2b0fa80372fd02d | 61f332e66c019a56b54b86ff43918190d9c35504 | SfietKonstantin/phonebot | /src/plugins/time/plugin.cpp | C++ | cpp | 2,275 | no_license | /*
* Copyright (C) 2014 Lucien XU <sfietkonstantin@free.fr>
*
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of so... |
99667361e28a30f159527febde9605c90aa9b22e | 06dd31339db2dcc756747cdbf4349a6eaf07065e | mazj/stackoverflown | /questions/appmonitor-37524491/main.cpp | C++ | cpp | 1,163 | permissive | // https://github.com/KubaO/stackoverflown/tree/master/questions/appmonitor-37524491
#include <QtWidgets>
#include <cstdlib>
auto const kRunSlave = QStringLiteral("--runSlave");
int slave() {
QWidget w;
QHBoxLayout layout{&w};
QPushButton crash{"Crash"};
QPushButton quit{"Quit"};
layout.addWidget(&crash);
... |
4ece619f0bc37168e37d6c39d19f6d4ae52b71b3 | df6f5f7b017218f76eb6484d5f4a7deb07d6532c | hbdlyao/YaoBase | /bak/BaseApp/4-17/CPowerSolves.cpp | C++ | cpp | 3,116 | no_license | ///////////////////////////////////////////////////////////
// CPowerSolves.cpp
// Implementation of the Class CPowerSolves
// Created on: 09-4月-2017 21:38:12
// Original author: Administrator
///////////////////////////////////////////////////////////
#include "CPowerSolves.h"
#include "CHvdcFunc.h"
CPower... |
41f0668b405207e1dd1d6c5ba5323d3b9f8de0b0 | fd2f926748d2238d863c79e4a0794d942dc80687 | irov/Mengine | /src/Engine/Landscape2D.cpp | C++ | cpp | 9,101 | permissive | #include "Landscape2D.h"
#include "Interface/RenderCameraInterface.h"
#include "Kernel/ResourceImage.h"
#include "Kernel/Logger.h"
#include "Kernel/DocumentHelper.h"
#include "Kernel/AssertionMemoryPanic.h"
#include "math/box2.h"
#include "math/utils.h"
namespace Mengine
{
/////////////////////... |
e5eddc9f5188f991ed42e0d725e1a511e9982b19 | 23e60c418633bfae2d0d31d444409bc6c6b669bd | TuckerL-OSU/CS162 | /Lab3/Lab3/Die.hpp | C++ | hpp | 403 | no_license | /******************************************************************************
* Tucker Lavell
* CS162 Fall 2017
* Lab 3: War Dice
* Die.hpp
******************************************************************************/
#ifndef DIE_HPP
#define DIE_HPP
#include <time.h>
#include <iostream>
class Die {
private:
prote... |
82846be424bb0063952f136ea02a643a449038ea | bf86f476e07e250129bdfb4bf3aa3ff92d2c5bc1 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14184/function14184_schedule_4/function14184_schedule_4.cpp | C++ | cpp | 2,151 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14184_schedule_4");
constant c0("c0", 32768), c1("c1", 2048);
var i0("i0", 0, c0), i1("i1", 0, c1), i01("i01"), i02("i02"), i03("i03"), i04("i04");
input input00("input00", {i0}, p_int3... |
85a7edcf673fe62b25f6af613d58522c09213256 | 41bebae9cfb8a4f3d894838e1b1150187d655417 | arelyrosas/ProyectoPyMN | /Práctica 10/P10_DerivacionNumerica.cpp | C++ | cpp | 6,657 | no_license | #include<math.h>
#include <stdio.h>
float deriv_delante1(float h, float (xi));
float deriv_atras1(float h, float(xi));
float deriv_centrada1(float h, float (xi));
float deriv_delante2(float h, float (xi));
float deriv_atras2(float h, float(xi));
float deriv_centrada2(float h, float (xi));
float deriv_delante3... |
e6babb5b408bc19193533ea4a5e6e432e9eb771c | 48c0fb386063ba565771ec06c2a3ca7a8f797cd4 | Whatop/Pord | /Pord_/SpaceEngine-master/Space/Sprite.cpp | C++ | cpp | 1,687 | no_license | #include"stdafx.h"
#include"Sprite.h"
#include"Texture.h"
#include"ResourceMgr.h"
Sprite::Sprite()
: m_pSp(Renderer::GetInst()->GetSprite())
{
m_pSp->AddRef();
SetRect(&m_Rect, 0, 0, 0, 0);
A = 255;
R = 255;
G = 255;
B = 255;
}
Sprite::~Sprite()
{
}
bool Sprite::Init(std::wstring fileName)
{
m_Texture = Reso... |
c6dc64ce57cfa1f688ee120dba42d64afffa6b2e | 3012118953a08aa0dcd41e5b4a293345f28306a5 | thyrdmc/eepp | /src/examples/sound/sound.cpp | C++ | cpp | 2,515 | permissive | #include <eepp/ee.hpp>
#include <iostream>
/// Play a sound
void playSound() {
// The sound manager class simplyfies the load of a SoundBuffer and the creation of the Sound
// It manages the sound playing, if the sound channel is already playing, it will open a new channel to play the sound
SoundManager soundManage... |
418e6518c89b21437b4ccb0fe7fb160dfed13a1b | 070faefbcb7a6549e23571b253d0c1a087c87e87 | francisboulianne/TP4 | /TP4/ProprietaireQt/proprietaireqt.cpp | C++ | cpp | 2,424 | no_license | #include "proprietaireqt.h"
#include "promenadeqt.h"
#include "camionqt.h"
#include "supprimervehiculeqt.h"
ProprietaireQt::ProprietaireQt(QWidget *parent, std::string p_nom, std::string p_prenom)
: QMainWindow(parent), m_proprietaire(p_nom, p_prenom)
{
ui.setupUi(this);
QObject::connect(ui.actionV_hicule_promen... |
fae32990f24b9fdd86e19b6649606193e0229b3a | f9505db5b16ae0c7ea4b775472a0447d7ca4ec52 | k9sret/Dragon | /Dragon/src/operators/arithmetic/matmul_op.cc | C++ | cc | 5,631 | permissive | #include "utils/math_functions.h"
#include "operators/arithmetic/matmul_op.h"
namespace dragon {
template <class Context> template <typename T>
void MatmulOp<Context>::RunWithType() {
n = Input(0).count() / M / K1;
x1_offset = M * K1, x2_offset = K2 * N, y_offset = M * N;
auto* X1data = Input(0).template ... |
abbf75ba48dec721c7c367b66ca59b3f76c210d0 | 41f783841846d7a079e072b48d6055814aa8003a | NWYLZW/convenient-widget | /src/main.cpp | C++ | cpp | 214 | no_license | #include <QtWidgets/QApplication>
#include "demo01.h"
#include "../stdafx.h"
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
demo01 w;
w.QMainWindow::show();
return app.exec();
}
|
c735ecedfb808eb6179fecd4ea4aa38ba4aa2982 | b4b8e453d2999682b23683996c78018e37021f74 | niuxu18/logTracker-old | /second/download/git/gumtree/git_patch_hunk_2126.cpp | C++ | cpp | 342 | no_license | die(_("--index outside a repository"));
if (cached) {
if (is_not_gitdir)
die(_("--cached outside a repository"));
check_index = 1;
}
+ if (check_index)
+ unsafe_paths = 0;
+
for (i = 0; i < argc; i++) {
const char *arg = argv[i];
int fd;
if (!strcmp(arg, "-")) {
errs |= apply_patch(0,... |
14e0baf695bcf88060316c714cb71848815bde29 | 4c1bf76e144d70ba23f5a0a939f51ef09922d354 | yuyuvolt/Puzzles-solver | /main.cpp | C++ | cpp | 3,304 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <cmath>
struct Coordinate{
int row;
int column;
Coordinate(int row, int column){
this->row = row;
this->column = column;
}
};
int size;
int unit_block_size;
std::vector<std::vector<int>> field;
bool is_answer_found = fal... |
f407b8f9b37792a614960130189ce152798faa43 | b311649fbab8423b20dddc4fe3c7b609cd6ce202 | Sintexer/2019-autumn | /kpiyap/lab2-stringClass/Lab2-String/String.cpp | C++ | cpp | 2,762 | no_license | #include "String.h"
void String::strcpy(const char* str2, int pos)
{
if (pos >= size)
return;
int i{};
while (pos<size && str2[i])
{
str[pos++] = str2[i++];
}
}
char& String::operator[](int index) const
{
return str[index];
}
char* String::operator()(int pos1, int pos2) const
{
int size = pos2 - pos1 + ... |
8ab6464c4985bff0db49ca9ffb61f3a9fe345699 | 58672a828e37745aa645a6e9ff11a9f44309a430 | ZeroBone/ZBoss | /include/zboss/scene.hpp | C++ | hpp | 1,248 | permissive | #ifndef ZBOSS_SCENE_HPP
#define ZBOSS_SCENE_HPP
#include <memory>
#include <iostream>
#include <SDL2/SDL.h>
#include <zboss/entity/entity.hpp>
namespace zboss {
class Scene {
public:
std::shared_ptr<Entity> root;
SDL_Rect camera;
explicit Scene();
virtual ~Scene() =... |
c4bcb1358f14675958141bbfffddf746f3ae9ecb | bed7f181b195bb00744badcb52ca5e04284bffb7 | qsnake/hermes | /hermes_common/solver/umfpack_solver.cpp | C++ | cpp | 17,679 | no_license | // This file is part of Hermes
//
// Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
// Email: hpfem-group@unr.edu, home page: http://hpfem.org/.
//
// Hermes is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the F... |
3152bf19c8c6718a86b2c6646487b75f6872bc7b | c73daf75093e7ae9dd02ea68e86a9fa7346b8190 | iamnambiar/HackerRank-Solutions | /C++/Other Concepts/C++ Class Templates/Solution.cpp | C++ | cpp | 1,275 | permissive | // https://www.hackerrank.com/challenges/c-class-templates/problem
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <cassert>
using namespace std;
/*Write the class AddElements here*/
template <class T>
class AddElements{
private:
T element;
publi... |
000216e5cbaf15c1674b083c05af7b0f36559534 | 9ee38ae3b409a7a18d845bfee0366b7e65fbe98d | MobMonRob/Strand-AR-Registrierung-KoordSysteme-Studien | /HoloLens/HoloLens2Project/Builds/Il2CppOutputProject/IL2CPP/libil2cpp/debugger/il2cpp-stubs.cpp | C++ | cpp | 57,004 | permissive | #if defined(RUNTIME_IL2CPP) && !defined(IL2CPP_MONO_DEBUGGER_DISABLED)
#include "il2cpp-config.h"
#include <il2cpp-class-internals.h>
#include "gc/GCHandle.h"
#include "gc/GarbageCollector.h"
#include "gc/WriteBarrier.h"
#include "gc/gc_wrapper.h"
#include "metadata/FieldLayout.h"
#include "metadata/GenericMetadata.h"... |
23a9281f2d32302f42b26f24f3dafc59a2f17d0a | 620504f4c993b15423f12da55e6bb742c6682a2b | sak0909/Dali | /dali-toolkit/dali-toolkit-e2e00e5/automated-tests/dali-test-suite/bubble-emitter/utc-Dali-BubbleEmitter.cpp | C++ | cpp | 14,488 | permissive | //
// Copyright (c) 2014 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.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://floralicense.org/license/
//
// Unless required by applicable law or a... |
41b61d398db1984f9727a8bc045866d78c7145d4 | ceda588b49019f3c75967c38f126f809500f2212 | SeungWookJung/Cpp_Study | /7_08_1/7_08_1/7_08_9.cpp | C++ | cpp | 917 | no_license | #include <iostream>
using namespace std;
class Point
{
private:
int x;
int y;
public:
Point();
~Point();
public:
void SetPoint(int _x, int _y);
void AddPoint(Point& pt);
void SubPoint(Point& pt);
void MovePoint(int addX, int addY);
void ShowPoint();
};
Point::Point()
{
x = 0;
y = 0;
cout << "积己磊 龋免" << ... |
a42526dabdcb99a4fd578a293d0aa9c6d99f3bb4 | caf3d585f74091a937a71fb1e701c965ed9e8b6e | ShijieQ/C- | /C-ACM-summer_training/Day 09 - 7.31/A - Sonya and Exhibition.cpp | C++ | cpp | 266 | no_license | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
int n, m;
cin>>n>>m;
for(int i = 0; i < m; i++){
int a, b;
scanf("%d %d", &a, &b);
}
for(int i = 1; i <= n; i++){
if(i%2) cout<<1;
else cout<<0;
}
cout<<endl;
}
|
08c552eca2ea6cbec54bc74db9cf1a2f98e85fe0 | 1e586862f6c7414ce3c20225449cf8b35c3f254c | ochsnerd/numpde | /series1_handout/fvm_scalar_1d/include/ancse/simulation_time.hpp | C++ | hpp | 840 | no_license | #ifndef FVMSCALAR1D_SIMULATION_TIME_HPP
#define FVMSCALAR1D_SIMULATION_TIME_HPP
/// Time, step-size and number of time-steps of the simulation.
/** In FVM codes there is occasionally the need to access to either the
* time-step 'dt' or iteration count 'k' in unpredicted places.
*/
struct SimulationTime {
explic... |
d4463378b6dba9382e9edac204b9bc24424c3586 | 9922d8baae37fd1206484c2c38e7e638579d1e63 | loganzartman/gl-pic-fluid | /src/Particle.hpp | C++ | hpp | 252 | permissive | #pragma once
#include <glm/glm.hpp>
struct Particle {
alignas(16) glm::vec4 color;
alignas(16) glm::vec3 pos;
alignas(16) glm::vec3 vel;
Particle(glm::vec3 pos, glm::vec3 vel, glm::vec4 color) : color(color), pos(pos), vel(vel) {}
};
|
3ebd2b8cf3ef9581adfc96a5eb3a360fcd31f599 | 221c6475d57780f6791829cbdd565c686e3e412c | SerenityOS/serenity | /Userland/Libraries/LibWeb/PerformanceTimeline/PerformanceObserver.cpp | C++ | cpp | 11,278 | permissive | /*
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/PerformanceObserverPrototype.h>
#include <LibWeb/HTML/WindowOrWorkerGlobalScope.h>
#include <LibWeb/HighResolutionTime/SupportedPerformanceTypes.... |
7edbadceab325166836467aec4bb1269493d2a57 | ee788b817f6e69ab6ed723be9301ba13bc4e2b24 | UmbraVenus/CS260-Li | /Midterm/practice/real midterm/RealMidterm/main.cpp | C++ | cpp | 459 | no_license | #include "dlist.h"
using namespace std;
int main()
{
node * head = NULL;
build(head);
display(head);
//PLEASE PUT YOUR CODE HERE to call the function assigned
cout << "\nCounting Even Function in Main..." << endl;
cout << countEven(head) << endl;
cout << "\nRemoving the all even nodes" <<... |
e75c7584cb0469b25773472575dd868dbaa9968b | 11b8f0f01e3bd59f5196fb5e5235aed26678508d | orichamaru/DBSCAN | /DBSCAN/dbscan.cpp | C++ | cpp | 3,145 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define lol 1000000000005
#define ffor(i,a,b) for(int i=a;i<b;i++)
#define bfor(i,a,b) for(int i=b;i>=a;i--)
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define vp vector<pair<double,double>>
#de... |
1d3dd0a20f99efadc3fbed6ae386e613999eba19 | 362e663ef8408825fdd33bcc428f480601d87643 | liuxinren456852/vxl | /contrib/brl/bseg/bvxm/breg3d/breg3d_gdbicp_homography_generator.cxx | C++ | cxx | 4,907 | no_license | #include "breg3d_gdbicp_homography_generator.h"
#include <vcl_string.h>
#include <vcl_sstream.h>
#include <vcl_iostream.h>
#include <vcl_fstream.h>
#include <vcl_cstdlib.h> // for "system" function
#include <vul/vul_file.h>
#include <vil/vil_image_view.h>
#include <vil/vil_save.h>
#include <vil/vil_convert.h>
#inclu... |
80d30f60f23841be27f342a64c41859e6d5505ab | bf68216c7e1c1be0fc7fab84ed0760190229af5a | prayaglehana/Coding-Problems | /geeksforgeeks/greedy/min_coin.cpp | C++ | cpp | 1,108 | no_license | #include<bits/stdc++.h>
using namespace std;
int **dp;
int getMinCoins(int i,int sum,vector<int> &coins){
if(sum<0) return INT_MAX;
if(i<0 && sum==0) return 0;
if(i<0 ) return INT_MAX;
if(dp[i][sum]!=-1) return dp[i][sum];
int ans=INT_MAX;
if(sum>=coins[i]){
ans=getMinCoins(i,sum-c... |
6437164558f1cf913ef6f26a532ef0293a4b281b | fdfd1aca4ab0722ab70ee2ee6bb293aff074d358 | gelinhe/model_predictive_control_in_tensorflow | /src/MPC.cpp | C++ | cpp | 11,889 | no_license | #include "MPC.h"
#include <math.h>
#include <cppad/cppad.hpp>
#include <cppad/ipopt/solve.hpp>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
using CppAD::AD;
// We set the number of timesteps to 25
// and the timestep evaluation frequency or e... |
5fbfadaef313966bf4cfd86a612c0fc58e424b1e | 2977de68b81589b473b66560c4a5c5568b7827f3 | zefiros-software-legacy/NanoRange | /test/main.cpp | C++ | cpp | 1,273 | permissive | /**
* @cond ___LICENSE___
*
* Copyright (c) 2016-2018 Zefiros Software.
*
* 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
... |
65287eee015051f290757e24d7c345c3aeef3197 | 66c3692d7eaf85b970f11d50f450ce703c940ecf | mynick777/msdk | /msdk/mscom/download/InetFile/fsHttpFile.cpp | C++ | cpp | 16,612 | no_license |
#include "stdafx.h"
#include "fsHttpFile.h"
#include <stdio.h>
//#include "common.h"
#include <limits.h>
#include "fsInternetSession.h"
#include "strparsing.h"
#include "fsURL.h"
fsHttpFile::fsHttpFile()
{
m_pszReferer = NULL;
m_pszCookies = NULL;
m_pszPostData = NULL;
m_pszHttpVersion = new TCHAR [100];
m_dwFlag... |
63eb18fe693864ee5214bb46e6428752b012ce47 | ef4a42910a950d4c1fea1ff49f440eb27f246042 | mhochsteger/blaze | /blazetest/src/mathtest/dmatdvecmult/MDbVHb.cpp | C++ | cpp | 4,249 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dmatdvecmult/MDbVHb.cpp
// \brief Source file for the MDbVHb dense matrix/dense vector multiplication math test
//
// Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved
//
// This... |
dabeb9e872189d7f9959643b1af14d14c9bba5e7 | 625a4cf4e3aa92ff3695852404517081bdb5bd6a | nishant7412/my-codes | /linkedlist.cpp | C++ | cpp | 690 | no_license | #include<iostream>
using namespace std;
class node{
public:
int data;
node* next;
node(int value){
data=value;
next=NULL;
}
};
void insert(node* &head,int value){
node* n =new node(value);
if(head==NULL)
{
head=n;
return;
}
... |
0db75bc6be86ff2967554f856015ee280c2218f7 | a819dd3d97f4b81ee820aa8542e7311ddbc08795 | cdmh/opencv_contrib | /modules/latentsvm/test/test_latentsvmdetector_cascade.cpp | C++ | cpp | 8,465 | no_license | /*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... |
b7b8eca185932b81bbe3d3e9dd362a94914509ee | 8227eb86a9216d81ffab28442ffc0d4de6cdb805 | niuxu18/logTracker-old | /second/download/git/gumtree/git_new_hunk_1389.cpp | C++ | cpp | 629 | no_license | strbuf_addf(buffer, "%c%d %d\n", 0, it->entry_count, it->subtree_nr);
#if DEBUG
if (0 <= it->entry_count)
fprintf(stderr, "cache-tree <%.*s> (%d ent, %d subtree) %s\n",
pathlen, path, it->entry_count, it->subtree_nr,
oid_to_hex(&it->oid));
else
fprintf(stderr, "cache-tree <%.*s> (%d subtree) invalid\n",
... |
cd6e36ea434a265f7d70c982424fe9412427e8a1 | 8e5e23fdea2ac1b0fec6a286b26b9e13846430a9 | skanda99/Hackerrank-Leetcode | /leetcode238.cpp | C++ | cpp | 499 | no_license |
// problem: "https://leetcode.com/problems/product-of-array-except-self/"
class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
int n = nums.size();
vector<int>output(n,1);
int i;
for(i=n-2;i>=0;i--)
output[i] = output[i+1]*nums[i+1];
in... |
f61a044efbdfb1d7c4075289a97d92f70b09f834 | bf488ece195572619e6f7918a29a7031614ba9ed | mattleibow/skia | /tests/sksl/fp/golden/GrSectionDumpInfo.cpp | C++ | cpp | 2,006 | permissive |
/**************************************************************************************************
*** This file was autogenerated from GrSectionDumpInfo.fp; do not modify.
**************************************************************************************************/
#include "GrSectionDumpInfo.h"
#include "... |
206853db59da75d0fadb5929669d9710c70e5ec2 | 811403a4250329c1cc351389bce9575507e9a1d1 | vijhayraj/vjrajcse | /78.cpp | C++ | cpp | 248 | no_license | #include <iostream>
using namespace std;
int main()
{
int a,n,i;
cout<<"Enter your number";
cin>>a;
for(i=0;i<=n;i++)
{
if(a%13==0)
{
cout<<"yes";
}
else
{
cout<<"no";
}
}
}
|
d54d2e2a17fa1d71bc21da0af15386cdf38adca0 | 8ff37d04607ebc6d67e7903f8e65572fd357d305 | x-martian/vtk-test | /vtkRenderingTest/vtkRenderingTest.cpp | C++ | cpp | 646 | no_license | // vtkRenderingTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "vtkRenderingTest.h"
#include "vtkActor2DTest.h"
vtkRenderWindow* win=0;
vtkRenderer* rndrr;
vtkActor* actor=0;
int coordinateConversion(void);
bool vtkRenderingTest(bool on)
{
if (on) {
//coor... |
4a9c67ad420a329c14bad58fcae717be7aa4892d | 61fb1108720786bc3ec04982ad5523a306ba68c5 | AlanQuatermain/swift-llbuild | /lib/Ninja/Manifest.cpp | C++ | cpp | 1,504 | permissive | //===-- ManifestLoader.cpp ------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
54737ef5f5c999bb7c696f39233d33353b49dbf6 | 633e279492981c6d3b17f57b84d6bcca939eba69 | Jawshouamoua/AdvPgm | /advProg/lab1/exercise2.cpp | C++ | cpp | 1,016 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
#include<iterator>
#include<stdlib.h>
#include<time.h>
std::string randStr() {
std::string str;
int strlen = (rand()%10) + 5;
static char c;
for(int i=0; i < strlen; i++) {
c = 'A' + rand()%24;
str += c;
}
return str;
}
bool sortByLen(std::string... |
d5c38a35aba4a595f197ca17de0cd5f888f8843c | f1ed7821f6a0589391183493764ea900ecc029e0 | phisko/kengine | /kengine/render/helpers/get_viewport_for_pixel.hpp | C++ | hpp | 453 | permissive | #pragma once
// entt
#include <entt/entity/entity.hpp>
#include <entt/entity/fwd.hpp>
// putils
#include "putils/rect.hpp"
namespace kengine::render {
struct viewport_info {
entt::entity camera = entt::null;
putils::point2f pixel = { -1.f, -1.f };
putils::point2f viewport_percent = { -1.f, -1.f }; // [0,1]
}... |
a8858a522425fb8ef2f17cc5fd0e147b2bc8024b | d36cd54bc6c0ca5a6254cee69b9edf7597213c92 | JAChapmanII/pbrane | /pbrane/pvm.hpp | C++ | hpp | 523 | no_license | #ifndef PVM_HPP
#define PVM_HPP
#include <functional>
#include <vector>
#include <map>
#include <string>
#include "variable.hpp"
#include "varstore.hpp"
using InjectedFunction = std::function<Variable(std::vector<Variable>)>;
struct Pvm {
// options
bool debugFunctionBodies{false};
// variable store
VarStore &v... |
dcb5e597241555841c2fdaf06ca16487f2e9800f | b03f231b086438ab3f25c8bb4610a98c789be5c8 | strategist922/ACM | /test2/wood/wood.cpp | C++ | cpp | 898 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int len[1005];
struct Node
{
int h;
int w;
}wood[5005];
bool cmp(struct Node &a,struct Node &b)
{
if(a.h>b.h)
return true;
else if(a.h==b.h)
{
if(a.w>b.w)
return true;
else... |
bc6f86562285df6275e16987e87a1d45efe94a04 | 3acd4bce9df74d28e9a64fcacc92c3aec2bff098 | jjghh/bro | /src/Net.cc | C++ | cc | 12,531 | permissive | // See the file "COPYING" in the main distribution directory for copyright.
#include "config.h"
#include <sys/types.h>
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#include <errno.h>
#include <signa... |
031ac6874db53f394dd2f0628f3fdbacffea2dc8 | 47b0d88a59b931ff2521939b99cd05068637b948 | littleserendipity/Document | /Tools/CppDoc/UnitTest_ExecuteCases/Main.cpp | C++ | cpp | 50,383 | no_license | #include <Parser.h>
#include <Ast_Decl.h>
#include <Ast_Type.h>
using namespace vl::stream;
using namespace vl::filesystem;
using namespace vl::console;
/***********************************************************************
Preprocessing
***********************************************************************/
// s... |
fc5e579eb778e9d3dd1c674ac2a2e425f0a7af43 | e9d1292617f4f82e54b7af36b6209e321dcdf797 | mfkiwl/riscvtool | /nekoSDK/sdcard.cpp | C++ | cpp | 7,653 | permissive | #include "core.h"
#include "spi.h"
#include "sdcard.h"
#include <stdio.h>
void SDStrobe8()
{
/*
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;
*IO_SPIOutput = 0xFF;*/
}
static uint8_t ... |
060e00bc69df51eadb32fd40631e672cac2dfe65 | 13400b3bf1c6fde6ad73df17d8ee1a4b7ad6188a | cppcooper/cheryl-engine | /src/resource-management/memory.cpp | C++ | cpp | 899 | permissive | #include <resource-management/memory.h>
#include <cstdlib>
using namespace CherylE;
/* frees all allocations
*/
void MemoryMgr::purge(){
for(auto p : MasterRecord){
free(p);
}
MasterRecord.clear();
OpenList.clear();
ClosedList.clear();
m_free = 0;
m_used = 0;
m_to... |
816041b978e56fbe68d48b36663e5814611d11ef | 30674b4e4e9eb89ea8146a0e03c099f91a81b98f | jahau/fbthrift | /thrift/lib/cpp2/transport/rocket/server/RocketServerConnection.cpp | C++ | cpp | 21,172 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
997ec69ca471eb9cf4c037050f63948b1b100028 | f996514c92570273c28ffcdfbcdb864268309605 | lingol1995/Portfolio | /OpenGL Scene/Source/Lab3e/Shadows.cpp | C++ | cpp | 2,852 | no_license | #include "Shadows.h"
void Shadows::drawShadowMatrixScene()
{
GLfloat Light_Ambient[] = {0.4f, 0.4f, 0.4f, 1.0f};
GLfloat Light_Diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};
GLfloat Light_Position[] = {4.0, 10.0, 0.0, 1.0};
// Activate light
glLightfv(GL_LIGHT0, GL_AMBIENT, Light_Ambient);
glLightfv(GL_LIGHT0, GL_DIFFU... |
576837fa0ea7e03568d90cb85ff9f5c2add1df32 | 2db8595fba91788a20c8bad19a3a1f0ee00da54d | dingswork/Code | /UVa Online Judge/volume003/395 Board Silly/program.cpp | C++ | cpp | 3,627 | no_license | // Board Silly
// UVa ID: 395
// Verdict: Accepted
// Submission Date: 2016-07-06
// UVa Run Time: 0.000s
//
// 版权所有(C)2016,邱秋。metaphysis # yeah dot net
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
char grid[8][8];
int steps[8][8][8], copies[8][8][8];
int offset[... |
e6e7c9b16a339bf75387daa8a709ed8b77a35b03 | b5e3d1047553fff6426cda17eb48a3dca8973dec | pu2oqa/muServerDeps | /_Include/boost/concept/assert.hpp | C++ | hpp | 2,151 | no_license | ////////////////////////////////////////////////////////////////////////////////
// assert.hpp
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_ASSERT_DWA2... |
bc7f853f9de9597c86e8fc5d1faf12f1ea5e04f6 | 88235506a8c81682fabebbb6a8b6469350430b98 | globaledgesoft/RB3-Auto-Drive | /main_application/src/client.hpp | C++ | hpp | 686 | no_license | #ifndef CLIENT_H
#define CLIENT_H
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <numeric>
#include <stdexcept>
#include <utility>
#include <vector>
#include <errno.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#in... |
8bd558a2549eb226613a90c513c376e255f97d6b | 8fb314131730fd0778da095f633d4084fb25d242 | thomasphys/LOLXtemp | /include/LOLXReadData.hh | C++ | hh | 1,492 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include "TGraph.h"
#include "TMath.h"
#include <assert.h>
namespace LOLXReadData{
extern TGraph* PMMA_nREAL;
extern int state_PMMA_nREAL;
extern TGraph* PMMA_nIMAG;
extern int state_PMMA_nIMAG;
extern TGr... |
227afaa5c353c4c50baf9964342702a0774674e2 | 35da4320682cfcaae7ed86a83f70c5e9ad7e8252 | jaladhivyas/CPP-Basic-Programming | /CPP_Programming/Relationships/aggregation.cpp | C++ | cpp | 822 | no_license | #include "Basic/inheritance_basic.h"
// It is a specialized form of association where all object have their own
// life cycle and there is ownership like parent and child.
// Chile object can not belong to another parent object at the same time.
// One can think of it as "has-a" relationship.
class Employee
{
publi... |
0060dd07b23a4a0d7ba8745f53a5684bbbf473c1 | 1f5aa7a3a6bfdcbe3c5ccef1c97d73f8302c7bd7 | ColVic/ppe_labs | /Lab1/src/lab1.hpp | C++ | hpp | 854 | no_license | #ifndef _LAB1_HPP_
# define _LAB1_HPP_
#include <windows.h>
#include <stdlib.h>
#include <tchar.h>
#define CLEAR_BUTTON 1
#define COPY_BUTTON 2
#define FIRST_TEXTAREA 3
#define SECOND_TEXTAREA 4
extern HWND clear_button, copy_button, text_box1, text_box2;
extern PAINTSTRUCT ps;
extern RECT rect;
extern LRESULT textS... |
e6cd82e4971aafc0544455e9fce8c372f33c2f16 | 07015ba15b17e0bf0165e08267c346395da9b7e7 | zhmu/ananas | /external/gcc-12.1.0/libstdc++-v3/testsuite/23_containers/multiset/modifiers/insert/87194.cc | C++ | cc | 1,200 | permissive | // Copyright (C) 2018-2022 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your op... |
7274328d88a353bbbf172a1de92bc3842dbcda66 | cfd07f2fbf7b0e5fb2e266007ca6c20542ec6bb6 | nashsclay/electra-1 | /src/qt/editaddressdialog.cpp | C++ | cpp | 3,730 | permissive | #include "editaddressdialog.h"
#include "ui_editaddressdialog.h"
#include "addresstablemodel.h"
#include "guiutil.h"
#include <QDataWidgetMapper>
#include <QMessageBox>
EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::EditAddressDialog), mapper(0), mode(mode), mod... |
4b1098105e727bdcb705faba222ad4fc8bff3ef5 | 5b1638c54f004244157dd7472a54855eb11ffda9 | jesst3r/UnrealDotNet | /Plugins/UnrealDotNet/Source/UnrealDotNetRuntime/Private/Generate/Manage/ManageArrowComponent.cpp | C++ | cpp | 1,145 | permissive | // This file was created automatically, do not modify the contents of this file.
// ReSharper disable InvalidXmlDocComment
// ReSharper disable InconsistentNaming
// ReSharper disable CheckNamespace
// ReSharper disable MemberCanBePrivate.Global
#include "UnrealDotNetRuntime.h"
#include "DotnetTypeName.h"
#include "G... |
c0d0f0a92ee846259e0061998d06174d9d612de6 | 706d91ece1e683c94f93f1679ab02187fffa4acf | GraphsZBP/GraphsZBP | /src/boost/boost_breadth_first.cpp | C++ | cpp | 685 | no_license | #include "boost_breadth_first.h"
#ifdef _DEBUG
#include <iostream>
#endif
#include <boost/graph/adjacency_matrix.hpp>
#include <boost/graph/breadth_first_search.hpp>
#include "../common/graph_generator.h"
class bfs_print_visitor: public boost::default_bfs_visitor {
public:
template<typename Vertex, typename Graph>
... |
cfdfdfd62f72e804c7bfbfbc2a15049f5a448dbb | ebe2f38e33ffa9b68ca0b84c5760b1fa285bfcf1 | JustinChris/programminportfolio | /SOCS/SOCS online13_ 4 Januari 2020/ProbF.cpp | C++ | cpp | 710 | no_license | #include <stdio.h>
void prima(int arr[],int x) {
int idx = 0;
for (int i = 2; idx <= x; i++) {
int flag = 1;
for (int j = 2; j*j <= i;j++) {
if (i % j == 0) {
flag = 0;break;
}
}
if (flag == 1) {
int temp = i;
while (temp > 10) {
temp = temp%10;
}
arr[idx] = temp;
idx++;
}
}
}... |
57c2dd329274ec14555c1bd40ebb5affa6c80f42 | 8ab47c8e8bee5294b454f93405fc40e99a88c382 | icahoon/vocal | /util/transport/UDPSocket.hxx | C++ | hxx | 4,088 | permissive | #if !defined(VOCAL_UDP_SOCKET_HXX)
#define VOCAL_UDP_SOCKET_HXX
/* ====================================================================
* The Vovida Software License, Version 1.0
*
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi... |
b499a926205ce5f90b22b816a8d7c19b89a6064f | 1dfcb29b44aa67f611df782c48b223c5262facca | KhozmoS/Competitive-Programming-Solutions | /COJ/KhozmoS-p3776-Accepted-s1102535.cpp | C++ | cpp | 1,526 | no_license | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 55;
typedef long long ll;
ll TP[MAXN][MAXN];
string toStr(ll n){
string sol = "";
while(n > 0){
sol = (char)((n % 10) + '0') + sol;
n /= 10;
}
return sol;
}
int main()
{
for(int i = 0; i < MAXN; i++)
TP... |
ad702d12821afa724813cab709646dd995d9f6bc | f7be9afb26233788f51a32387efc5c840387147d | metashell/headers | /headers/boost/1.26.0/boost/python/detail/extension_class.hpp | C++ | hpp | 38,618 | no_license | // (C) Copyright David Abrahams 2000. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
// Th... |
fa86d3deb8248cabbb61528fc51de40453929f46 | ed9e34f244f806e4f77751c1e1ae77444f7ec754 | gyunderscorebe/ActionFPS-Game | /source/src/crypto.cpp | C++ | cpp | 29,118 | permissive | #include "cube.h"
///////////////////////// cryptography /////////////////////////////////
/* Based off the reference implementation of Tiger, a cryptographically
* secure 192 bit hash function by Ross Anderson and Eli Biham. More info at:
* http://www.cs.technion.ac.il/~biham/Reports/Tiger/
*/
#define TIGER_PASS... |
eb15d46eba307961251143ed4f8bbe5901399fff | 46e0b4c941dc26655965ad7bf26c326196ec0055 | Gradess2019/POST-WORLD-UE4-completed-tasks | /GlobalMap/Source/GlobalMap/GlobalMapGameMode.cpp | C++ | cpp | 486 | no_license | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "GlobalMapGameMode.h"
#include "GlobalMapCharacter.h"
#include "UObject/ConstructorHelpers.h"
AGlobalMapGameMode::AGlobalMapGameMode()
{
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerP... |
95f5cd098acbce070df35fcb13f0be1447dd1678 | 3591b7264d21199d2d78a9893983de667815aea8 | nwops/facter | /lib/inc/internal/facts/solaris/kernel_resolver.hpp | C++ | hpp | 611 | permissive | /**
* @file
* Declares the Solaris kernel fact resolver.
*/
#pragma once
#include "../resolvers/kernel_resolver.hpp"
namespace facter { namespace facts { namespace solaris {
/**
* Responsible for resolving kernel facts.
*/
struct kernel_resolver : resolvers::kernel_resolver
{
protected:... |
05784e07f1616d3f858f1cec5801c96d02b60413 | 6fc9d128a2a2dde43ce8e41e01316e8eeb8d7702 | go2carter/CreatureBrains | /src/Creatures/AnimalCreature.cpp | C++ | cpp | 7,433 | no_license | //
// AnimalCreature.cpp
// BrainSim
//
// Created by Sumner Hearth on 11/18/15.
//
//
#include <string>
#include <sstream>
#include <iomanip>
#include "Utility/NeuralUtility.hpp"
#include "Creatures/AnimalCreature.hpp"
#include "Utility/TrigUtility.hpp"
#define THRESHOLD 0.5
#define AnimalCreature_SPEED 0.5
#defin... |
3e6b70e5a43b8ee99125f2d0df5b02c7a7470f83 | c08274bc3b542d848d021ffea4d9b0919bba575a | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/CorrespondingSettingDataRecord/UNIX_CorrespondingSettingDataRecord_SOLARIS.hxx | C++ | hxx | 1,847 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
d38d98b79cb9c0d3e15fb3a36f547ccd689bff0b | 063def4e09ccac8fa72be83470c8285a17818430 | yanyushr/fuchsia | /garnet/public/lib/escher/impl/descriptor_set_pool.cc | C++ | cc | 4,340 | permissive | // Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "lib/escher/impl/descriptor_set_pool.h"
#include <map>
#include "lib/escher/impl/command_buffer.h"
#include "lib/escher/impl/vulkan_utils.h"
na... |
752263c039179604d0c491e2200fbb5485b4af25 | 14c09fe8249652ee8fecd084de1dd681c6d5b92a | qizongjun/Algorithms-1 | /Leetcode/Tree/#112-Path Sum/main.cpp | C++ | cpp | 489 | no_license | struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
// 递归,没什么特殊之处
bool hasPathSum(TreeNode* root, int sum) {
bool result = false;
HPS(root, sum, result);
return result;
}
void HPS(TreeNode* root, int sum, bool& yes) {
if (!root) return;
... |
e96d34405531175d0e2c0f9751e72fceb57f6456 | 29392c4d63d1d3c28189357454339904b78be30f | kcwong395/DataStructAndAlgor | /LeetCode/C++/Easy/Two Sum/hashmap.cpp | C++ | cpp | 359 | permissive | class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
map<int, int> m; // val, idx
for (int i = 0; i < nums.size(); i++) {
int c = target - nums[i];
map<int, int>::iterator found = m.find(c);
if (found != m.end()) {
return { found->second, i };
}
else {
m[nums[i]] = ... |
e5bc4511d5940a5fdaad905f0fefe45b1997b890 | b5f7a625aa8fc6953c5fee710aa47cbe7b5b4958 | Seojeonguk/Algorithm_practice | /BOJ/1837.cpp | C++ | cpp | 659 | no_license | #ifdef _DEBUG
#include "bits_stdc++.h"
#else
#include "bits/stdc++.h"
#endif
#pragma warning(disable:4996)
using namespace std;
bool visit[1000006];
char p[104];
int k, tmp;
vector<int> v;
int main() {
#ifdef _CONSOLE
freopen("sample.txt", "r", stdin);
#endif
scanf("%s %d", p, &k);
for (int i = 2; i < k; i++) {... |
33e12e81cf79a96ac71225e3719018f8314ca7c0 | 5a5374bb169510b4f10dc8c9e1bb9139eefe9c8d | crh5354/Loger | /win/main.cpp | C++ | cpp | 911 | no_license | #include "main.h"
#include "AppDelegate.h"
#include "LogerSingleton.h"
#include <iostream>
using namespace std;
USING_NS_CC;
// uncomment below line, open debug console
// #define USE_WIN32_CONSOLE
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTS... |
37757bf770b97ca6e49d26b3d6f896a3ac8367a2 | 06f6b7f24619aabb03cf6618e69b399c32ef980c | snailcoder/SimpleML | /simpleml/src/main.cpp | C++ | cpp | 981 | no_license | #include <iostream>
#include <vector>
#include "perceptron.h"
#include "common.h"
using namespace std;
using namespace simpleml;
int main() {
double w[] = {0, 0};
RealVector weight(w, w + 2);
Perceptron perceptron(weight);
double x1[] = {3, 3};
double x2[] = {4, 3};
double x3[] = {1, 1};
vector<Cla... |
79a3db0e52e31070d9ce0ed59ff615f67568d0e8 | 4b483b305f36f4a3fc05cfd44303ff2ec180b605 | 2uschauer/Leetcode | /23. Merge k Sorted Lists(Merge+ recursion).cpp | C++ | cpp | 941 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* mergeKLists(vector<ListNode*>& lists) {
int n=lists.size();
if(n==0)return NULL;
if(n==1)return lists[0];
wh... |
f3e2fa865e2d98cb44f6a8621a58868f83e098f5 | 1f71f3e988094845b21bd010c673f07824b484d0 | JunruTao/Learn_Maya_Scripting | /Maya_API/Prac_1_HelloWorld/src/helloWorldCmd.cpp | C++ | cpp | 1,296 | no_license | //-
// ==========================================================================
// Copyright 1995,2006,2008 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk
// license agreement provided at the time of installation or download,
// or which otherwise accompanies th... |
94a2e7d040410377032de1fee94d994894d13590 | 43cc8648f523fe9a290747ac775ec37f012920e1 | EdgeLord836/DATA-STRUCTURES | /03Searching/01SingleElementInSorted.cpp | C++ | cpp | 603 | no_license |
int Solution::solve(vector<int> &A) {
int n = A.size();
int low = 0;
int high = A.size()-1;
while (low <= high) {
int mid = low + (high-low)/2;
bool isSingle = true;
if (mid - 1 >= 0 && A[mid-1] == A[mid]) {
isSingle = false;
mid = mid-1;
} e... |
7cbb40c2911aa458114836c200d5fb3d177a4992 | 155f999e937c4b96b812105fa752b9c906f2cd0f | alleveenstra/High-Dimensional-Inspector | /hdi/visualization/linechart_dual_view_qobj.cpp | C++ | cpp | 4,717 | no_license | #include "linechart_dual_view_qobj.h"
#include <QFileDialog>
#include <QLayout>
#include <QtWebKitWidgets/QWebView>
#include <QtWebKitWidgets/QWebFrame>
#include <QtWebKit/QWebElement>
#include <QFile>
#include <QDir>
#include <sstream>
#include <iostream>
#include "hdi/utils/log_helper_functions.h"
//... |
f0499dd32febe148aa4fe8153ed986b25902f928 | 03f30aed70fc0715a1d799ca6a28c4f733623a7c | isliulin/jashliao_VC | /032_有捲軸的View/01_可以無限制的畫圖範例view/viewView.cpp | C++ | cpp | 5,408 | no_license | // viewView.cpp : implementation of the CViewView class
//
#include "stdafx.h"
#include "view.h"
#include "viewDoc.h"
#include "viewView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//... |
34a9fbd5f310dc1fd7b61d997ecfcdb66642a666 | d1d134e9b79ad5d1aea19425f2fee7b5a59b4d20 | FromHDDtoSSD/SorachanCoin-qt | /src/crypto/hmac_sha512.cpp | C++ | cpp | 989 | permissive | // Copyright (c) 2014-2018 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 <crypto/hmac_sha512.h>
#include <string.h>
#include <cstring>
namespace latest_crypto {
CHMAC_SHA512::CHMAC_SHA512... |
987c1ba2dbf0727b0e6fbed2e151250be9b083e9 | e9c673c738f6afed0b8a7b7535e5fb7139dc5d67 | lshi2004/Montevideo | /CPP/candy.cpp | C++ | cpp | 1,831 | no_license | //============================================================================
// Name : HC.cpp
// Author : HS
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <ios... |
ed2b75126f986c4f4758eec5e1d730b50aa8511a | 6ed3020a33fdf7806e93560cc6ce168584fa63f1 | yashar-sb-sb/my-codeforces-submissions | /600-699/660/(18766723)[OK]B[ b'Seating On Bus' ].cpp | C++ | cpp | 437 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef unsigned long long uLL;
typedef long double ldb;
typedef pair<int,int> pii;
int main()
{
ios_base::sync_with_stdio(0);
int n,m;
cin>>n>>m;
int a=1,b=2*n+1,c=2*n+2,d=2;
for(int i = 0; i < n; ++i)
{
if(b<=m)cout<<b<<' ';
if(a<=m)cout<<... |
d69963fe96b3f34d6ca3670e95bd22bf4327e5ed | 64537eb802b5a834f9c96bbee37ebdbb3653f2cb | LeeSongA/Algorithm_Study | /SWEA 1244 - 최대 상금/1244_sa.cpp | C++ | cpp | 688 | no_license | #include <iostream>
using namespace std;
int n, ans;
string num;
void cal(int now, int cnt) {
if(cnt == n) {
ans = max(ans, stoi(num));
return;
}
for(int i = now; i < num.size(); i++) {
for(int j = i+1; j < num.size(); j++) {
if(num[i] <= num[j]) {
... |
f1220da38569649611f13baab66961fd0580f0e9 | 8767b723cbfd9a379b617390edec38cc9fd013fd | winksaville/fuchsia | /zircon/system/dev/nand/nandpart/nandpart-utils.cc | C++ | cc | 3,130 | permissive | // Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "nandpart-utils.h"
#include <stdlib.h>
#include <string.h>
#include <ddk/debug.h>
#include <fbl/algorithm.h>
#include <zircon/assert.h>
// Chec... |
b97a52c021f8ce2dfff59f2fc6b6fda492ed426c | 96d60aad984d209f364b3e1ad16299d926ff3e49 | gunner14/old_rr_code | /main_project/feed/branches/feed/FeedInteraction/src/FeedInteractionI.cpp | C++ | cpp | 29,071 | no_license | /*
* FeedInteractionI.cpp
*
* Created on: 2010-4-22
* Author: ld
*/
#include <sstream>
#include "client/linux/handler/exception_handler.h"
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include "FeedInteractionI.h"
#include "IceUtil/RWRecMutex.h"
#include "IceLogger.h"
#include "Pe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.