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 |
|---|---|---|---|---|---|---|---|---|
33c85dba4706899f6644db42868045da8e6ee724 | dced4b67e056e3a1bd6b73de4c7a13a1e5a92f9b | stan-dev/perf-math | /tests/MathPR_1092/Columns_dot_product.cpp | C++ | cpp | 813 | no_license | #include <benchmark/benchmark.h>
#include <Eigen/Dense>
static void ColDotProduct_Old(benchmark::State& state) {
using Eigen::Matrix;
using Eigen::VectorXd;
using Eigen::MatrixXd;
MatrixXd m_d = MatrixXd::Random(1000, 1000);
MatrixXd m_d2 = MatrixXd::Random(1000, 1000);
for (auto _ : state) {
VectorX... |
7bf8787a6146ae0e579437fc51bf9b73186fea4c | 179b1d0ccc412fe8ec68bf04b39cf0ec5c6dac66 | f5gkw/visionS | /src/maskwidget.cpp | C++ | cpp | 6,982 | no_license | #include "maskwidget.h"
#include "ui_maskwidget.h"
using namespace cv;
using namespace std;
MaskWidget::MaskWidget(QWidget *parent)
: QDialog(parent),
ui(new Ui::MaskWidget) {
ui->setupUi(this);
image_set_ = false;
for(int i=0;i<15*12;i++)
selection_.push_back(false);
for(int i=0;i... |
c0a753ddf384a708fc58b912afe4a28acd1b7ff6 | a0755939606eb35e91fb38ea4a3e5fd56df2e033 | pniekamp/datum | /src/scene/lightcomponent.cpp | C++ | cpp | 7,119 | permissive | //
// Datum - light component
//
//
// Copyright (c) 2016 Peter Niekamp
//
#include "lightcomponent.h"
#include "debug.h"
using namespace std;
using namespace lml;
//|---------------------- PointLightStorage ---------------------------------
//|-----------------------------------------------------------------------... |
6b802c1d84539c72cc4d3eee5df162d52a7c2875 | 71f2135cae42a94694b68a829cc741423ced5e03 | charles-lunarg/vk-bootstrap | /src/VkBootstrap.cpp | C++ | cpp | 90,489 | permissive | /*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the “Software”), to deal in the Software without restriction, including without
* limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell co... |
1fd4d6b8c4d1e6eba11ec8cbe90e4eb4afee1357 | 94378fe467b52058f6077a1b797256d22b35f40e | lonelam/SolveSet | /d1006.cpp | C++ | cpp | 1,899 | no_license | #include<bits/stdc++.h>
using namespace std;
int ans[10][9][10][6][10][6][2];
bool vis[10][9][10][6][10][6][2];
struct node
{
int x1, y1, x2, y2, x3, y3, first;
};
const int inf = 0x3f3f3f3f;
int horsex[] = {1, 2, 1, 2, -1, -2, -1, -2};
int horsey[] = {2, -1, -2, 1, 2, 1, -2, -1};
int horsebanx[] = {0, 1, 0, 1, 0... |
c2b76824da7370f5c838528a5c17b609c1353262 | 383e147cff8cf268b64fbcffbe1970ef5d67c771 | Horaddrim/ananas | /kernel/dev/x86/atkbd.cpp | C++ | cpp | 5,784 | permissive | #include <ananas/device.h>
#include <ananas/driver.h>
#include <ananas/error.h>
#include <ananas/irq.h>
#include <ananas/kdb.h>
#include <ananas/lib.h>
#include <ananas/mm.h>
#include <ananas/tty.h>
#include <ananas/trace.h>
#include <ananas/x86/io.h>
#include <ananas/dev/kbdmux.h>
#include <machine/reboot.h>
#include ... |
990a17518bd23cbbbb40b6a85f31abd7da320a9d | baf5039cf8d8b93c9ad7b5f8456e0df7ad8b39b4 | mint41117/zhao_yuxi | /5.5/main.cpp | C++ | cpp | 232 | no_license | #include <iostream>
using namespace std;
int main()
{
int a=0,b=1,c=0,d=0;
cout<<"计算数的个数";
cin>>a;
for (b=1;b<=a;b++)
{
cout <<"要求和的数";
cin>>c;
d=d+c;
}
cout <<d;
}
|
b938f106ea8edf7e8af82af84b5929f4a14a9bde | f8c49bc39d4cdef0c84dbf3a2d9ac7cdd7c2f6c9 | mpigrobot/linear_algebra_cpp | /F/f.cpp | C++ | cpp | 338 | permissive | #include <iostream>
#include "../eigen/Eigen/Dense"
using namespace Eigen;
using Eigen::MatrixXd;
using namespace std;
int main(int argc, char* argv[])
{
MatrixXf a(2, 2);
cout << "a is of size " << a.rows() << "x" << a.cols() << endl;
MatrixXf b(3, 3);
a = b;
cout << "a is now of size " << a.rows() << "x" << a... |
c7a454196e80125691cd16e19958ff810d75866c | 30f77eca1584ab99b40f3f89e4552a88759056a1 | colemancda/skia | /src/core/SkDraw.cpp | C++ | cpp | 46,703 | permissive | /*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/core/SkDraw.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkMatrix.h"
#include "include/co... |
38dadbb9babc1ce62cc39b463133df719a8a0572 | e39d57c82645c11aabdaf31a4869152e0288c169 | santa01/graphene | /src/Light.cpp | C++ | cpp | 3,811 | permissive | /*
* Copyright (c) 2013 Pavlo Lavrenenko
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pu... |
490decf686a66287f38d8beca8eb07720b7c6dce | 47ae985811aa758d1b8ddc61de1c190af229cb2e | BimManager/cpp_cli | /playground/serialisation/main.cpp | C++ | cpp | 2,333 | no_license | /*
* main.cpp
*/
#define KEY1 "Foo"
#define APP_SET_SECTION "appSettings"
#using <System.dll> /* System::Collections::Specialized */
/* System::Configuration::AppSettingsReader */
#using <System.Configuration.dll>
#using <System.Reflection.dll>
#using <System.Runtime.Serialization.dll>
#using <System.Runtime.Ser... |
b339d76d2223dad7a912dadc9bc8452ada71d5eb | ee6f3119a2edf8b2f94680fe6640ab22429e91d6 | Cmessere/Cpp-practice | /Books Exercises/CppTroughGameProgramming/Exercises/Ch10/BetterBlackJack/BetterBlackJack/BetterBlackJack.cpp | C++ | cpp | 11,230 | no_license | //Blackjack
//Plays a simple version of the casino game of blackjack; for 1 - 7 players
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <ctime>
using namespace std;
class Card
{
public:
enum rank {
ACE = 1, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN,
... |
9aca07368a9cdf32c97caacae6f5a457c5fb7b67 | 817d2861a01d0daa2d55c6ff1c17f98738627d11 | taffy128s/OS_HW4 | /code/filesys/directory.cc | C++ | cc | 11,101 | permissive | // directory.cc
// Routines to manage a directory of file names.
//
// The directory is a table of fixed length entries; each
// entry represents a single file, and contains the file name,
// and the location of the file header on disk. The fixed size
// of each directory entry means that we have the restriction
// of... |
b0d80b3fc18fc3e4007c38e6a9fdadcc7be565e9 | ed451696821ab71c56902529fedf4b22790282c0 | heidigarcia92/Diary | /Progetto C++/Board.hpp | C++ | hpp | 978 | no_license | //
// Created by Heidi Garcia Canizares on 01/11/2018.
//
#ifndef DIARY_BOARD_HPP
#define DIARY_BOARD_HPP
#include <iostream>
#include <list>
#include "ActivityList.hpp"
using namespace std;
class Board {
public:
Board(string _name);
Board() {};
~Board();
string getName() const;
void create... |
1df493c572b4cf1baabd900dd259ebc3e2355645 | 31b8ca406afcdee23b3e920344170234510517f0 | ecopty/openvino | /inference-engine/src/legacy_api/include/legacy/ngraph_ops/eltwise.hpp | C++ | hpp | 918 | permissive | // Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <memory>
#include <ie_api.h>
#include "ngraph/op/op.hpp"
enum class ELTWISE_TYPE {Sum, Prod, Max, Sub, Min, Div};
namespace ngraph {
namespace op {
class INFERENCE_ENGINE_API_CLASS(Eltwise) : public Op {
... |
dd2d4505e3117fc89e9924a221866a06a3ff8da8 | e4586d9238e7a8e02843546f72c443e31423ad5e | jsherman/platform_frameworks_base | /core/jni/android_media_AudioRecord.cpp | C++ | cpp | 22,775 | permissive | /*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
ca3e5f6b2f89683ba7b252ca9e049eeb2ed2fcea | 272a2e04a38d3646b49e7cdb12efb62cc220581f | KatsuyaKikuchi/ProgrammingContest | /AtCoder/競プロ典型 90 問/017.cpp | C++ | cpp | 2,703 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(40)
const ll MOD = 1000000007;
const ll INF = (ll) 1e15;
template<typename T>
struct SegmentTree {
usi... |
d927967075d39cf35814a7d3873ec43d58972ea0 | 071289aa4c7a2425888986264b4561f2befbdbc1 | karvendhanm/coursera | /code_practice/pointers_stack_heap/arrays_in_heap.cpp | C++ | cpp | 649 | no_license | #include<iostream>
int main() {
int *x;
int size = 3;
x = new int[size];
for(int i = 0; i < size; i++) {
x[i] = i + 3;
}
std::cout << "the value of x is: " << x << std::endl;
std::cout << "address of x: " << &x << std::endl;
std::cout << "address of x[0]: " << &x[0] << std::endl;
std::cout << "address of... |
000be2f847ef9364b40bc9cc9f50a1f73c382e0e | 77b7166e99eebfa08e66baf65724897d3e68d1bd | kulhanek/nemesis | /src/lib/NemesisCore/project/utils/PODesignerTrajectories.cpp | C++ | cpp | 7,355 | no_license | // =============================================================================
// NEMESIS - Molecular Modelling Package
// -----------------------------------------------------------------------------
// Copyright (C) 2012 Petr Kulhanek, kulhanek@chemi.muni.cz
//
// This program is free software; you can redis... |
35cc12d9f62ec21e61b63e812564eda140204d99 | 5b263ba60d37f08ba75421bcf6602d1477a8bddb | doo9713/CS2D_DirectX9_2Dproject | /CounterStrike(DirectX9)/CounterStrike(DirectX9)/LoadApp.cpp | C++ | cpp | 707 | no_license | #include "LoadApp.h"
#include "GameObjList.h"
#include "GameObj.h"
#include "SpriteRender.h"
#include "AnimClipList.h"
#include "LoadManager.h"
#include "GameSound.hpp"
void CLoadApp::Initialize()
{
GameSound Snd;
Snd->Stop("Main");
TEXTURE.Clear();
GAMEOBJ.Clear();
CGameObj* obj;
CSpriteRender* csr;
TEXTURE... |
d6b332396f60a59ebdeb7693111ad41ae7eea280 | 0a1c14cc5b506449fdffbde2dad3c2fb91b70d3d | whitefoxx/nsnb | /nsnb_with_tc/src/nsnb.cc | C++ | cc | 6,637 | no_license | #include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <ctime>
#include <string>
#include <fstream>
// #include "config.h"
#include "nsnb.h"
void train(set<string> featureSet, string emailType, map<string, struct feature> &featureMap)
{
double score = pred... |
e6ce5230aa04394d40f45124fc2519960b59a662 | 46a9e5953d2ad6162bf3284e10cbf8f5b444ee5d | sadrulhc/chromium | /components/sync/engine_impl/cycle/data_type_tracker.cc | C++ | cc | 10,681 | 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 "components/sync/engine_impl/cycle/data_type_tracker.h"
#include <algorithm>
#include <utility>
#include "base/check.h"
#include "base/notreach... |
fb7d438ceab4a6546ccbad5bea6dc8a8201d21ac | 6a0c84dde0e4bb218c520970a87005e7c92a603b | zeromus/octafen-psx | /mednafen/psx/dma.cpp | C++ | cpp | 22,425 | no_license | /* Mednafen - Multi-system Emulator
*
* 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
* (at your option) any later version.
*
* This program is distrib... |
111c848a85b3f05dd6df178b08f1958bee537c83 | 0005a253d101f74c975bae74dfc5948a500f6bce | thomashaaland/ObjectOrientedProgramming | /oblig2/cpp/Resept.cpp | C++ | cpp | 3,306 | no_license | #include "Resept.h"
// Resept
Resept::Resept(const std::shared_ptr<Legemiddel> &legemiddel,
const std::shared_ptr<Lege> &lege,
int pasientId,
int reit)
: m_id(s_count++),
m_legemiddel(std::move(legemiddel)),
m_lege(std::move(lege)),
m_pasientId(pasientId),
m_reit(reit)
{ }
//... |
6fee8199a4c34c3032436cc3feabbea515b40c0c | d9781f653f56ab0a4ca0ad4716198c8201d4f5db | shubh09/shared | /Topcoder/SRM443/DIV2-250.cpp | C++ | cpp | 1,199 | no_license | #include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
using namespace std;
#define FOR(i,a,b) for (i=a;i<b;i++)
#define s(n) scanf("%d",&n)
#define p(n) printf("%d\n",n)
#define pl(n) printf("%ll... |
a39856aa0881d4611a951f5fdb1b1f9ddbfd3835 | f63875fb513d68b0547950d3f5e53ac2c07ae82f | hjllge/Private-Usages | /MPoint_main.cpp | C++ | cpp | 1,173 | no_license | #include <iostream>
using namespace std;
#include "MPoint.h"
////이항연산자
//int main(void) {
// MPoint aa(3, 5), bb(5), cc;
// cc = aa + bb; //지역으로 선언 시 cc = aa.operator +(bb)
// cc.PrintPos();
//
// cc = aa + 3; //따로 정의하지 않으면 cc = aa.operator +(MPoint(3))으로 번역됨, 오브젝트가 나도 모르게 생성, 변환 생성자에 의해 생성
// cc.PrintPos()... |
0c315ad227c7f64d890a59b3b496d44fd0425657 | 646832949293f467fe24febbb062f4dc3e0a173b | apl-cornell/MixT | /transactions/test_handle_serialization.cpp | C++ | cpp | 1,710 | permissive | #include "Handle.hpp"
#include "pgsql/SQLStore.hpp"
#include "mtl/transaction.hpp"
#include "mtl/transaction_macros.hpp"
#include <iostream>
using namespace myria;
using namespace mtl;
using namespace pgsql;
using namespace mutils;
using namespace tracker;
using namespace mtl;
int main(){
SQLStore<Level::strong> ss_... |
dfa9bb7159d1a6d08e33dff911c1eff855340622 | 0c824f94d502a69e0df89e0443f1b242588c91ad | zeta1999/mjmech | /mech/multiplex_client.cc | C++ | cc | 3,109 | permissive | // Copyright 2019-2020 Josh Pieper, jjp@pobox.com.
//
// 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... |
53f62597023a79b8a4aba28b87331abaffe23c46 | d970263b85bb9b590c99111c4e3263658adf8484 | MinusDelta21/Steering-Behaviors | /steering_IA/steering_IA/Idle.cpp | C++ | cpp | 975 | no_license | #include "stdafx.h"
#include "Idle.h"
#include "Agent.h"
void Idle::onEnter()
{
}
unsigned int Idle::update(void * pObject)
{
if (m_agent->m_hasFlag == true)
{
// OH SHIT, YO TENGO LA BANDERA VAMANOS A LA CHINGADA.
m_agent->m_fsm.SetState(BOIDSTATE::Base);
return 0;
}
if (m_agent->enemyInSight() != nullp... |
918b4f3699750270a78beeee542090be366d5f54 | d965b1443f8fcac1315fa90eb2ce7153474a2d54 | ErrorFlynn/nana-examples | /fancy_splash_screen.cpp | C++ | cpp | 2,176 | no_license | /*
This example shows how to implement a splash screen that displays some
text and an image loaded from a file. I have used Visual Studio to build
the example, and I have tested using this image file:
https://github.com/ErrorFlynn/nana-examples/blob/master/splash_screen.bmp
BE ADVISED: Nana release 1.6.2 has a bu... |
1aca6bd076bc71c7dc525a52ef8ca85b24baaa54 | 8db79091edbacb8cef18afd9b0d910a1d41eb15a | New-bottle/training | /2016fall/161001/tool.cpp | C++ | cpp | 213 | no_license | #include<iostream>
#include<cstdio>
#define LL long long
using namespace std;
int main(){
double a = 1, b = 1;
for(int i = 0; i <= 8; i ++, a = a * 1000, b = b * 1024){
cout << 1 - (1.0 * a / b) << endl;
}
}
|
cc85fa39b7e173be88bb539f3bed25ae02ce08c3 | 63f0a829c56140afe13364f1724f577b0684f2f0 | grayasm/git-main | /world/HeadFirstDesignPatterns/c_plusplus/Silver/Command/Undo/DimmerLightOnCommand.hpp | C++ | hpp | 713 | no_license | #ifndef _HFDP_CPP_COMMAND_UNDO_DIMMER_LIGHT_ON_COMMAND_HPP_
#define _HFDP_CPP_COMMAND_UNDO_DIMMER_LIGHT_ON_COMMAND_HPP_
#include "Undo.hpp"
namespace HeadFirstDesignPatterns {
namespace Command {
namespace Undo {
class DimmerLightOnCommand : public Command {
private: const Light* _light;
private: mutable int _pre... |
8906864af51a288e6b4e8cd1c3d80761169a3432 | aa1f0e69f334b020a7300c026fa04b77126a6e6e | Hengle/BlazingSails_SDK | /SDK/BZ_BP_AOEBombExplosion_parameters.hpp | C++ | hpp | 1,029 | no_license | #pragma once
// BlazingSails (Dumped by Hinnie) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//-----------------------------------------------------------------------... |
3868d4c5e096ae8ce41f340164b1dfc006f52284 | b927f2a4dbdde666d12ec1cd46a1cd060748fb7e | iridium-browser/iridium-browser | /buildtools/third_party/libc++/trunk/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp | C++ | cpp | 1,652 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
81355dad79695fd66cef26835e6273f15fc600ae | 179a1c09363216edad12c27a87cdd1b8ec658ee5 | mbwk/simple_vm | /src/vm.cpp | C++ | cpp | 1,733 | permissive | #include <cstdio>
#include "instr.hpp"
#include "vm.hpp"
int registers[mbwk::VM::Registers::REGISTER_COUNT] = { 0 };
bool running = true;
#define STACK_MAX 256
int stack[STACK_MAX];
std::vector<int> *program;
bool
mbwk::VM::isRunning()
{
return running;
}
void
mbwk::VM::nextInstr()
{
++registers[PC];
}
i... |
b526435324140f9d8d0cec3b0911714a8a35edc2 | f6dfc46ce01ffc235f7f8e8146cd145ade0a2be8 | johnathan79717/competitive-programming | /TopCoder/SumAndProductPuzzle.cpp | C++ | cpp | 5,441 | no_license | #include <string>
#include <algorithm>
#include <queue>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <map>
#include <deque>
#include <climits>
#include <set>
#include <vector>
#include <functional>
#include <stack>
#include <unordered_set>
#include <unordered_map... |
d8a9d30d5d7623ff0dc52557921663af339415a5 | 31daca617eba801ac8eb6692900e0051bd2e07e3 | pqrs-org/Karabiner-Elements | /src/vendor/cget/cget/pkg/chriskohlhoff__asio/install/include/asio/traits/require_concept_free.hpp | C++ | hpp | 2,912 | permissive | //
// traits/require_concept_free.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifnd... |
d73f90ac4cb7300eeda664c039f366e28ec32873 | ffd5b0fa983bbafa9375dfd54038fcc74f7221a5 | mikedn/runtime | /src/coreclr/vm/classcompat.cpp | C++ | cpp | 147,657 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ===========================================================================
// File: CLASSCOMPAT.CPP
// ===========================================================================... |
ccdf8c7b0216e42e4f1f75311542fb51623df4dc | c9037632afcbca81f4b3f75d15f4a41ad40489d9 | gstavrinos/ros_opencl_tests | /src/cpu.cpp | C++ | cpp | 2,680 | no_license | #include <string>
#include <ros/ros.h>
#include <sensor_msgs/Image.h>
ros::Publisher pub;
int blur_radius;
void callback (const sensor_msgs::Image& msg){
sensor_msgs::Image result = sensor_msgs::Image(msg);
for(int i = 0; i < msg.data.size(); i += 3){
unsigned sum[3] = {result.data[i], result.data[i+1... |
914e2b01ec111a0478e97db98c4a3d93fef60e4c | fa51a99b782fa57ce51df4b749d7bac693696ac9 | mcellteam/mcell | /libmcell/api/geometry_utils.cpp | C++ | cpp | 9,335 | permissive | /******************************************************************************
*
* Copyright (C) 2020 by
* The Salk Institute for Biological Studies
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*
***********... |
2b6fa0b43be10b8051011520da4d8f7db5b07a7d | b50648e8b1cb0fc4f66af0adc7999f79a093cdbb | artemp/paleoserver | /src/connection.hpp | C++ | hpp | 2,212 | no_license | //
// connection.hpp
// ~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef PALEOSERVER_CONNECTION_HPP
#def... |
1fa707427e3233c66d06336a0f4b6168df0f3ed6 | 5edea3a5328d4a0b96fd73806859c83669922d04 | goldYoungHwan/AlgorithmJobs | /Simple Brute-Force/GCD LCM.cpp | C++ | cpp | 299 | no_license | #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0) {
return a;
}
else {
return gcd(b, a%b);
}
}
int main() {
int a, b;
cin >> a >> b;
int k;
int glc, lcm;
k = a > b ? a : b;
glc = gcd(a, b);
lcm = a*b/glc;
cout << glc << endl << lcm << endl;
} |
c2e2e4395ce37d43f946a288b7dd68b233cf8390 | 3df6c764ee77a753209bc30cfb75b7f9ffbc635b | mayah/workspace | /base/strings/symbol_pool.cc | C++ | cc | 393 | permissive | #include "base/strings/symbol_pool.h"
namespace strings {
Symbol SymbolPool::intern(std::string str)
{
auto it = table_.find(str);
if (it != table_.end())
return Symbol(it->second.get());
auto ptr = new std::string(str);
std::unique_ptr<std::string> value(ptr);
table_.emplace(std::move(st... |
9e60b2fe4c7860d743a7b3fb5c5068d41182ae27 | 84e01458eba1409b0cb8b633f814c79b40a7352f | cjang/chai | /jitast/TransLitdata.cpp | C++ | cpp | 2,450 | permissive | // Copyright 2012 Chris Jang (fastkor@gmail.com) under The Artistic License 2.0
#include "AstLitdata.hpp"
#include "PrecType.hpp"
#include "TransLitdata.hpp"
namespace chai_internal {
////////////////////////////////////////
// dispatched operation
BaseAst* TransLitdata::sub_eval(void) const
{
if (1 == _N)
... |
b635d2948ad32f65b05114e53aab519d9d71c699 | acb538f945c1af35c7cf1a5077b0d2c7284bdf01 | Praful-a/cplusplus-programming | /programs/falling_mat.cpp | C++ | cpp | 1,725 | no_license | #include<iostream>
#include<string>
#include<thread>
#include<cstdlib>
#include<ctime>
#include<chrono>
// Width of the matrix line
const int width = 70;
// Defines the number of flips in Boolean Array 'switches'
const int flipsPerLine =5;
// Delay between two successive line print
const int sleepTime = 100;
... |
26509a607291f21a9c8d6ce67e7ed0a83bb5adae | f4046fe877ab32943566cf32c3ae6e99c7b0c38c | zyfjeff/utils_code | /thinker/stream12.cpp | C++ | cpp | 897 | permissive | #include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
/*
* 一些开关标志位
* ios::skipws 跳过空格(输入流默认情况)
* ios::showbase 打印整型值时指出数字的基数
* ios::showpoint 显示浮点值的小数点并截断数字末尾的零
* ios::uppercase 显示十六进制数值时使用大写A~F
* ios::showpos 显示整数前的加号(+)
* ios::unitbuf 单元缓冲区,每次插入后刷新流
*/
using namespace std;... |
1f5a8b38e3d9344c1d74caeb7b10b1f2feadaa99 | 47e36c9b62acc7542c6254bb74f00cd4ea8b26ba | diegowald/intellitrack | /IntelliTrack.RFIDUDPReader/tools/gdal-1.8.0/port/cpl_base64.cpp | C++ | cpp | 4,599 | permissive | /******************************************************************************
* $Id: cpl_base64.cpp 20794 2010-10-08 16:58:27Z warmerdam $
*
* Project: MapServer
* Purpose: Decoding Base64 strings
* Author: Paul Ramsey <pramsey@cleverelephant.ca>
* Dave Blasby <dblasby@gmail.com>
*
*************... |
9d806527ea4c6837f9c0f1dbb3f69e8f08104dda | 23413eb9aa20c755c47d807fd94f6a7daf7f021c | thada2000/NachenBlaster | /Actor.cpp | C++ | cpp | 4,388 | no_license | #include "Actor.h"
#include "StudentWorld.h"
#include "GameWorld.h"
#include <cmath>
Actors::Actors(int imageID, double startX, double startY, Direction dir, double size, unsigned int depth, int type) : GraphObject(imageID, startX, startY, dir, size, depth) { m_type = type; }
Actors::~Actors() {
}
int Actors::getType... |
3d1e354aacda322a204913f7dc5e28bedda77145 | c98158abce8df880595d39a26a1762b742e7d443 | pranavgupta1234/AlgorithmsAndDataStructures | /Codechef/Practice/Easy/ChefCoun.cpp | C++ | cpp | 266 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int start = 2*1000000000;
int nd = n;
for(int i=0 ; i<n ; i++){
cout<<start-nd<<" ";
nd--;
}
cout<<endl;
}
return 0;
} |
d57cde16ea09ea9a848d44e77d5bacc48233b69d | d5c1f050dcc42e71ba9062954ef66ade8d95ec2d | VietNguyen2004/Bai_Tap | /22.cpp | C++ | cpp | 364 | no_license | #include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;
const double PI = acos(-1);
int main(){
double xA,yA,xB,yB;
cin>>xA>>yA>>xB>>yB;
if(fabs(xA-xB)==fabs(yA-yB)){
double r = fabs(xA-xB)/2;
cout<<fixed<<setprecision(3)<<r*r*PI;
}else{
double r = sqrt((xA-xB)*(xA-xB)+(yA-yB)*(yA-yB))/2;
... |
823e1b612521a45aa384d9daac15d50dd7675c4a | dfdbaf9c7cafd2dbb151b91d2577bc154dafa38c | novaquark/aws-sdk-cpp | /aws-cpp-sdk-mediaconvert/source/model/NoiseReducerFilter.cpp | C++ | cpp | 4,104 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
f35a57cffc94af49a38a9843815d1f24f0da4b81 | 67135b35a3764c03415b407cbe020204e2b9a97d | khanghh/MAPF | /src/MapEditor.cpp | C++ | cpp | 7,552 | no_license | #include "MapEditor.hpp"
#include <fstream>
#include <iostream>
MapEditor::MapEditor(Map &t_map, MapEditorModel &t_model, MapView &t_mapView) : m_editorModel(t_model), m_map(t_map), m_mapView(t_mapView), m_isCtrlDown(false), m_isShiftDown(false) {
}
MapEditor::~MapEditor() {
}
bool circleContain(int32_t centerX, int... |
b82b245ed7f519bf20bb9a2a7128e4851927faec | 38123f7b3f04842144d28d8639c929a55a08c2f1 | utkarshsharma00/awesome_CPP | /LEVEL_12/printcoinchangepermutations.cpp | C++ | cpp | 636 | no_license | #include <iostream> //this is basically 'staircase' type question
#include <string>
using namespace std;
void print_coin_change_permutations(int arr[], int size_of_array, int sum, string as_of_now)
{
if (sum == 0)
{
cout << as_of_now<<endl;
return;
}
for (int i = 0; i... |
28a5ae73feaf6161a3bbd960c1c6d35d5e077e7a | 5c14025973e182c42ab89497bbbb224a7dc380a4 | shadowbehindthebread/Offline | /GeneralUtilities/src/DigitalFiltering.cc | C++ | cc | 3,160 | permissive | #include "GeneralUtilities/inc/DigitalFiltering.hh"
#include <stddef.h>
#include <cmath>
namespace mu2e {
namespace DigitalFiltering {
void zpk2tf(std::vector<double> &b, std::vector<double> &a, std::vector<double> &za, std::vector<double> &pa)
{
a[0] = 1.0;
if (za.size() > 0){
a[1] = 0.... |
d5ce54a222614ca58d31363e2af0d2c12f62f2bf | 0b2e562e8b9172217e2c7cd9f1a88330f6eddd9a | LucyEames/gec-mario | /MarioGame/SoundEffect.cpp | C++ | cpp | 331 | no_license | #include "SoundEffect.h"
SoundEffect::SoundEffect()
{
_sfx = NULL;
_channel = -1;
}
SoundEffect::~SoundEffect()
{
Mix_HaltChannel(_channel);
delete _sfx;
}
void SoundEffect::Load(std::string path)
{
_sfx = Mix_LoadWAV(path.c_str());
}
void SoundEffect::Play()
{
Mix_PlayChannel(_channel, _... |
73fca1184e2ca756bfb51ac827f2c4bdb39de9c7 | 42ff3f28b1296266400236ceeda3724280a240d5 | snyiu100/peridot | /bin/ledger/storage/impl/ledger_storage_impl.cc | C++ | cc | 4,782 | 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 "peridot/bin/ledger/storage/impl/ledger_storage_impl.h"
#include <algorithm>
#include <iterator>
#include <dirent.h>
#include "garnet/lib/callb... |
3efd072bca6688ed3d605c1f893072488a09bc5c | 9f49ced4f0a35118c82b929a06f3ae047ba961cf | Sahanduiuc/leetcode-solutions | /118.pascals-triangle.cpp | C++ | cpp | 455 | no_license | class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> ans = {{1}, {1, 1}};
if (numRows == 0) return {};
if (numRows == 1) return {{1}};
for (int i = 0; i < numRows - 2; ++i) {
vector<int> now(1, 1);
for (int i = 0; i + 1 < (int)ans.back().size(); ++i)
... |
0bc4fe74c4ed32ad8b4897cb23639b415a655263 | ad1d4cbb7d0467dba2b4694d144a430d326447ff | SilverIce/JContainers | /dep/boost/boost/archive/iterators/wchar_from_mb.hpp | C++ | hpp | 3,350 | permissive | #ifndef BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP
#define BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// wchar_from_mb.hpp
// (C) Copyright 2002 Ro... |
f7c20ac9235e068af36d83560c2d6eb5b045c161 | 95f88940a7b64f5abccee1e110e7e1528db57f09 | sjantli/algorithms | /practice_programs/cracking_the_coding_interview/dp/temp.cpp | C++ | cpp | 486 | no_license | #include<iostream>
#include<vector>
int main() {
std::vector<std::vector<int>> *vec = new std::vector<std::vector<int>>();
std::vector<int> x;
vec->push_back(x);
std::vector<std::vector<int> *> *vecptr = new std::vector<std::vector<int> *>();
vecptr->push_back(new std::vector<int>());
(vecptr->... |
9847dba77c2f3acb0e3a976df345674bfb61cdd2 | 010511426cc6231c6d6572c97d0884f26228d523 | AliTaheriNastooh/Codeforces_Problem | /100733E - Shi's throne.cpp | C++ | cpp | 1,099 | no_license | #include<stdio.h>
#include<stdlib.h>
void quickSort(int arr[], int left, int right) {
int i = left, j = right;
int tmp;
int pivot = arr[(left + right) / 2];
/* partition */
while (i <= j) {
while (arr[i] < pivot)
i++;
while (arr[j] > pivot)
... |
525b49173363b25ec21d7f9227f623bbd4f89075 | e6619805f3ff3790fc0f5162f942b9b3e26b45d9 | xLLLxLLLx/xLLLx | /cf/919/A.cpp | C++ | cpp | 309 | no_license | #include<bits/stdc++.h>
#define fr(i,x,y) for(int i=x;i<=y;++i)
#define rf(i,x,y) for(int i=x;i>=y;--i)
#define ll long long
using namespace std;
int main(){
int n;double m;
cin>>n>>m;
double maxn=100;
fr(i,1,n){
double x,y;
cin>>x>>y;
maxn=min(maxn,x/y);
}
printf("%.10f\n",maxn*m);
return 0;
} |
debef521357b0bfb04fbce8150550422460f1d84 | e8985fb10c80c33356b3fdf30c0fab417aa71145 | lori227/KFrame | /KFPlugin/KFStore/KFStoreModule.cpp | C++ | cpp | 1,293 | permissive | #include "KFStoreModule.hpp"
namespace KFrame
{
void KFStoreModule::BeforeRun()
{
_component = _kf_kernel->FindComponent( __STRING__( player ) );
//////////////////////////////////////////////////////////////////
__REGISTER_MESSAGE__( KFMessageEnum::Player, KFMsg::MSG_STORE_BUY_GOODS_R... |
5e3ed6ebc88ffa9f2ac9cec94af98c1163deb6f7 | 6c872c3ca447a776e97141398eddd48c1f3f2b52 | melihcicek/cpp-kursu-kodlar | /lambda/cpp20/init_pack_expansion/init_pack_02.cpp | C++ | cpp | 421 | no_license | #include <iostream>
template<class F, class... Args>
auto delay_invoke(F f, Args... args) {
return[=]() -> decltype(auto) {
return std::invoke(f, args...);
};
}
int foo(int x, int y, int z)
{
std::cout << "foo cagrildi\n";
std::cout << x << y << z << "\n";
return x + y + z;
}
int main()
{... |
75be4e11d7e7d81b5254772d6e74780fc3d5270d | b8f45d71fefb3a102981c10ddcb378152499f7de | zyyf/myChessGame | /cppgameserver/JSONObject.cpp | C++ | cpp | 1,329 | no_license | #include "JSONObject.h"
#include "Value.h"
#include "Read.h"
JSONObject::JSONObject()
{
}
JSONObject::JSONObject(const string & jsonStr)
{
int position = 0;
*this = Read::readObject(jsonStr, position);
}
JSONObject::~JSONObject()
{
}
Value & JSONObject::operator[](const string & key)
{
... |
447cf28b9a8f4dbaf571596cda3b8358f443f888 | ff6b6563872992c70aa7be412127d765ccc3c754 | arnab000/Problem-Solving | /codeforces/1465/B.cpp | C++ | cpp | 4,317 | no_license | /*#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
*/
#include<bits/stdc++.h>
using namespace std;
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print... |
c8437878d43d0958a3842981db640a0c61417fc6 | 43c96864e04308569c94d97738454a004e334551 | Emin-Abdurahmanov/BasicsOfProgramming | /Lectures/Lecture5/sumOfElements.cpp | C++ | cpp | 815 | permissive | #include <iostream>
#include <cmath>
#include <ctime>
#include <cstdlib>
using namespace std;
int main(int argc, char** argv) {
//declaration of array
int rows, columns;
cout << "Give number of rows\n";
cin >> rows;
cout << "Give number of columns\n";
cin >> columns;
int numberArray[rows][columns];... |
5c32f10775dbb1e610d59628f43c8dfc7d42b920 | c047d21fc8f2ec7035621190e7e01f05c9ffe948 | AriOliv/Waze2 | /back/djkistra_luiz.cpp | C++ | cpp | 15,302 | no_license | #include <stdio.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <bits/stdc++.h>
#include <vector>
#include <math.h>
#include <algorithm>
#include <queue>
#define INFINITO 10000
#define INDEFINIDO -1
using namespace std;
void print(vector<int> vetor){
for(auto value: vetor){... |
fb38f30925ae0315fe85fe675047f9da0af7fcc2 | 314f51f8e030eea0b3eb5720f140759024472ee7 | tmyksj/atcoder | /AtCoder Beginner Contest 138/C - Alchemist/main.cpp | C++ | cpp | 557 | no_license | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
priority_queue<double, vector<double>, greater<double>> que;
for (int i = 0; i < n; i++) {
double v;
cin >> v;
... |
788feec23bb2284f292fb8e3717c9eb80d4fc993 | f3eae852ffad66bd1604ed179da60481dac7675a | hagemt/curious | /main.cpp | C++ | cpp | 14,461 | no_license | // ===================================================================
//
// IMPORTANT: Do not make any changes to this file, except to
// uncomment the test cases in BasicTests and
// ExtraCreditTests as you work, and to write your own test
// cases in StudentTests.
//
// =============... |
5d86599239a9c2fe476a863d7eefb2532b12a03a | 7343b0b0212ceede6a45126c0dc6fa427fd671f3 | bigbugbb/video-player-infrastructure | /Core/MemRing.cpp | C++ | cpp | 2,399 | no_license | //
// MemRing.cpp
// QVOD
//
// Created by bigbug on 11-11-12.
// Copyright (c) 2011年 qvod. All rights reserved.
//
#include <iostream>
#include "MemRing.h"
#include "SysConsts.h"
using namespace::ios_qvod_player;
CMemRing::CMemRing()
{
m_nHead = 0;
m_nTail = 0;
m_nUsed = 0;
m_nCount = 0;
... |
62d245e7155245ae8b40bfbaf3251e949ab74d2a | 82962e0713fc01537741c2d730c3333bc0aee484 | randi2kewl/ShoutOut | /Visual Studio 2010/Juce/src/io/network/juce_MACAddress.cpp | C++ | cpp | 2,464 | no_license | /*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-11 by Raw Material Software Ltd.
------------------------------------------------------------------------------
JUCE can be redistrib... |
84df78fdde2c0ae8ca8d9f9f3caf49413e22a263 | 99c652ae97e863326d61c85e041b3fd216353c76 | sarthou/ar_track_alvar | /ar_track_alvar/src/ConnectedComponents.cpp | C++ | cpp | 13,309 | no_license | /*
* This file is part of ALVAR, A Library for Virtual and Augmented Reality.
*
* Copyright 2007-2012 VTT Technical Research Centre of Finland
*
* Contact: VTT Augmented Reality Team <alvar.info@vtt.fi>
* <http://www.vtt.fi/multimedia/alvar.html>
*
* ALVAR is free software; you can redistribute it and/... |
6d7e0540cd9ef45fa52f2e02f9bbdcb1dded6b13 | 0c4fb62528e2eda7f903e6dd941c0b7fced22d0e | RugRhat/PaintShooter | /PAINT/Source/PAINT/Projectile.cpp | C++ | cpp | 1,158 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Projectile.h"
#include "Components/StaticMeshComponent.h"
#include "GameFramework/ProjectileMovementComponent.h"
// Sets default values
AProjectile::AProjectile()
{
// Set this actor to call Tick() every frame. You can turn ... |
6f65908192d143a936ae9334fd1552384a04906f | a07d4a5da5e23bfaf1e858352e591fc3bfc08939 | sureyeaah/Competitive | /codechef/COOK84/CHNGFUNC.cpp | C++ | cpp | 1,212 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define FOR0(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define FOR(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define FORD(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a)... |
2ae05d0331f0c2228a34ef3136678a4923e909d1 | 6528d12e792632c787594469f1d8102812dc3a0d | demetrionq/chromium | /base/strings/string_number_conversions_unittest.cc | C++ | cc | 31,802 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/strings/string_number_conversions.h"
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>... |
cdb2a32681a53b107c0494db8ed96ee447cd6bb9 | dc92b2bc188215f6b4921c152b42f43f159f967c | IvanTrigueiro/Roteiro-7 | /Questão 1/src/Quadrado.cpp | C++ | cpp | 531 | no_license | #include <iostream>
#include "Quadrado.h"
using namespace std;
Quadrado::Quadrado(string n, double l, double h)//: FiguraGeometrica(n)
{
if(n == "Quadrado"){
cout << n << ": ";
cout << calcularArea(l, h) <<endl;
}
}
double Quadrado::calcularArea(double l, double h){
return l*h;
}
void Qu... |
33b1a8e048bffa1e75d32401874e6b23e2e681ba | 4511c8760ec9a47d5a69e526ae366c6eb2b13c2f | ursine/serenity | /Kernel/Memory/AnonymousVMObject.cpp | C++ | cpp | 13,462 | permissive | /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Arch/SmapDisabler.h>
#include <Kernel/Debug.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/PhysicalPage.h>
#include <Ker... |
002adc9e5fe187691361771c92f39125865242a2 | bdc20f7076863117cdd4930ef32de431bb0b5f5d | Samsung/Castanets | /ash/app_list/views/remove_query_confirmation_dialog.cc | C++ | cc | 4,732 | permissive | // Copyright (c) 2019 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 "ash/app_list/views/remove_query_confirmation_dialog.h"
#include "ash/app_list/views/search_box_view.h"
#include "ui/base/l10n/l10n_util.h"
... |
3b77906aff73cfd1cb291829ca15bb68a859b126 | 36c912bc99200764d8aab8cea5fe3e343875267f | ZitaoLi/FakerTSN | /tsn_app/test/hello.cc | C++ | cc | 322 | no_license | #include <gtest/gtest.h>
#include <hello/hello.h>
#include <iostream>
using namespace std;
static int test_hello() {
hello();
return 1;
}
static void test_test() {
cout << "test" << endl;
}
TEST(TEST_HELLO, TEST_HELLO) {
EXPECT_EQ(1, test_hello());
}
TEST(TEST_HELLO, TEST_TEST) {
test_test();... |
1eb10fd8190b83711a23f0a969d947354b574ac0 | a24f7c921ca5fc792bed26c9e4eec63b075e9378 | niuxu18/logTracker-old | /second/download/squid/gumtree/squid_function_1185.cpp | C++ | cpp | 718 | no_license | void Adaptation::Icap::ModXact::makeUsernameHeader(const HttpRequest *request, MemBuf &buf)
{
#if USE_AUTH
if (request->auth_user_request != NULL) {
char const *name = request->auth_user_request->username();
if (name) {
const char *value = TheConfig.client_username_encode ? old_base64_en... |
6ad1768acaa2f49f6095117ec9971ac66dc3e2ab | b85510c4405b03fadeee193d08d3eac8165708bd | jholloman/hex-grid-test | /src/main.cpp | C++ | cpp | 2,699 | no_license | #include "includes.h"
#include <time.h>
#include <GL/freeglut.h>
static Controller* curr_ctrl = NULL;
const int RESOLUTION[] = {1024, 768};
const int BOARD_WIDTH = 20;
const int BOARD_HEIGHT = 13;
int SLEEP_TIME = 10;
bool SHOW_FPS = true;
time_t seconds = time(NULL);
int fps = 0;
void display() {
time_t cu... |
48ce699153b0570fa9afb106e783da2e572863b0 | 7ac9bd9e81bad30edc09ac3dbea016ad0eab7d20 | tuxmark5/RSys | /include/RSys/Store/RSettings.hh | C++ | hh | 940 | no_license | #ifndef RSYS_STORE_RSETTINGS_HH
#define RSYS_STORE_RSETTINGS_HH
/**********************************************************************************************/
#include <RSys/RSys.hh>
/********************************************* RS *********************************************/
/* ... |
c24201b3b415e4da636c1a89b0fd116a3d810efd | 89d8f399c49f62d275c6c6eff8c498f476350513 | dielianxian/UEWebSocket-1 | /Source/WebSocket/Private/WebSocketBlueprintLibrary.cpp | C++ | cpp | 28,409 | permissive | /*
* UEWebSocket - Unreal Engine 4 WebSocket Plugin (modified original source from 2017 https://github.com/feixuwu/uewebsocket)
* Copyright (c) 2021 revzim
* 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... |
7426d4b5ec9ad29da8a8b84d4b751d2de866bec3 | 8411592c9105c34882b0f248cd521df9fd7235f4 | shivanshu1086/DSA | /Graphs/Shortest Path/floydWarshall.cpp | C++ | cpp | 1,257 | no_license | #include <iostream>
#define V 4
#define INF 99999
using namespace std;
void printSolution(int dist[][V])
{
cout<<"The following matrix shows the shortest distances"
" between every pair of vertices \n";
for (int i = 0; i < V; i++)
{
for (int j = 0; j < V; j++)
{
... |
f78a6274e3ec1e78f0ff04806e8c1f7b97038d6d | 9ddce8ccab1f96937b8b616e1dd301fa7571127f | Abdelbary/Bits-bytes | /CPP/The 3-sum Problem/The 3-sum Problem.cpp | C++ | cpp | 1,888 | no_license | // The 3-sum Problem.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
class Solution {
public:
vector<vector<int>> threeSum(vector<int>& A) {
sort(A.begin(), A.end());
... |
440050bef15df793d7de76a3d9add02474c9b214 | a5d2af3bca3908660c613c4596484dcf667609d8 | ffhfhf/jiwang | /模块1/main.cpp | C++ | cpp | 1,277 | no_license | #include<iostream>
#include<fstream>
#include<string>
using namespace std;
#define maxvalue 100
int n=9;
int dist[100];
int path[100];
struct link2
{
string i;//路由名称
int j;//权值
link2 * link=NULL;
};
struct link1
{
string i;//路由名称
string s;//路由ip
int flag;//删除位
link2*link=NULL;
};
link1 mai... |
641e5e0d8cc0598230f251017908889cca1cb8a6 | 5690de452bf73637b5ff27bab1ec0ad11a0fd4bc | palchukovsky/trdk | /sources/Interaction/Exmo/Product.cpp | C++ | cpp | 1,662 | no_license | //
// Created: 2018/04/07 3:47 PM
// Author: Eugene V. Palchukovsky
// E-mail: eugene@palchukovsky.com
// ------------------------------------------
// Project: Trading Robot Development Kit
// URL: http://robotdk.com
// Copyright: Eugene V. Palchukovsky
//
#include "Prec.hpp"
#include "Product.... |
e38be00e3436cea3c9a01884c14b87d57fe06f5d | b939c36ef78c9e3a3973c260954c561a1b72cd8e | hostinkey-project/hostinkey | /src/qt/sendcoinsentry.cpp | C++ | cpp | 7,438 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017 The Hostinkey developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit... |
20fe5b2c41e574c27c26ee56e5999106ea3a6eb8 | 0f07aee59d09b499488090b0acfdcbab02adf0d3 | Dennisbonke/managarm | /testsuites/posix-tests/src/mmap.cpp | C++ | cpp | 10,061 | permissive | #include <cassert>
#include <signal.h>
#include <setjmp.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include "testsuite.hpp"
namespace {
void *offsetBy(void *ptr, ptrdiff_t n) {
return reinterpret_cast<void *>(
reinterpret_cast<uintptr_t>(ptr)
+ n);
}
sigjmp_buf restoreEnv;
vo... |
75410fa95120ff217becde48d13c65b97a9fd728 | dda24db0b8d0b9917d7f53d36fbe87fe092ddd03 | ikmplx/Glitter | /Glitter/Sources/Model/Material.cpp | C++ | cpp | 2,780 | permissive | // ¯\_(ツ)_/¯
#include "stdafx.h"
#include "Material.h"
#include "Res/Texture.h"
#include "Res/Shader.h"
#include "Utils.h"
namespace MyGL
{
Material::Material() = default;
Material::~Material() = default;
StandardMaterial::StandardMaterial()
: StandardMaterial(nullptr)
{
}
StandardMaterial::StandardMateri... |
e2bb2e3aa0dc26c832eaf08f0517419a5f037989 | 7d5f803a771eadefdc0b90637add15df2885a772 | Csineneo/Vivaldi | /chromium/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc | C++ | cc | 2,394 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/t... |
867de4e8a7dd351d0a6ae30e7eaef9d642b535f3 | ebf829a284fc8246e13282d4e9a2fe57781c0cb4 | Grapes11/Works_for_TOR | /Conveyor/Conveyor/Conveyor.cpp | C++ | cpp | 1,009 | no_license | // Conveyor.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include "BlockNumber.h"
#include "BlockID.h"
#include "BlockName.h"
#include "Initialization.h"
int main()
{
BlockID* blockID = new BlockID();
Initialization* initial = new Ini... |
70881fad88a656320f974f4bcd9b9b1c334d669d | 1ae9414c2661802e2869a865cae0b2932bf7d119 | afrofoundation/afro | /src/rpcserver.cpp | C++ | cpp | 34,427 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcserver.h"
#include "base58.h"
#include "init.h"
#include "util.h"
#includ... |
c89ab6e204a0bbaa88c8dfe7f142895ab2dad411 | 03a3e8dbd6df24bca930492fd147913b484ea46f | kingroyahh/hui-code | /src/SkillMeta.cpp | C++ | cpp | 4,749 | no_license | #include "SkillMeta.h"
#include "Log.h"
#include "Meta.h"
#include "Define.h"
#include "MetaAlias.h"
#include <string>
using namespace std;
using namespace rapidjson;
void SkillMetaSet::AssignPath()
{
fpath = string(GetMetaRootPath());
#ifdef GRAV_UNITY_PLUGIN
fpath.append(dbfname);
#else
fpath.append(ME... |
054bec3856de2fe93489a8418088791cfa8afffc | fdcc8e96dda3a74a4772cd53c152d1692a37666d | alsheikhhusam/OSJobScheduler | /Code/IOQueue.cpp | C++ | cpp | 2,647 | no_license | // Program Name: Job Scheduler
// Programmer Name: Husam Alsheikh
// Description: Simulates a single CPU system that schedules jobs using Round Robin Scheduling Algorithm
// Date Created: 09/27/2020
#include <iostream>
#include <string>
#include "IOQueue.h"
#include "ProcessList.h"
using namespace std;
// Descrip... |
97364a72e3ed96461c0882b45529efeebf1fdc21 | 42a146623cfdb2c4574c0819911ce7113fce89fd | alexkonrad/notes | /cpp-primer-plus/2/carrots.cpp | C++ | cpp | 346 | no_license | // carrots.cpp -- food processing program
// uses and displays a variable
#include <iostream>
int main()
{
using namespace std;
int carrots = 25;
cout << "I have ";
cout << carrots;
cout << " carrots.";
cout << endl;
carrots = carrots - 1;
cout << "Crunch, crunch. Now I have " << carrots << " carrots... |
dcf73d445e570448773c28ddacc8df352bd56b59 | 910aca95d04e7b79b0be9d3992060f26b90dc414 | eternity6666/life-in-acm | /template/Prime/others/prime2.cpp | C++ | cpp | 473 | no_license | #include <bits/stdc++.h>
using namespace std;
// const long long maxn = 1e9 + 5;
const int maxn = 1e9 + 5;
bool prime[maxn];
void got_prime();
int main()
{
fill(prime, prime + maxn, true);
freopen("prime.out", "w", stdout);
// cout << 1 << endl;
for(int i = 2; i <= maxn; i++)
if(prime[i])
... |
d6179b533501513c3f0b6210b22f00fe272d9dea | 05a7650bdb73fe9807a0b4c312b1c8e929ed4d0b | embedded-tools/PersistenceLibrary | /Source/UnitTests/Test_TShortString.cpp | C++ | cpp | 4,241 | no_license | #include "UnitTests.h"
#include "TShortString.h"
class Test_TShortString : public TestFixture<Test_TShortString>
{
public:
TEST_FIXTURE( Test_TShortString)
{
TEST_CASE( TestSetters);
TEST_CASE( TestComparations);
TEST_CASE( TesTShortStringOperations);
TEST_CASE( TesTShortStringFunctions);
TEST_CASE( TesTSh... |
d60137553d7f694e66b072da2ff2c2d361fd42b8 | ac7b160e56cefcd65b153d86e8b3bb7a790b1cfd | kunhuicho/crawl-tools | /codecrawler/_code/hdu1109/16207815.cpp | C++ | cpp | 2,748 | no_license | #include<cstdio>
#include<cmath>
#include<cstring>
#include<queue>
#include<vector>
#include<ctime>
#include<functional>
#include<algorithm>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int MX = 1500 + 5;
const int INF = 0x3f3f3f3f;
const double exps = 1e-3;//æ¯è¦æ±ç²¾åº¦ä½2个就è... |
3b68a8013f776829d6dad083a8be4630cd725468 | bd4f41eb065c3372ff79a7c64009503d048e4a57 | rndmized/OkamiBushi | /UWP/Il2CppOutputProject/IL2CPP/libil2cpp/os/c-api/Semaphore.cpp | C++ | cpp | 1,754 | permissive | #include "os/c-api/Semaphore-c-api.h"
#include "il2cpp-config.h"
#include "os/Semaphore.h"
extern "C"
{
UnityPalSemaphore* UnityPalSemaphoreNew(int32_t manualReset, int32_t signaled)
{
return new il2cpp::os::Semaphore(manualReset, signaled);
}
void UnityPalSemaphoreDelete(UnityPalSemaphore* semaphore)
{
IL2CP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.