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 |
|---|---|---|---|---|---|---|---|---|
7359f880a00b485bdb8f2d4fc224a6144e7c2bc4 | 59b6117dd7a86c0b14f3b556db0c8061e08cd2d8 | pietern/goestools | /src/goesproc/file_writer.cc | C++ | cc | 2,231 | permissive | #include "file_writer.h"
#include <sys/stat.h>
#include <fstream>
#include <iomanip>
#include <util/fs.h>
#include "lrit/json.h"
#include "string.h"
using namespace util;
FileWriter::FileWriter(const std::string& prefix) : prefix_(prefix) {
force_ = false;
}
FileWriter::~FileWriter() {
}
void FileWriter::logT... |
2190da4dfac0dd31e9cbe8c285e7108283eae418 | a3a2a2ae10924067425fa6418b3960138f0e2ebf | eric3119/algoritmos-otimizacao | /binpacking/binpacking.cpp | C++ | cpp | 14,937 | no_license | #include <iostream>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <limits>
#include <json/json.h>
#include "helper.h"
#include "MetaGA.h"
#include "brkgaAPI/BRKGA.h"
#include "brkgaAPI/MTRand.h"
#include "BPDecoder.h"
#include "draw_bin.h"
#... |
e285885d72bce6a7f1de7afb42c5d63001834372 | ef57178720fca97b852e2c02a90b063b8c5d4b52 | degarashi/revenant | /src/gltf/v2/material.cpp | C++ | cpp | 4,101 | permissive | #include "gltf/v2/material.hpp"
#include "gltf/v2/texture.hpp"
#include "gltf/value_loader.hpp"
#include "gltf/check.hpp"
#include "../../gl/resource.hpp"
#include "../../gl/texture.hpp"
#include "../../gl/texture/mem.hpp"
namespace rev::gltf::v2 {
namespace L = gltf::loader;
using M = Material;
// --------------- ... |
bc0a39750842bcf39f87fce15ff3ef80d14bb59c | d63f0ce17bed2002dbc01e73b354ea3147903252 | ka4tik/SEAL | /native/src/seal/intencoder.cpp | C++ | cpp | 10,373 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#include "seal/intencoder.h"
#include "seal/util/common.h"
#include "seal/util/defines.h"
#include "seal/util/pointer.h"
#include "seal/util/polyarith.h"
#include "seal/util/uintarithsmallmod.h"
#include <algorithm>
#includ... |
e55461c81b7ea0ab0a8c0a82e01fba4cf25e185f | 8ba07cb95698683a5c570a9674eba86e2a9f50cd | kjetil-lye/fractional_brownian_motion | /fbmtest/src/test_fbm_1d.cpp | C++ | cpp | 4,546 | permissive | /* Copyright (c) 2019 Kjetil Olsen Lye, ETH Zurich
* MIT License
*
* 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... |
e3c72312b1ae43bbd1e7a84ab2f9d2bfe1cd114f | 7af553ceacb2843a9bb145551fbe1da276e40c15 | mashoujiang/openvino | /ngraph/test/backend/erf.in.cpp | C++ | cpp | 1,644 | permissive | // Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <algorithm>
#include <cinttypes>
#include <cmath>
#include <cstdlib>
#include <random>
#include <string>
// clang-format off
#ifdef ${BACKEND_NAME}_FLOAT_TOLERANCE_BITS
#define DEFAULT_FLOAT_TOLERANCE_BITS ${BACKEND_NAME}_... |
db7298dd341eb678496dbaf6f0292e529238b72d | adcd88631ee1b158a4ab6ebbdbb4bd667673e4f9 | Uma-Maheshwar-Reddy/Linear-Data-structures | /assignment stacks/structure of stacks.cpp | C++ | cpp | 871 | no_license | #include<iostream>
using namespace std;
struct student
{
int rno;
char name[100];
char section;
};
struct stack
{
int top;
int size;
struct student a[100];
};
void push(struct stack &s,struct student &st)
{
if(s.top==s.size-1)
{
cout<<"the stack is full "<<endl;
}
else
{
s.top++;
s.(a.rno)=st.rno;
s.... |
2ce533e8fa0f9bdbbc923cc61fd964ba9c6cccc9 | 808c0130e619ba88f871174856e5a188327d6b98 | dexter30/first-node-based-engine | /src/cpp/DebugDrawer.cpp | C++ | cpp | 2,449 | no_license | //#include "stdafx.h"
#include "../h/DebugDrawer.h"
//#include "Resources.h"
GLDebugDrawer::GLDebugDrawer() : m_debugMode(0)
{
}
void GLDebugDrawer::Initialise()
{
weak<Shader> shader = Resources::LoadShader("monolith");
m_modelMat = glm::mat4(1.0f);
//Linking variables in the program with the locations of th... |
44b0f842d5584fe440d79d807eeb50bdb6a95edc | f06c90aa94755953b941d83e53613eb4078d9bf7 | buiytre/StreetMetalBattle | /StreetMetalBattle/StreetMetalBattle/Source Files/GameStates/GameState.cpp | C++ | cpp | 821 | no_license | #include "GameStates/GameState.h"
#include "CommandQueue.h"
#include "Controller/Player.h"
GameState::GameState(StateStack & stack, Context context)
: State(stack, context)
, mWorld(*context.window, *context.fonts)
, mPlayer(*context.player)
, mAiController(&mWorld)
{
}
void GameState::draw()
{
mWorld.draw();
}
... |
c2b1d557cd162aaab3d62b425d30cb9e6a2dea28 | 80f8f3ed4f6c0dfb2f3a854602a44d21cd12e7fe | KLabp/Trajectory-similarity | /postgresserver/test/test.cpp | C++ | cpp | 2,154 | no_license | #include <iostream>
#include "sequence.h"
#include "core.h"
#include "csv.h"
#include <QApplication>
#include <QDebug>
#include <cmath>
#include "testqdatastream.h"
void openfile(Sequence *p, string file_name)
{
string fileName = file_name;
ifstream fin(fileName.c_str());
if(!fin.is_open())
{
r... |
980b17c864428e0b22c689f0e02fb15cdd544c1d | f970555e76a2b7b9f76cb99f5130ad98399cf254 | orantos/raytracer | /moving_sphere.hpp | C++ | hpp | 2,470 | no_license | #ifndef MOVINGSPHEREHPP
#define MOVINGSPHEREHPP
#include "hitable.hpp"
class moving_sphere: public hitable
{
public:
moving_sphere() {}
moving_sphere(vec3 cen0, vec3 cen1, float t0, float t1, float r, material *m) : center0(cen0), center1(cen1),
time0(t0), time1(t1), radius(r), mat... |
4d80970a7528fa2dfee007591c50cefdae0aea97 | 6bd7df202b483f3e765b8ac620517dc555e9f377 | jordandong/myleetcodes | /01007_MinimumDominoRotationsForEqualRow.cpp | C++ | cpp | 1,072 | no_license | /*
In a row of dominoes, A[i] and B[i] represent the top and bottom halves of the i-th domino. (A domino is a tile with two numbers from 1 to 6 - one on each half of the tile.)
We may rotate the i-th domino, so that A[i] and B[i] swap values.
Return the minimum number of rotations so that all the values in A are the... |
07d44cb424f1f22233b5a74712bc982b32228b9c | da0198ee48fd24670226d5644baee6e6a20dd890 | hugopeixoto/kiwi-blog | /app/controllers/posts.cc | C++ | cc | 1,908 | no_license |
#include "app/controllers/posts.h"
#include "http/request.h"
#include "helpers/core.h"
#include <stdlib.h>
// models
#include "app/models/post.h"
using app::controllers::PostsController;
using app::models::Post;
// views: not sure where these should go. I need the previous includes |:
#include "app/views/posts/inde... |
f4ce302b44a5c86793497a3ff3c700e0194beefc | 8dca9ba8e4c2ab3d421ff71356291d6a3133e098 | RolphWoggom/shr.tar | /Simpsons Hit&Run/game/libs/pure3d/toollib/src/tlFlexibleJoint.cpp | C++ | cpp | 26,590 | no_license | //=============================================================================
// Copyright (c) 2002 Radical Games Ltd. All rights reserved.
//=============================================================================
#include "tlFlexibleJoint.hpp"
#include "tlFlexibleJointChunk.hpp"
#include "tlSkeleton.... |
b9ec553824a921396fb999bb384341f4436133ac | 8f6d6a2252838ba1bb2371832a33c1eb86b3971e | XiaoLinhong/ecflow | /Viewer/ecflowUI/src/TextFilterWidget.cpp | C++ | cpp | 13,773 | permissive | //============================================================================
// Copyright 2009-2018 ECMWF.
// This software is licensed under the terms of the Apache Licence version 2.0
// which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
// In applying this licence, ECMWF does not waive the privil... |
bfe7228050e4ce11e65c02326e2c235d9aba390e | c66f69ee5923ea2c5b0eb4ebbe14220ae28673a2 | MichalTopola/Baza-Danych | /ConsoleApplication21/ConsoleApplication21.cpp | C++ | cpp | 2,058 | no_license | // ConsoleApplication21.cpp : Ten plik zawiera funkcję „main”. W nim rozpoczyna się i kończy wykonywanie programu.
//
#include "pch.h"
#include <iostream>
#include<string>
#include<limits>
using namespace std;
int wczytajOsobe(string name[], string surnename[], int number[]) {
int i = 0;
bool error = 0;
do {
++... |
8249f582e3baeffcfce6e927f9b6e295866a3dc9 | 73d7a8a02b6cc04a92b6c3805fee430e11955d5a | MagicalTux/pinetd4 | /mod/daemon/rconnect/ModRConnectClient.hpp | C++ | hpp | 310 | no_license | #include <core/ClientTcp.hpp>
#include <QTimer>
class ModRConnect;
class ModRConnectClient: public ClientTcp {
Q_OBJECT;
public:
ModRConnectClient(QTcpSocket *sock, ModRConnect *parent);
~ModRConnectClient();
protected:
void handleBuffer(const QByteArray&);
QByteArray raw_id;
QByteArray buf_in;
};
|
52575fa387ea025580825394282c90efef05f608 | 1a842dfad4361f1c31214c745b906057b7e8c87c | project-chip/connectedhomeip | /src/platform/nxp/mw320/MW320Config.cpp | C++ | cpp | 6,289 | permissive | /*
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2020 Google LLC.
* Copyright (c) 2018 Nest Labs, 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
... |
cbee525f8f447bfed7045ab3b5af5a88fc071762 | 2f5f31bef7c2f5b27144054f870028b8bb25709f | BeeswaxIO/fizz | /fizz/crypto/test/HkdfTest.cpp | C++ | cpp | 2,904 | permissive | /*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <folly/portability/GTest.h>
#include <fizz/crypto/Hkdf.h>
#include <fizz/crypto/Sha256.h>
#in... |
afb848201ac65b36176340cbd5c087cbdec2e25b | 6457e49ab917c1281cee7ff910c4780ffcb51196 | Sepp62/JetiExBus | /Examples/JetiExBusSensor/DemoSensor.cpp | C++ | cpp | 3,368 | permissive | /*
Jeti Sensor EX Telemetry C++ Library
JetiExSerial - EX serial output implementation
--------------------------------------------------------------------
Copyright (C) 2015 Bernd Wokoeck
Version history:
1.00 11/22/2015 created
Permission is hereby granted, free of charge, to any person ... |
b310e5a9bdf93fb79c0d1865a35f3a8f31fb4d0e | 244ba88e3807caf423b47e87f36174efe89cc1cc | tobia17/programmazione2 | /coding_contest/difficolta_1/23_doppioni.cpp | C++ | cpp | 942 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int doppioni(int *numeri, int n){
int doppioni = 0, copia[n];
for(int i = 0; i < n; i++){
copia[i] = numeri[i];
}
for(int i = 0; i < n; i++){
if(copia[i] != 0){
for(int j = i+1; j < n; j++){
if(copia[j] == copia[i]){
c... |
7596bd0374876468d4290b4cd12f56014b3741f7 | 1441c12b84eb030520665699773faf3b3a8bf8bf | ric2b/Vivaldi-browser | /chromium/chrome/browser/android/usage_stats/notification_suspender.cc | C++ | cc | 5,505 | permissive | // Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
#include "base/callback_helpers.h"
#include "base/check_op.h"
#include "chrome/andro... |
74cedd622ff06f935545573d25080fa693ba98e5 | 370b8c9efcb2582c6c190b5e44d72ef98f8f8c63 | zweiein/kaldi | /sandbox/korzinek/src/bin/extract-ctx.cc | C++ | cc | 7,449 | permissive | // bin/extract-ctx.cc
// Copyright 2011 Univ. Erlangen-Nuremberg, Korbinian Riedhammer
// 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
//
... |
9c518899fac44397546e3c7273ef993884eb5844 | 7f1170111b75be85f5cb57ee2ba535b127bacc67 | SoarGroup/Soar | /UnitTests/TestHarness/TestCategory.hpp | C++ | hpp | 1,453 | permissive | //
// TestCategory.hpp
// Prototype-UnitTesting
//
// Created by Alex Turner on 6/16/15.
// Copyright © 2015 University of Michigan – Soar Group. All rights reserved.
//
#ifndef TestCategory_cpp
#define TestCategory_cpp
#include <cstdint>
#include <vector>
#include <functional>
#include <map>
#include <string>
#... |
0933d626d96cc418e385812dd32a586a360984c7 | 38e309ac2e5b2480c11bb0620bd2a4b1655bf60f | yamanalab/prv_cmp | /prvc/prvc_share/prvc_dec_client_base.cpp | C++ | cpp | 4,016 | permissive | /*
* Copyright 2018 Yamana Laboratory, Waseda University
* Supported by JST CREST Grant Number JPMJCR1503, Japan.
*
* 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... |
8fc2f09751622de33fddcad38c6da06d95030192 | 3d3cf3e2890b1119bcab10e82f4c34b39d5e81ab | Maeiky/CpcdosOS2.1-1 | /CONTRIB/LLVM/src/lib/Tf/Scalar/LoopDistribute.cpp | C++ | cpp | 31,487 | permissive | //===- LoopDistribute.cpp - Loop Distribution Pass ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
1f98d4158d41e3d09b458b2ad40d0a817f24079b | a71eb8bbe9035dd7593985642803814b282cad42 | quantverse/quark | /src/rpc/main.cpp | C++ | cpp | 1,319 | permissive | /*
* main.cpp
*
* Created on: Jun 1, 2017
* Author: ondra
*/
#include <fstream>
#include <thread>
#include <couchit/couchDB.h>
#include <couchit/changes.h>
#include <couchit/document.h>
#include <imtjson/stringview.h>
#include "../quark_lib/constants.h"
#include "rpcApp.h"
using quark::RpcApp;
bool man... |
c04a3e575143fca03e5765f64f77e0908f433eaa | 29c642f91a4639ad64f4d29ecaebdf4b615b9a17 | smaillet-ms/netmf-interpreter | /DeviceCode/Drivers/MFUpdate/Storage/BlockStorageUpdate.cpp | C++ | cpp | 15,103 | permissive | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
///////////////////////////////////////////////////////... |
d5273e84e691a8873a6640fed441b84225bbc7fa | 16501049be3f6555fa51d724acdad6985d63d833 | ngthanhvinh/competitive-programming | /usaco/2018/CONTEST2-2018/atlarge_check.cpp | C++ | cpp | 328 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int ntest = 100;
for (int itest = 1; itest <= ntest; ++itest) {
system("./atlarge_gen");
system("./atlarge");
system("./atlarge_buf");
if (system("diff atlarge.out atlarge.ans") != 0) {
cout << "Wrong Answer\n"; return 0;
}
cout << "Accepted\... |
dda3f02e3dad5d22b6fee6b168c1c0ec4ae596b9 | 4a8439363b90f0039c13e046e6a7904fe0a38bf7 | jeonghopark/VectorFieldSpace | /VectorFieldSpace/src/main.cpp | C++ | cpp | 369 | no_license | #include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1280, 720, OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in widt... |
7c403675d11c2698606dd4d7362c7af17d5c2e5a | c1c8200126090f1648c546a234a64d9d2e66a53c | bareboat-necessities/marnav | /src/marnav/nmea/bww.cpp | C++ | cpp | 1,371 | permissive | #include <marnav/nmea/bww.hpp>
#include <marnav/nmea/io.hpp>
#include "checks.hpp"
namespace marnav
{
namespace nmea
{
constexpr sentence_id bww::ID;
constexpr const char * bww::TAG;
bww::bww()
: sentence(ID, TAG, talker::global_positioning_system)
{
}
bww::bww(talker talk, fields::const_iterator first, fields::con... |
6defa488699bc2de8121a5da5cb662af0f90115b | 7bf23912d777ee5970a9c01e54bfeb3c48316974 | karin0/problems | /probs/hdu6322-math.cpp | C++ | cpp | 237 | no_license | #include <akari>
IO<1000000, 1000000> io;
int main() {
int t, k;
io >> t;
while (t--) {
io >> k;
if (k == 1)
io << '5' daze;
else
io << 5 + k daze;
}
return 0;
}
|
24c6e66c57abd4ba065ce69de4b2927be42cf633 | 9ee3ac08ce4f573c9eb0db15d64aac74ce735242 | madurn/nrm_info_450_spring_2020 | /week7/program1.cpp | C++ | cpp | 873 | no_license | #include <iostream>
#include <cstring>
using namespace std;
string reverse(string *s1);
int main()
{
bool noBlank = true;
while (noBlank)
{
string str1;
string str2;
cout << "Please enter a word, phrase or sentence to be reversed." << endl;
getline(cin, str1);
... |
d4d1b14457952c747b766198112d7b25288248da | be492549369ccec1c446db3db16e60b48d0cd0bd | roxygen/maid2 | /source/sound/soundcore2.cpp | C++ | cpp | 7,933 | no_license | #include"soundcore.h"
#include"soundmessage1.h"
#include"soundobjectpcmstatic.h"
#include"soundobjectpcmstream.h"
#include"soundobjectpcmrealtime.h"
#include"soundobjectnull.h"
#include"../auxiliary/debug/warning.h"
namespace Maid {
//! サウンドオブジェクトの登録
/*!
@param pInfo [i ] 登録先
@param pObj... |
b3c8f10aed9b9767a3055b4b31468b4d1f8012b4 | 4cf27769c78051c4bc3698bb6013b8841e49c217 | TS2535824/StevensTyler_48102 | /Hw/Assignment_6/Gaddis_7thEd_Chap7_Prob3_ChipsAndSalsa/main.cpp | C++ | cpp | 1,420 | no_license | /*
* File: main.cpp
* Author: Tyler Stevens
* Created on July 19, 2016, 9:07 AM
* Purpose: Produces a report that displays sales for each salsa type
* total sales, and the names of the highest selling and lowest selling.
*/
//System Libraries Here
#include <iostream> //Input/Output libraires
using ... |
7e182abc2e182ec52de329dd2749ec7522d83298 | 67fb3469b81259d24bdc550492f2085db76f9ee9 | xueliuxing28/Medusa | /Medusa/Medusa/Rendering/Batch/BatchGroup.cpp | C++ | cpp | 4,598 | permissive | // Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#include "MedusaPreCompiled.h"
#include "BatchGroup.h"
#include "Resource/Effect/IEffect.h"
#include "Resource/Material/IMaterial.h"
#include "Graphics/State/Tree/Ren... |
d06b9ae4402ab420de816f74974fe5f1491ff22b | cf54a56d50cb8d2f722093bd5b63533773aaf27f | akarmi/tensorflow | /tensorflow/core/framework/model_test.cc | C++ | cc | 31,626 | permissive | /* Copyright 2018 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... |
c16c6de59586f3837037c536b6b63952d20ea850 | 0c00cc09b12ee5bf57925d9618a621900d09955e | mickkn/E2PRJ2 | /Implementering/SW CSS Hovedenhed/Controllers/Controllers/UC3Deaktiver.cpp | C++ | cpp | 256 | no_license | /*
* Controller UC3Deaktiver
*
* Af Bjørn Sørensen
*/
#include "UC3Deaktiver.h"
UC3Deaktiver::UC3Deaktiver(X10IF *Ptr)
{
X10IFPtr_ = Ptr;
}
void UC3Deaktiver::deaktiver(char* adresse)
{
X10IFPtr_->deaktiver( adresse );
}
|
8ea0b6151ad4be1e5d91f3072362bcf325467c9b | 2f12d995c7c03c0b3eb7b73e55ff26c9e85819b8 | lieppham/MyCode | /MyProjects/C++/2020/08.05/btest1.cpp | C++ | cpp | 805 | no_license | //File: btest1.cpp
//Author: yanyanlongxia
//Date: 2020/8/7
//U125752 王后万岁
#include <bits/stdc++.h>
using namespace std;
int n,p[1000005],dp[1000005];
vector<int>son[1000005];
void dfs(int x,int fa)
{
for(int i=0;i<son[x].size();i++)
{
int y=son[x][i];
if(y==fa)
conti... |
76d425104e1393c980051b5434cc7ed06f11cb6d | 31c8a406969e7e1febe5cb4bfe4439676c0ce892 | apache/openoffice | /main/sfx2/source/doc/docinf.cxx | C++ | cxx | 11,778 | permissive | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
09064648992090e586ec3cde4c0db1cd7dda8773 | df59d59629df901cffe2e14d16393861ed3b657f | stkaplan/raytracer-challenge | /test/Test_Ray.cpp | C++ | cpp | 3,387 | no_license | #include "catch.hpp"
#include "Ray.h"
#include "Intersection.h"
#include "Sphere.h"
#include "Transformations.h"
#include "Tuple.h"
using namespace raytracer;
TEST_CASE("Can create an query a ray")
{
auto origin = make_point(1, 2, 3);
auto direction = make_point(4, 5, 6);
Ray r(origin, direction);
RE... |
62234cdb2ce6441471616a6e85d42f1fe6399b6a | e87e09c02975ef7e1fcfcd98caa366cbfaeacb30 | wxWidgets/wxWidgets | /src/common/config.cpp | C++ | cpp | 19,291 | no_license | ///////////////////////////////////////////////////////////////////////////////
// Name: src/common/config.cpp
// Purpose: implementation of wxConfigBase class
// Author: Vadim Zeitlin
// Modified by:
// Created: 07.04.98
// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net
// ... |
22fc1d88f92fa581b7724fed3ef14aa16bf89c59 | f474dbb135b6e4eaf0a5083fbcd1332e0ce235e4 | sdavtaker/safefloat | /test/safe_float_addition_test.cpp | C++ | cpp | 4,244 | permissive | #define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/quote.hpp>
#include <boost/mpl/protect.hpp>
#include <boost/mpl/bind.hpp>
#include <boost/mpl/list.hpp>
#include <cmath>
#include <boost/safe_float.hpp>
#include <boost/safe... |
0842ec40ec17649a6c9c309b17066378db8c9e02 | 9b3979e864af35ab10e9a4a58cbb27e05dcacbd0 | Iwanciow/SecretGame | /Player.cpp | C++ | cpp | 260 | no_license | #include "stdafx.h"
#include "Player.h"
Player::Player():shape({40.f,50.f}), speed(0.f,0.f)
{
shape.setPosition(10.f, 680.f);
shape.setOrigin(20.f, 50.f);
}
Player::~Player()
{
}
void Player::Draw(sf::RenderWindow &window)
{
window.draw(shape);
} |
24895f20ddc4b78c8efc61ba42c49d9d5be5d9ac | 00fa156a6b23c964c057427d0cd833ea8acc7f55 | terablade2001/CCEXP | /C++/test/t00_Basics.cpp | C++ | cpp | 11,928 | permissive | // MIT License
// Copyright (c) 2016 - 2017 Vasileios Kon. Pothos (terablade2001)
// https://github.com/terablade2001/CCEXP
// 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 restri... |
706b53f75342fc59031036a2db8913bfd4ff0a9a | 06de30afc1f2581fdf9c8e0ff4d027512bc2fc77 | aeldar/kazntu-algs-srs1 | /main.cpp | C++ | cpp | 1,451 | no_license | #include <iostream>
#include <fstream>
#include <vector>
#include "Ticket.h"
#include "app.h"
using namespace std;
int main() {
std::vector<Ticket> v;
int sort_option = 1;
string filter_string = "";
// read file "data.txt" to fill in vector with actual data
int result_code = load_data("data.txt", v);
if... |
e89292f77543bf6dbefc998c4cccfd7670797c2e | 2dc4d7338c39edd66036398adc6ee8c085f80047 | Trailblazer01010111/chromium | /components/viz/service/display/overlay_strategy_underlay.cc | C++ | cc | 2,913 | 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 "components/viz/service/display/overlay_strategy_underlay.h"
#include "components/viz/common/quads/draw_quad.h"
#include "components/viz/common/... |
7ec8d7eee3624a05f5f4e61d19929fb4b9693cba | b64215e1f55d1ada59f86d0bd053e133fd98b7a4 | dineshmakkar079/My-DS-Algo-code | /geeksforgeeks/Binary_Tree_to_CDLL_(Function_Problem).cpp | C++ | cpp | 2,245 | no_license | /*
Time : Tue Oct 10 2017 23:33:03 GMT+0530 (IST)
URL : http://practice.geeksforgeeks.org/problems/binary-tree-to-cdll/1
Given a Binary Tree (BT), convert it to a Circular Doubly Linked List(DLL) In-Place. The left and
right pointers in nodes are to be used as previous and next pointers respectively in converted CDLL.... |
fa0e188090e87a5c27fec03121d6e9fda0ad2736 | 3a9770140f902d82ee27cbc945349b57afbb9bad | simantaturja/Competitive-Programming | /Online-Judge-Solutions/CSES/weird-problem.cpp | C++ | cpp | 302 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
cout << n << ' ';
while (n != 1) {
if (n % 2 == 0) n /= 2LL;
else {
n = 3 * n + 1LL;
}
cout << n << ' ';
}
cout << endl;
return 0;
} |
28f265d1035a0f2613d7486b8d84e9162160fe45 | 04771ad6edbd3ff3abcedc12183518d3e6b629ed | Pandinosaurus/nnabla | /include/nbla/function/inq_affine.hpp | C++ | hpp | 5,772 | permissive | // Copyright 2017,2018,2019,2020,2021 Sony Corporation.
// Copyright 2021 Sony Group 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.org/licenses/... |
ec0de17038767d765198d2fa2cc6dde9f68b760b | 89ed70f35a7d31710476694da8d052177d6f3e64 | soumyaukil/upwork | /C++/oldcode/Comm/DragDrop/DragDropListBox.cpp | C++ | cpp | 3,960 | no_license | #include "stdafx.h"
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h > // MFC OLE automation classes
#include <afxpriv.h>
#include "DraggySample.h"
#include "DragDropListBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE... |
263a78797fecee89f8302ddf71ee1a192245aade | 062cf0c0e2864be8671598bab18064b751cc6b25 | slunski/mathpresso-1 | /src/mathpresso/mathpresso.cpp | C++ | cpp | 20,106 | permissive | // [MathPresso]
// Mathematical Expression Parser and JIT Compiler.
//
// [License]
// Zlib - See LICENSE.md file in the package.
// [Export]
#define MATHPRESSO_EXPORTS
// [Dependencies]
#include "./mathpresso_p.h"
#include "./mpast_p.h"
#include "./mpatomic_p.h"
#include "./mpcompiler_p.h"
#include "./mpeval_p.h"
#i... |
41c38a41fb6676a2feb07237ee33ea0d621caaf2 | f7969c1e5b8878f9483246703889345663dba9ca | AgenorCoin/Agenor | /src/bench/bench_agenor.cpp | C++ | cpp | 572 | permissive | // Copyright (c) 2015-2020 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Copyright (c) 2021 The AgenorCoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
#include "key.h... |
5f4fcd67be98507333cbcbc30c722089a753cde1 | 1995e2fd32a6587cf9ac907796f88f9b751dbf3f | rggz8888/SmithWaterman | /Compiler/dpalc/lexer/dpal-lex.cpp | C++ | cpp | 56,898 | no_license | #line 2 "dpal-lex.cpp"
#line 4 "dpal-lex.cpp"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* First, we d... |
7d4403fe0e6a75ca313067a1804b9f21e541e43b | d17ecbcf04563fadebbaf96b067dd2086cdaa0d9 | PeterRoll/QtLearning | /Class3/Class3/GeneratedFiles/qrc_class3.cpp | C++ | cpp | 681 | no_license | /****************************************************************************
** Resource object code
**
** Created: Tue May 26 19:13:59 2015
** by: The Resource Compiler for Qt version 4.8.3
**
** WARNING! All changes made in this file will be lost!
****************************************************************... |
61dd134fef7c53bf6f12b867025c58f0d03cfa66 | b639d945004cfae49b0d9771f8744cd724a2e02e | KamilPolivka/node | /src/stream_wrap.cc | C++ | cc | 11,509 | permissive | // Copyright Joyent, Inc. and other Node contributors.
//
// 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, modi... |
7b43454ead2a092f6bf1f4f636dcf3d76fb6157e | 66577a7f3403b7ed96229982bb46f35cbf35a36c | cpkt9762/SCUM-SDK | /SDK/SCUM_BP_MountTypeWeaponMagazine76239_functions.cpp | C++ | cpp | 367 | no_license | // SCUM (0.1.17.8320) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SCUM_BP_MountTypeWeaponMagazine76239_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------... |
217ff1321e6c8100bf43f262562c812d65ce387a | 08c1a23db42fc6cd32f3533c64eb7ff43c1d8eeb | WhiZTiM/coliru | /Archive2/04/42210bc624102b/main.cpp | C++ | cpp | 1,330 | no_license | #include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/composite_key.hpp>
struct Person {
Person(int id, std::string name):
m_id(id),
m_name(name)
{
}
int m_id;
std::string m_name... |
83c6595f5a7d693e3e71ea0e805a62b5d51cf708 | b5022d708225d6894516aefb02f6a14197b26a04 | lam2003/poseidon | /poseidon/src/core/config_file.cpp | C++ | cpp | 15,026 | permissive | // This file is part of Poseidon.
// Copyleft 2020, LH_Mouse. All wrongs reserved.
#include "../precompiled.hpp"
#include "config_file.hpp"
#include "../utilities.hpp"
#include <asteria/compiler/token_stream.hpp>
#include <asteria/compiler/enums.hpp>
#include <asteria/compiler/parser_error.hpp>
#include <stdlib.h> //... |
a3324894e14eb7b558d80698871cbc5b59d7e301 | d64eb71dc59cb86826777424cd9e44a55074551d | snrkgotdj/Tera_SoulLike | /Engine/HDRFilter.cpp | C++ | cpp | 14,434 | no_license | #include "HDRFilter.h"
#include "Device.h"
#include "RenderMgr.h"
#include "ResMgr.h"
#include "Mesh.h"
#include "Texture.h"
#include "Material.h"
#include "ShaderMgr.h"
#include "Shader.h"
#include "KeyMgr.h"
#include "TimeMgr.h"
CHDRFilter::CHDRFilter()
: m_pDownScale1DBuffer(NULL)
, m_pDownScale1DUAV(NULL)
,... |
f4aa794eb8ed32fa178dc530ff803ca5bd748f32 | 98207a50b07649c2e4eda675ba863965309444d0 | adrien-matta/nptool | /NPLib/ressources/DetectorSkeleton/NPLib/TDETECTORNAMESpectra.cxx | C++ | cxx | 6,116 | no_license | /*****************************************************************************
* Copyright (C) 2009-XYEARX this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* F... |
54175404e21da77342143ac5bf327bac493db483 | 03d9711fb2890123c87bd5bbe5e64d9781b12915 | Palem1988/NewEPM | /src/test/versionbits_tests.cpp | C++ | cpp | 17,820 | permissive | // Copyright (c) 2014-2016 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 "chain.h"
#include "versionbits.h"
#include "test/test_epmcoin.h"
#include "test/test_random.h"
#include "chainparam... |
bd7e55d61555ebe488c6a411eb0ac0315c6f5bee | 2486abe8136bbb7a49ab6394753e998473b86deb | gauravk268/Competitive_Coding | /Interview Questions/Hacker Blocks/nikita_and_her_boyfriend.cpp | C++ | cpp | 959 | no_license | //?https://hack.codingblocks.com/app/contests/1783/1759/problem
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int a, b;
cin >> a >> b;
if(a > b) {
cout << abs(a - b) << endl;
return 0;
}
if(a % 2 != 0 and b % 2 == 0) {
cout << abs(a - b) ... |
3a3b311b8c23ba3e1a565f5edae1cde93f903cd7 | 41402845e6c7c90427db0834c1cbafc26273099c | Top-jia/http_file_server | /scheduler/threads/test_3/test_poll_2.cpp | C++ | cpp | 9,312 | no_license | #include"../threadpool.hpp"
#include<sys/types.h>
#include<sys/socket.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include<arpa/inet.h>
#include<netinet/in.h>
#include<assert.h>
#include<iostream>
#include<sys/epoll.h>
#include<stack>
#include<fcntl.h>
#include<errno.h>
#include<pthread.h>
#define BUFF... |
226a66f66ad987661c8f933a52e751911ac67565 | a189fc5ffabecc5e980863bc96ee2e313d89769a | greenfox-zerda-sparta/javorszkymazsi | /week-10/day-4/gomoku_server/Gomoku.cpp | C++ | cpp | 1,645 | no_license | #include "Gomoku.h"
Gomoku::Gomoku() {
initialize_board();
}
void Gomoku::init(GameContext& context) {
context.load_file("tile.bmp");
context.load_file("tojas.bmp");
context.load_file("tyuk.bmp");
}
void Gomoku::render(GameContext& context) {
create_board(context);
context.render();
}
bool Gomoku::is_fi... |
1cbc0b985b593e9dc93adf8c675b38c6c4fac922 | 5fbe91e45ac11b16e34d5386cbd5d31b4d563fe8 | AngryCaveman/C-Struct | /18番外02动态规划/动态规划基础/003最长非降子序/03.cpp | C++ | cpp | 1,077 | no_license | #include"03.h"
#define Max 6
//最长非降子序
/*5,3,4,8,6,7
求该数列的最长非降子序
*/
//自己想出来的方法
void Long01(int *A)
{
int Dp[Max];//记录i位置对应的相应的非降子序的个数
int i,j;
Dp[0]=1;//第一个元素为肯定为1
for (i=1;i<Max;i++)
{
if(A[i]>=A[i-1])
{
Dp[i]=Dp[i-1]+1;
}
else
{
for(j=i-1;j>=0;j--)
{
if(A[i]>A[j])
{
Dp[i]=Dp[j]+1;... |
cd36e38e60bc66a99b7c2db381378967e8b12804 | 3ac4fc38203305cf249c23a29a71dbe6de929d09 | QuentinDPT/Meta-Programming | /Meta programming/main.cpp | C++ | cpp | 420 | no_license | #include <iostream>
using namespace std;
template <unsigned int n> inline uint64_t factoriel(){
return n * factoriel<n-1>() ;
};
template <> inline uint64_t factoriel<0>(){
return 1 ;
};
/** COSINUS
template<unsigned int ordre, double x> inline double cosinus(){
return cosinus<>()
};
template<,> inline... |
ca3b61a195f0003e58f9d9313680a3d6c1e52538 | 64654de70d6f700d6e1c77542b336aa4454462f6 | diamondburned/wayfire-plugins-extra | /src/showrepaint.cpp | C++ | cpp | 8,384 | permissive | /*
* The MIT License (MIT)
*
* Copyright (c) 2020 Scott Moreau
*
* 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,... |
36d08d359b0653aee8d9162da369973c500ddab9 | 0b11ec28b2904387205bd9c2a40b13a1bca2cf0b | koba24/sgprcore | /src/test/netbase_tests.cpp | C++ | cpp | 14,596 | permissive | // Copyright (c) 2012-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Sgpr Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "netbase.h"
#include "test/test_sgpr.h"
#include <string>
#inc... |
c35081134557d4915f8ed9c2554a5f91d47675fb | 32184ab030f49eeda5f4fb4e59faff98dd055381 | Gwenio/synafis | /src/datatypes/state_type.cpp | C++ | cpp | 1,531 | permissive |
/*
ISC License (ISC)
Copyright 2018 Adam Armstrong
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.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... |
4effb1188f820518ce9b2aed8d1724a58cf0c054 | 5e58c1493e8126fa506e71bbda823c7fd0247815 | sumdud3/Cpp-Projects | /result.cpp | C++ | cpp | 213 | no_license | #include <iostream>
int main() {
int grade;
std::cout << "Enter Your Marks=\n";
std::cin >> grade;
if (grade > 60) {
std::cout << "Pass\n";
}
else {
std::cout << "Fail\n";
}
}
|
0b9920c47bd7873f45ca8571ddafd2ee94961d98 | 5ce927e520afaa200581eddcc769e6ab7892ecd8 | Kixeye/render-timing-for-unity | /RenderTimingPlugin/RenderTimingPlugin.cpp | C++ | cpp | 8,761 | permissive | // Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
3c3addbbcb8d02db7323b8c72bb3be3e87016cf8 | 90911f6096184706c9d0e038ee87f679b8223c04 | sharmaharish/anshul | /Pawn.cpp | C++ | cpp | 2,973 | no_license | #include "Pawn.hpp"
#include "Config.hpp"
#include "values.hpp"
using namespace std;
/**
*/
Pawn::Pawn(Color c, int p, Board& b)
: Piece(c, PAWN, Config::instance().pawnValue(), p, (c == LITE)? " P" : "#P", false, b)
{
int ofs[4] = { 9, 11, 10, 20 };
if (_color == LITE) {
for (int i = 0; i < 4; +... |
9dcf948f1176605a71b07ac25934bd17ee935661 | 5fd578cd2657e02626c5c1cd762d26f755182f47 | wpn-zju/Undergraduate-Course-Homework-ZJU | /Object Oriented Programming/HW6/main.cpp | C++ | cpp | 1,916 | permissive | #include <iostream>
#include "Vector.h"
class A {
public:
int a;
};
int main() {
// Vector<int>
Vector<int> v1(3); // ctor with size
v1[0] = 1;
v1[1] = 2;
v1[2] = 3;
Vector<int> v2, v3; // default ctor
Vector<int> v4(v1); // copy ctor
v2 = v3 = v1; // operator '='
std::cout << v2[0] << v3[0] << v4[0] << v2[... |
104bf94d83765c9dbf33c054f995a5662dc7d8fb | 5ddf2e985f83827756763d8768cf1bd22ea69542 | malaifa/source | /src/core/import_pose/PoseFromPDBLoader.hh | C++ | hh | 1,926 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
23e2f7308a5238ebc0d41976e44ee427db5616a3 | 75b745839c5d3904ce7aa34b7c3f484b91297897 | KarlJansson/GPU_tree-ensembles | /source_trunk/main_cmd/HandlerStandard.cpp | C++ | cpp | 4,747 | permissive | #include "stdafx.h"
#include "HandlerStandard.h"
#include "GUIManagerCmd.h"
HandlerStandard::HandlerStandard(GUIManagerPtr gui):IHandlerCmd(gui){
m_supportedParameters[L"d"] = "Dataset path.";
m_supportedParameters[L"a"] = "Defines the algorithm used; GPURF, GPUERT or CPUERT.\n Default: CPUERT";
m_supportedParamete... |
9df3f5c4f861588c7dd2ca1912533cb0502b6bcc | 03cf6a29ff60d261aa9c262fb63a0196278ece72 | TencentCloud/tencentcloud-sdk-cpp | /dlc/src/v20210125/model/CSV.cpp | C++ | cpp | 5,023 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
862d2fbf259a3add35c6ed95451e7a9d9cfc4c7a | 6122399680057ce0a57525e9bbb305f0d693723e | Nakama3942/SimpleProjects | /Projects/Kalinka6_PoluSortMass.cpp | C++ | cpp | 2,085 | permissive | //*Эта программа сортирует массивы. Достаточно всего лишь переписать масив и в NumMass указать, сколько вы написали элементов в массив. Если вы не хотите смотреть процесс сортировки - просто закомментируйте 20, 22, 28, 31-35 строки, и ещё - не вводите в массив переменные больше 2 000 000
#include <iostream>
#define... |
962243cbd180050aee9f898361f8e8941da64579 | 8645338fed168238f425d5b9918f58f60a87d93c | gafeol/competitive-programming | /ojs/cf/960/D.cpp | C++ | cpp | 1,379 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++)
#ifndef ONLINE_JUDGE
#define debug(args...) fprintf(st... |
7f50166c20ca741dadd5ce5bf8a54d13e94548df | 7eda4465b3cb07d4dd6c265c2a3d2c6a8c5025d9 | authenticate/vulkan-renderer | /include/inexor/vulkan-renderer/wrapper/swapchain.hpp | C++ | hpp | 3,272 | permissive | #pragma once
#include "inexor/vulkan-renderer/wrapper/device.hpp"
#include <stdexcept>
#include <string>
#include <vector>
namespace inexor::vulkan_renderer::wrapper {
class Semaphore;
class Swapchain {
private:
const wrapper::Device &m_device;
VkPhysicalDevice m_graphics_card;
VkSurfaceKHR m_surface;
... |
2b7b01cb0948986007ee5e42e7363e82d1c70a0e | b89d534c3d2abe5ef521649b382d5eff7b5336e6 | Shelly7942/hanja-sisg | /cpp/src/qmatrix.cc | C++ | cc | 3,579 | permissive | /**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "qmatrix.h"
#include <assert.h>
#include <iostream>
namespace fasttext {
QMatrix::QMatrix() : qn... |
914dc85a9ce50acde22813447cc265ed1a20edc4 | f852d53563326f1fce7c655f528b25cf05c0bfe2 | chaudharishreyas/SEM3_SPPU | /DSA/Group A/3(operations on strings).cpp | C++ | cpp | 4,474 | no_license | /*
NAME: shreyas chaudhari
CLASS: SE2
ROLL NO: 4
TITLE: STRING OPERATIONS
*/
#include<iostream>
using namespace std;
class strop
{
private: char a[30], s[10],b[10];
int i=0,l2=0;
public: void getst();
int len();
void copy();
void con();
void equal();
void getst2();
void rev();
void subs();
};
void s... |
f7927f29b7c0f46ec97497401bf9053edaa213b3 | 04e5f79ca9b24d15e38ca75e0b61234d7e71efc8 | shiponbhadra/cpp_project | /exp5.cpp | C++ | cpp | 9,052 | no_license | /* Experiment no5: A Mess owner wants to develop a software for its mess members. Everyday mess member meal
details will be entered in the software and after the month it will show the bill of the mess member. Mess member
deposit at least 1000 tk at beginning of the month. As a student of CSE, write OOP code for the... |
cfe9b111c6988c4f07e02f112a6e51948ae1b7da | adbe3f716752ed48ec493535689cf93be4568ee1 | AzizSayfutdinov/RaspberryPiRobot | /RaspberryPiCtrl/RaspberryPiCtrl/ToLeftState.cpp | C++ | cpp | 200 | no_license | #include "ToLeftState.h"
ToLeftState::ToLeftState(Handler* handler) {
this->handler = handler;
}
void ToLeftState::execute()
{
// robot->getDrive()->turnLeft(0);
handler->drive->turnLeft(0.8);
}
|
2055500e3c53bd37ee16b90b9121aa82c200dae3 | fe08c961c372db9bc9fd8a2266a3b56fba86e847 | kudoukaka/lblpwgtools | /code/CAFAna/CAFAna/Core/Spectrum.cxx | C++ | cxx | 27,840 | no_license | #include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/HistCache.h"
#include "CAFAna/Core/Ratio.h"
#include "CAFAna/Core/Utilities.h"
#include "Utilities/func/MathUtil.h"
#include "TDirectory.h"
#include "TH2.h"
#include "TH3.h"
#include "THnSparse.h"
#include "TObjString.h"
#include "TRandom3.h"
#include <cassert... |
f749454ee20fdd40e35da10156eab5348be8df41 | 1e5be697981ecb5222d7a109931111f86e77fbaf | Shadek07/uva | /Solved Category/DP/0-1 knapsack/10930.cpp | C++ | cpp | 2,131 | no_license | #pragma comment(linker,"/STACK:16777216")
#pragma warning ( disable: 4786)
#include<cstdio>
#include<cstring>
#include<vector>
#include<algorithm>
#include<iostream>
using namespace std;
vector<int> v1;
#define max 35
#define MAX 20000
#define MYMAX(x,y) ((x>y?x:y));
long int check[1000];
int limit;
int main()
{
lon... |
540d59fabdedbe43ca207fb800b01f8ed40e8b3e | 97aa3982644d028a3c31489bc99fb154e8caddc4 | renardbebe/Coder-Meng | /LeetCode/637. Average of Levels in Binary Tree.cpp | C++ | cpp | 887 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
map<long long, long long> sum;
map<long long, long long> node;
void dfs (TreeNode* root... |
974b91ca5945ede8be1e4990d1d28f1749e63aac | 97e82d5064ea110cb090392bf4261647f16795a9 | anki/avs-device-sdk | /CapabilityAgents/Alerts/test/Renderer/RendererTest.cpp | C++ | cpp | 11,467 | permissive | /*
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "... |
4900317ec24349cea75183ce86ead855914eb784 | 6ebf3ad7a1a14f5721878661e124b86d31c41300 | imos/icfpc2015 | /boost/type_traits/make_unsigned.hpp | C++ | hpp | 5,326 | no_license |
// (C) Copyright John Maddock 2007.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/type_traits for most recent version including d... |
b1de50e745529990137c965bdb78f5518875b257 | d90049f39c604eabb2eb97fd2c16f6fc08dc948f | snowflakedb/libsnowflakeclient | /deps/arrow-0.17.1/cpp/src/gandiva/function_registry_timestamp_arithmetic.cc | C++ | cc | 4,134 | permissive | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
d7d1e755bb54b6eef9ddb455bf47064256df0d67 | 138124a64bf1077df7057a0cb7afc577c3f5f9e9 | santiago-alvarezjulia/Taller2c | /TP3/common_socket.cpp | C++ | cpp | 3,758 | no_license | #define _POSIX_C_SOURCE 200112L
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <iostream>
#include <string>
#include "common_socket.h"
#include "common_SocketError.h"
#define OK 0
#define ERRO... |
d78e98ff2698b566259e82b9517c339d91ffcc27 | ae12cf9b62aabf086320f3bdfcd4066af70dd026 | cdh981009/Algorithm | /exercise/ahoCorasick.cpp | C++ | cpp | 3,785 | no_license | // 11479: 서로 다른 부분 문자열의 개수 2
// https://www.acmicpc.net/problem/11479
#include <bits/stdc++.h>
using namespace std;
#define INF 987654321
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR_(i, a, b) for (int i = (a); i <= (b); ++i)
// a node for linked list, value is an index of the needles
struct Node... |
16b8426919913a13bc63dac5f0abec3e3c42ba23 | e096c2930edb5668fff732897dc9491228679e2c | Kawa-oneechan/SCICompanion | /SCICompanionLib/Src/MFCFrames/ViewChildFrame.cpp | C++ | cpp | 4,985 | no_license | /***************************************************************************
Copyright (c) 2020 Philip Fortier
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or... |
c96d82d5fbaff21beb1b44728514124eef411230 | a0cbf976b8a485c5f3cf866d3220d7522e5b6ddf | Pwubben/BeagleSituation | /SynchronizeData/SynchronizeData/trim.cpp | C++ | cpp | 5,417 | no_license | #include "stdafx.h"
#include <iostream>
#include <ctime>
#include <conio.h>
#include "opencv2/opencv.hpp"
const int FPS = 15;
void unPause(cv::VideoCapture src, int& begin) {
cv::Mat tSrc, frame1,compFrame;
src >> tSrc;
src >> tSrc;
int frameCount = 2;
//Define rectangle on right side of screen
cv::Rect testS... |
95d1e6aa3e929e341bb467fe4c11942afae87026 | 9fd45bd8001d78176d0478d1eb12ed3910d0be85 | AbubakirovRA/leetcode | /98-ValidateBinarySearchTree.cpp | C++ | cpp | 2,707 | no_license | /*
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's key.
Both the left and right subtrees m... |
f82b19cd9cb539bc4d7c882f06efc8d2d11c792e | 5c5d82b9a110a51b40012387b0cc4678722230d9 | lsung8976/Algoritm | /PlusN.cpp | C++ | cpp | 498 | no_license | #include <iostream>
#include <vector>
using namespace std;
vector<unsigned int> d(10001, 0);
unsigned int func(int n)
{
if(d[n] > 0) return d[n];
for(int i=4;i<=n;i++)
{
d[i] = (d[i - 1] + d[i - 2] + d[i - 3]) % 1000000009;
}
return d[n];
}
int main()
{
int T ;
int temp;
... |
76472308b6def28b31372a12bed8380cd9c0957c | 13f0a89caf8c78336f34806b22938f0b19156c27 | paketo/bitcoinclassic | /src/bitcoin-cli.cpp | C++ | cpp | 12,157 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (C) 2017 Tom Zander <tomz@freedommail.ch>
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparamsbase.... |
91e2c7299e8e2fcd0020c02b2f0c3878fb984c9d | f6c80945f3c347ee1edc5333841c519243b09132 | TrellixVulnTeam/Chromium_7C66 | /chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc | C++ | cc | 12,723 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.h"
#include <stddef.h>
#include <utility>
#include "base/bind.h... |
bcd97ffb09f8f21fc8b8ffe24a15813143c56072 | 141d10afd524936a7de4826aef9dc6e644b50b70 | nicollis/Evil-Clutches | /Evil Clutches/OGE/OFPS.cpp | C++ | cpp | 1,073 | no_license | #include "OFPS.h"
OFPS OFPS::sFPSController;
OFPS::OFPS()
{
mOldTime = 0;
mLastTime = 0;
mSpeedFactor = 0;
mFrames = 0;
mNumFrames = 0;
fpsShowing = false;
fpsText = NULL;
}
void OFPS::onLoop()
{
//Every second clear stats
if (mOldTime + 1000 < SDL_GetTicks())
{
mOldTime = SDL_GetTicks();
mNumFram... |
df20171fe14e6ebe0561f327df895d5955fe572d | fc0e1466d7c585dc58f4bed73e50dafe994a4aac | zjin-lcf/HeCBench | /shuffle-sycl/main.cpp | C++ | cpp | 13,569 | permissive | /*
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.