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 |
|---|---|---|---|---|---|---|---|---|
4ae60975526d3b80ecdb85915f74dd0e62c3723e | 102fe5728c386b29abc910d64fada0b1d298d67c | Freeze-d/TankFire | /Source/TankFire/TankLocalPlayer.cpp | C++ | cpp | 783 | permissive | // Fill out your copyright notice in the Description page of Project Settings.
#include "TankLocalPlayer.h"
#include "TankPlayerController.h"
#include "Kismet/GameplayStatics.h"
#include "EZOnlineGameInstance.h"
UTankLocalPlayer::UTankLocalPlayer()
{
PendingLevelPlayerControllerClass = ATankPlayerController::StaticC... |
58f38d69f0e8061db8f77f8b5860b5c0f491a03b | 42020693f76b6620659b0e19cc7fca666dd3ac21 | demonsheart/C- | /rongyu/homework1/file2/2018152021_1120_姝g‘_362.cpp | C++ | cpp | 1,507 | no_license | #include <iostream>
#include <string.h>
using namespace std;
class Animal
{
protected:
string name;
int age;
public:
Animal(string n,int a):name(n),age(a){}
virtual void Speak()=0;
};
class Tiger :public Animal
{
public:
Tiger(string n,int a):Animal(n,a){}
virtual void Speak()
{
cout... |
fe242689feb2b91e30d204530eb37cbc23ac5fad | e0e1b58a19d64f274434b5c0738db664eaa02723 | brunolauze/openpegasus-providers-old | /src/Providers/UNIXProviders/ElementLocation/UNIX_ElementLocation.cpp | C++ | cpp | 3,220 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
f52ac883972700517d63617e396e51b51decd40d | db5a26c6dac1ee0786993ce9c4d31f882da94ba0 | marcusw89/Edge-of-Chaos | /src/scripts/src/InstanceScripts/Instance_ManaTombs.cpp | C++ | cpp | 50,393 | no_license | /*
* ArcScripts for ArcEmu MMORPG Server
* Copyright (C) 2009 ArcEmu Team <http://www.arcemu.org/>
* Copyright (C) 2008-2009 Sun++ Team <http://www.sunscripting.com/>
* Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
* Copyright (C) 2007-2008 Moon++ Team <http://www.moonplusplus.info/>
*
*... |
8fe43e43d43eb998eb13deb79d57c5262cc569e1 | 1e05c30ae8127d2aeac426c404e46dfa1c93524e | dv66/programming_problems_cpp | /mergesort.cpp | C++ | cpp | 894 | no_license | #include<bits/stdc++.h>
using namespace std;
int A[100000 + 7];
void Merge(int s , int mid , int e){
vector<int>left , right;
int n = mid - s + 1 , m = e - mid;
int posL = s , posR = mid+1;
for(int i = 0; i < n ; i++ , posL++) left.push_back(A[posL]);
for(int i = 0 ; i< m ; i++ , posR++) right.push_back(A[... |
8148abccada2017adb2ee34d558483b376582485 | d980592a2c1f4ac4c82e42fd60614efd5aecdec3 | jingju/CameraPreview | /app/src/main/cpp/native-lib.cpp | C++ | cpp | 4,099 | no_license | #include <jni.h>
#include <string>
#include <mv_recording_preview_controller.h>
#include "include/CommonTools.h"
#define LOG_TAG "ChangbaRecordingPreviewScheduler"
static MVRecordingPreviewController *previewController = 0;
extern "C" JNIEXPORT jstring JNICALL
Java_com_jingju_camerapreview_MainActivity_stringFromJNI(
... |
23ff89f3bb6d83aede1185f19dbe9f1e2bd3d796 | 693ffa6e265fc6c440dc4725dc4c89e7b7880688 | krkruk/Qt-OrionPi | /network/UdpSocket.cpp | C++ | cpp | 1,839 | no_license | #include "UdpSocket.h"
#include <QDataStream>
#include <QUdpSocket>
#include <QDebug>
UdpSocket::UdpSocket(const QHostAddress &bindAddress, int bindPort, QObject *parent)
: IfceIpSocket(parent),
client(new QUdpSocket(this)),
bindAddress( bindAddress ),
bindPort( bindPort )
{
client->bind(bin... |
16a2aedb43f42850ec2e853c90b5d595afedf6db | 44d8f5225f226ff50278dc97d19f8cd2e484d5e4 | KqSMea8/sstd_library | /sstd_boost/sstd/libs/log/src/attribute_set_impl.hpp | C++ | hpp | 10,763 | permissive | /*
* Copyright Andrey Semashev 2007 - 2015.
* 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)
*/
/*!
* \file attribute_set_impl.hpp
* \author Andrey Semashev
* \date 03.07.2010
*
* ... |
f12f615e2b158735670ac6d707705715ad75c638 | a9f40442b018c788ace4caa1bb843c470c001931 | agudeloandres/C_Struct_Files | /C_Tutorships/some_Cpp_functions/CAP15/P326.CPP | C++ | cpp | 200 | no_license | struct WORDREGS {
unsigned int ax, bx, cx, dx, si, di, cflag, flags;
};
struct BYTEREGS {
unsigned char al, ah, bl, bh, cl, ch, dl, dh;
};
union REGS {
struct WORDREGS x;
struct BYTEREGS h;
};
|
dc89b5255b5c426a5b3a0f6442ceb53d2b3a3ca1 | 59713b682c79627fc227bce5de5e503680192139 | TwistedJenius/Torque3D | /Engine/source/gui/editor/guiEaseViewCtrl.cpp | C++ | cpp | 3,582 | permissive | //-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 restrictio... |
91a7a014d659cbaf832cfcec1a3e337896c88b6f | dc2e3711870fbe3860516e2871e99fcde618c9b8 | 6guojun/discrete_mathematics_and_its_applications | /chapter_3_algorithms/3.1_algorithms/exercises/repo/source/solution_52.cpp | C++ | cpp | 1,859 | no_license | /*
Discrete Mathematics and Its Applications by (Kenneth H. Rosen)
Chapter 3.1
Solution for problem 52
Author: Rakesh Kumar (cpp.rakesh(at)gmail.com)
Date: Jan 26th, 2017
*/
#include <cstdio>
#include <vector>
#include <map>
#include <string>
const std::vector<int> coins = {1, 5, 10, 25};
const std::vector... |
45699b2a4b63732a4af8cba18a67e70d0265c2c3 | 2b3501677dc38ca4748310ba8fe8c582ddc06b8d | yijia/first_github_project | /PLCore/Src/IngestMedia/IngestMessageBox.cpp | C++ | cpp | 10,847 | no_license | /*******************************************************************/
/* */
/* ADOBE CONFIDENTIAL */
/* _ _ _ _ _ _ _ _ _ _ _ _ _ */
/* ... |
20d7b6401b8c363d405385a7dd058498f683a45f | eba734966e8ed79aeca9c6116e206a6a1b9a6400 | 107-systems/107-Arduino-BoostUnits | /src/boost/multiprecision/detail/number_base.hpp | C++ | hpp | 75,687 | permissive | ///////////////////////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MATH_BIG_NUM_BASE_HPP
#define BOOST_M... |
f386c16592701bcab18f56437a5b9de7e372120e | b057871db369e526121e1dd467a50b24fae83b49 | jiaaaaaaaqi/ACM_Code | /HDU/6394/22611959_TLE_0ms_0kB.cpp | C++ | cpp | 5,318 | no_license | /***************************************************************
> File Name : a.cpp
> Author : Jiaaaaaaaqi
> Created Time : Wed 23 Oct 2019 11:05:24 PM CST
***************************************************************/
#include <map>
#include <set>
#include <list>
#include <ctime>
#include <cmath>
#include <... |
a26ef2c68f198946fc0a3559ac95aee526fd7d86 | cc4e9c7ca0fbf20652586f8bebb0a045d6adb12c | Godsinred/tensorflow | /tensorflow/core/graph/mkl_layout_pass_test.cc | C++ | cc | 150,990 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
ed7aafc9c6168d2cd0d73d3dad873874f247a72a | 3baec31ab4c1dc70278ad466c3391aa69f963e0d | UmbertoCarlucci01/2D-Race | /Ostacolo2.cpp | C++ | cpp | 1,621 | no_license | #include "DoStrada.hpp"
#include "Ostacolo2.hpp"
using namespace std;
void Ostacolo2::appear(int z, int lvl){
if(yPos>=29){
int randomC= 0;
if(lvl<6)
randomC= z%(6-lvl);
if (randomC == 0) {
int randomNo = z % 52 + 1;
xPos = randomNo;
... |
413c6ec1cc05571cf53e2e4ed8e3299e7593bbc3 | 072122c2f9c5d1bd93f26f8e79abde8ee7b517c4 | vslavik/poedit | /deps/boost/libs/pool/test/test_poisoned_macros.cpp | C++ | cpp | 1,609 | permissive | /* Copyright (C) 2011 John Maddock
*
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
*/
//
// Verify that if malloc/free are macros that everything still works OK:
//
#include <functional... |
214caadda30e663c5c6acf75b44625c10355aa20 | 612fa34cb0c09aabaa324d93b85ab1ec0fb8bcfe | andrascii/RiveSolutions_SEO_Spider | /crawlerengine/src/response_headers.cpp | C++ | cpp | 4,462 | no_license | #include "stdafx.h"
#include "response_headers.h"
namespace
{
const QString s_mainHeader = "the main header";
const char s_endHeaderNameMarkChar = ':';
const char s_endOfHeaderMarkChar = '\r';
const char s_endOfHeaderMarkString[] = "\r\n";
}
namespace CrawlerEngine
{
void ResponseHeaders::addHeaderV... |
9fb67647811463efafba9d44e66747caff50c6d0 | 6d01e84cf2fd5224fd295fa605646a620c42ee6b | YJBeetle/QtAndroidAPI | /android-29/android/app/Notification_BubbleMetadata.hpp | C++ | hpp | 2,032 | permissive | #pragma once
#include "./PendingIntent.def.hpp"
#include "../graphics/drawable/Icon.def.hpp"
#include "../os/Parcel.def.hpp"
#include "./Notification_BubbleMetadata.def.hpp"
namespace android::app
{
// Fields
inline JObject Notification_BubbleMetadata::CREATOR()
{
return getStaticObjectField(
"android.app.Not... |
62fef52eb0f89ddcae5f1553586b89a023f28d11 | 4078167800f6cba3620eeee0f4b5817761af9132 | neoscoin/neos-core | /src/neosd.cpp | C++ | cpp | 5,985 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-li... |
bdd5f27e11fec828153fc7a2429b68223ebbb7a9 | f9de03c165dda463ae0cc0ec410390afb2eaa22c | satashun/algorithm | /cpp_src/data_structure/RangeSet.hpp | C++ | hpp | 2,076 | permissive | // ref:
// https://satanic0258.github.io/snippets/data-structure/SegmentMap.html
// ABC254G
// 区間をsetで管理するデータ構造(なお実装はmap) 各クエリO(log区間数)
// #### attention! : [l, r] ( include r, not [l, r) )
// if merge [l, c] and [c+1, r], set flagToMergeAdjacentSegment to true
template <class T, bool flagToMergeAdjacentSegment>
clas... |
253523a88bdcb979db6dbb2a1db0ec3289455b9a | 333ac12c830e3400107c197100ab630ce6539dfb | baker-project/baker | /baker_office_cleaning_application/src/map_management_client.cpp | C++ | cpp | 3,492 | no_license | /*
* Copyright (c) 2016-2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
d88df7930ddeb6978e1833176636811dac48796c | 0c4aa1e642f84116c8d1efd78158fc652bf84317 | doge-of-the-day/FastDTW_CPP | /src/fastdtw_cpp/projection_idc.cpp | C++ | cpp | 946 | no_license | #include <fastdtw_cpp/projection_idc.h>
#include <fastdtw_cpp/projection_idc.hpp>
namespace fastdtw_cpp {
namespace projection {
template class
ProjectionIDC<0,2>;
template class
ProjectionIDC<1,2>;
template class
ProjectionIDC<2,2>;
template
void ProjectionIDC<0,2>::project(const path::WarpPath<int> &path);
templ... |
05c6d38f4389088c12607e7cd683453c86d899b1 | 50b79a501f9b332cd8dc1a1982118e6d6fa1b68f | mathijs28498/tmr_driver | /src/tm_communication.cpp | C++ | cpp | 12,333 | no_license | #ifdef NO_INCLUDE_DIR
#include "tm_communication.h"
#include "tm_print.h"
#else
#include "../include/tm_communication.h"
#include "../include/tm_print.h"
#endif
#include <functional>
#ifdef _WIN32
// windows socket
#pragma comment (lib, "Ws2_32.lib")
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#... |
e20f9cc7d5d759e1609ff88c49800700accffb90 | a9c3b551ca8723a9272267282d7d8a508562f258 | gabrielmorete/Competitive-Programming | /OJ/AtCoder/abc220/f.cpp | C++ | cpp | 1,349 | no_license | #include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define fst first
#define snd second
#define fr(i,n) for (int i = 0; i < n; i++)
#define frr(i,n) for (int i = 1; i <= n; i++)
#define endl '\n'
#define gnl cout << endl
#define chapa cout << "oi meu chapa" << endl
#define dbg(x) cout << #x ... |
63c7994d197cf9711f32fef9f1f795de4c0dd38b | ab4dff0038e5d5e08e4bb2768dfe791505fbb012 | GarethDunbar1/AGP_Group | /AGP_Individual/main.cpp | C++ | cpp | 14,412 | no_license | // Std. Includes
#include <string>
// GLEW
#include <GL/glew.h>
// GLFW
#include <GLFW/glfw3.h>
// GL includes
#include "shader.h"
#include "camera.h"
#include "model.h"
#include "skyboxTexture.h"
// GLM Mathemtics
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
// O... |
ad93d969177d18ea075251e482ce556b90edffa3 | 979b1be5403aed85a14df1364f24d7a2aeafb166 | fengrenchang86/PKU | /2890/2651754_AC_234MS_584K.cpp | C++ | cpp | 800 | no_license | #include <iostream>
using namespace std;
struct ac
{
int v;
ac *next;
}*list[1200];
bool visit[1200];
void insert ( int x, int y )
{
ac *p = new ac;
p->v = y;
p->next = list[x];
list[x] = p;
}
void dfs ( int node )
{
ac *p = list[node];
while( p != NULL )
{
if ( visit[p->v] == false )
{
visit[p->v] = tr... |
c0c3f4751d13a2b066c9321a4d25d81f683fcc4d | c35ffce8ea93b6bde3fb7e4eae994a6686595189 | annaosousa/Tec-Prog | /TecProg(10-B-B)/Estudante.cpp | C++ | cpp | 706 | no_license | #include <iostream>
#include <string.h>
#include "Estudante.h"
Estudante::Estudante(int dia,int mes, int ano, const char* nome):
Pessoa( dia, mes, ano, nome)
{
}
Estudante::Estudante(int i):
Pessoa()
{
id = i;
RA = 0;
}
Estudante::Estudante():
Pessoa()
{
}
Estudante::~... |
33b5aa3f322fa28e6665f91258262f3eef171a93 | a1f2607c3a461c6534204ee8ac40c072707cb447 | Unreality3D/Unreality3D | /indie-studio/source/IndieStudio/GameManager.cpp | C++ | cpp | 6,592 | no_license | //
// GameManager.cpp for in /home/agor_m/epitech/cpp_indie_studio
//
// Made by Maxime Agor
// Login <agor_m@epitech.net>
//
// Started on Sun Jun 5 20:04:34 2016 Maxime Agor
// Last update Sun Jun 5 20:04:38 2016 Maxime Agor
//
#include "IndieStudio/GameManager.hpp"
#include "OgreObject/RenderObject.hpp"
#incl... |
e6ac15099156fb67eff1b159f1d34ccd13531222 | a4790282dae0a8ef25a0c36ffa99f52dcefb91e2 | baorepo/update_engine | /metrics_reporter_omaha_unittest.cc | C++ | cc | 19,622 | permissive | //
// Copyright (C) 2017 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... |
4c76fc6fcab4cd14411104a50b05f9e2b5d8ea2d | 8bec62a8f3ee6daf0fcb1be3edce46637e12b930 | 1218muskan/MarchCode | /Day 19/Jatin-Saini664.cpp | C++ | cpp | 369 | permissive | #include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin>>n>>m;
vector<vector<int>> a(n, vector<int>(m, 0));
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>a[i][j];
}
}
for(int i=n-1;i>=0;i--){
for(int j=i;j<m;j++){
cout<<a[n-i-... |
77fcd45464b5cbb25d79935d0db8968fcb739744 | 301dd6f9f52c35a2df6c3395280697b79425844d | BoHauHuang/PCCA-exercise | /Codeforces/Contest/565/C.cpp | C++ | cpp | 494 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int n, in;
cin >> n;
int cnt[43], seq[43], val[6] = {4, 8, 15, 16, 23, 42};
memset(cnt, 0, sizeof(cnt));
memset(seq, 0, sizeof(seq));
for(int i = 0 ; i < 6 ; i++)
seq[val[i]] = i+1;
for(int i = 0 ; i < n ; i++){
cin >> in;
bool ok = true;
for(... |
f752c0d55e09cc673e1159993fba4c1f656cd40e | 033e03a65cb93915237541ac15fccff5242335d1 | TenFifteen/SummerCamp | /spw/264-ugly-number/ugly_number.cc | C++ | cc | 1,245 | no_license | /**
* Problem: Write a program to find the n-th ugly number.
* Solve: (discuss board)use three pointers to remember
* every possible answer. We can use induction to
* prove the newly generated number 'now' must be
* bigger than the number 'before'.
* Because we use ++ every time, we wi... |
ce3ca83fa3a7d1d43b070d8da3a89ef5e30097c9 | caeaeaa518135c3cba409b1698380d09f9fce1e2 | Schrodinger1926/squanch | /tests/sandbox/src/main.cpp | C++ | cpp | 1,331 | no_license | #include "gtest/gtest.h"
namespace {
// The fixture for testing class Foo.
class FooTest : public ::testing::Test {
protected:
// You can remove any or all of the following functions if its body
// is empty.
FooTest() {
// You can do set-up work for... |
84cbc74df6b01341e02a5d7330ccca6fd9453e21 | 9a8bddcdf0bf80af785e022b72d17153c9ad18df | andrnag/ron-cxx | /rdt/rga.hpp | C++ | hpp | 6,974 | permissive | #ifndef CPP_RGA_HPP
#define CPP_RGA_HPP
#include <algorithm>
#include <unordered_map>
#include "../ron/ron.hpp"
#include "merge.hpp"
namespace ron {
using namespace std;
/** Implements Causal Tree CRDT, which is mostly the same thing as Replicated
* Growable Array CRDT. Except, RGA is stored as a tree, while CT is... |
2ddd20132414ebfa4dbebcf6bc3d99b43ae8f875 | bef22e31bb5d49beb8c3a77e7c256bd76575144b | apodolsk/bdt2 | /boost/date_time/v2/iso_week_number.hpp | C++ | hpp | 5,212 | no_license | #ifndef BDT2_ISO_WEEK_NUMBER_HPP
#define BDT2_ISO_WEEK_NUMBER_HPP
#include <ctime>
#include <cstdlib> //for int32_t
#include <string>
#include <tuple>
#include <array>
#include <boost/date_time.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/finder.hpp>
#include "basic_defs.hpp"
#include "d... |
380ac0c0f6aed802ce2b1457965d0384e0e8b857 | 669069c8d95296e3827290c078c5adaf717a6700 | Balog/H_A_Sockets | /Client/Hazards/Sample/MainForm.cpp | C++ | cpp | 142,575 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "MainForm.h"
#include "Zastavka.h"
#include "About.h"
#include "MasterPointer.h"
#include "InputFiltr.h"
//#include "LoadKeyFile.h"
//#include "Svod.h"
//#include "Rep1.h"
//#include "F... |
0e5d5fe80c83eb6f0d1c7053cd0e0c0d98d72024 | df2dd8135ab72aa07c5ccd77d999b59d6144173b | KDuyVu/Problems | /desert/statement/check.cpp | C++ | cpp | 1,181 | no_license | #include "testlib.h"
using namespace std;
const int N = (int) 1e5;
long long x[N];
long long y[N];
bool visited[N];
int main(int argc, char ** argv) {
registerTestlibCmd(argc, argv);
int n = inf.readInt();
for (int i = 0; i < n; ++i) {
x[i] = inf.readInt();
y[i] = inf.readInt(... |
cbade9adb93302de5d0ffeb91c72cb8da0d0eafc | d42704d60c4104fd663f411bc5353b4571105667 | derpomorj/CPP_Labs2017 | /B4/factorialContainer.hpp | C++ | hpp | 221 | no_license | #ifndef B4_FACTORIALCONTAITER_HPP
#define B4_FACTORIALCONTAITER_HPP
#include "factorialIterator.hpp"
class factorialContainer {
public:
factorialIterator begin();
factorialIterator end();
private:
};
#endif
|
615ab451fd497a26ffab1fd78ced0e817e6aa553 | e5d4bbd0cfd08ec3aa4dd4f25fe953c58bbb2131 | yangchaohong/Green-OS | /greenos2.2CH.cpp | C++ | cpp | 6,155 | no_license | #include <bits/stdc++.h>
#include <Windows.h>
using namespace std;
void getSystemName()
{
std::string vname;
//先判断是否为win8.1或win10
typedef void(__stdcall*NTPROC)(DWORD*, DWORD*, DWORD*);
HINSTANCE hinst = LoadLibrary("ntdll.dll");
DWORD dwMajor, dwMinor, dwBuildNumber;
NTPROC proc = (NTPROC)GetProcAddres... |
a641c7a7c67548bacfdc6b6d9fd903e6289f1c2b | 62d74c2028e7bc43eea5707df4365f31bf47f33d | calum-chamberlain/pylith | /unittests/libtests/faults/data/CohesiveKinDataQuad4i.cc | C++ | cc | 12,754 | permissive | // -*- C++ -*-
//
// ======================================================================
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University of Chicago
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://... |
b7d4186e5424546a9bfe8b7cb849f1ab57afc503 | ada287ab5f9fe5dd525ac6372c9ec10416d6e517 | cecilialeiqi/Primal-Dual-ActiveCD | /ComparedMethods/liblinear-accelerated/linear_bk.cpp | C++ | cpp | 57,717 | permissive | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <locale.h>
#include <omp.h>
#include "linear.h"
#include "tron.h"
typedef signed char schar;
template <class T> static inline void swap(T& x, T& y) { T t=x; x=y; y=t; }
#ifndef min
template <class T> static inline ... |
5518f871f46d8940e3086e25c3321555c50c4586 | b433005dac0edcb2845bac3a1462a24c8712a378 | niccokunzmann/positioning_system | /library/positioning_system_test/utility/test_location_functions.hpp | C++ | hpp | 481 | no_license |
#ifndef test_location_function_hpp
#define test_location_function_hpp
#include "positioning_system.h"
double position_to_offset(
double x, double y,
SpeakerPosition P,
PositioningSystemConfiguration *configuration
);
void add_samples_for_position(
double ... |
14589de4a4743e6f63f11ae1537c9a5a46d1a2ed | cd70685f0bdfb8fc468ab1261b20de69ae6a4c13 | cbosoft/syringepump | /spfw/motor.cpp | C++ | cpp | 476 | permissive | #include <Arduino.h>
#include "motor.h"
void motorSetDirection(int dir)
{
digitalWrite(MOTOR_DIR_PIN_1, dir);
digitalWrite(MOTOR_DIR_PIN_2, !dir);
}
void motorSetDC(int dc)
{
if (dc > 255) {
dc = 255;
}
if (dc < 0) {
dc = 0;
}
analogWrite(MOTOR_PWM_PIN, dc);
}
void motorInit()
{
pinMode(MOT... |
e61fba60a56423cd11131d799f55cd54d510f633 | d96b75c59798a4f46a052d313401c52bce5e9687 | matias-gonz/DonkeyKong | /src/model/Barrel.cpp | C++ | cpp | 1,442 | no_license | #include "Barrel.h"
BarrelTexture brrlTex;
Barrel::Barrel() {
//Initialize the offsets
//posX = 200;
//posY = 0;
}
Barrel::Barrel(Position *position) {
this->width = brrlTex.width;
this->height = brrlTex.height;
this->pos = position;
this->x = position->getX();
this->y = position->getY();
this->di... |
7908e58df1fc7b11669efeaa3b6bce7c957a37e0 | 402d050cf8e1568232b577410b12026cfb24acd6 | jonfink/rviz | /rviz/src/rviz/view_controllers/xy_orbit_view_controller.cpp | C++ | cpp | 10,896 | no_license | /*
* Copyright (c) 2009, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this l... |
14219b77a72111f045d403c0d28bfe00f8c90454 | c5fb57b3529aa06a06a2e553b1a01faed7a90159 | pau1fang/learning_notes | /C++/C++PrimerPlus/c_primer_plus/chapter09/newplace.cpp | C++ | cpp | 1,492 | no_license | #include<iostream>
#include<new>
const int BUF = 512;
const int N = 5;
char buffer[BUF];
int main()
{
using namespace std;
double *pd1, *pd2;
int i;
cout << "Calling new and placement new:\n";
pd1 = new double[N];
pd2 = new (buffer) double[N];
for (i = 0; i < N; i++)
pd2[i] = pd1[i] ... |
7b312213f0b1212b07171fd258d8cf6f5a34112f | 539edd4e90933b1919880711570d07f6763a0ef0 | hitdshu/hitdsp | /filter/filter_fir_exth.cc | C++ | cc | 772 | no_license | #include "filter/filter_fir_exth.h"
namespace hitdsp {
namespace filter {
void FilterFirExth::InitFirCoeff(const ::std::complex<float> coeff[], int coeff_size) {
coeffsf_.reset(new ::std::complex<float>[coeff_size]);
coeffsd_.reset(new ::std::complex<double>[coeff_size]);
coeff_len_ = coeff_size;
for ... |
fd93f66f03288abe982182911841dc14e06e6da6 | e47d94fd334fbd8e2c0340bb1147ac5f1dd4bf6d | avnishsachar/intelligent_video_analytics | /sources/gst-plugins/gst-dsexample/gstdsexample.cpp | C++ | cpp | 29,907 | permissive | /**
* Copyright (c) 2017-2019, NVIDIA CORPORATION. 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... |
a4835b660c7d7f4e6da26b364703cb29220ddf40 | fbfa7c41ccfb20d27cad7c7776b5520f6ef34d88 | ahdemitalug/Arduino | /libraries/IOTAppStory-ESP/src/ESPhttpUpdateIasMod.cpp | C++ | cpp | 5,384 | no_license | /**
*
* @file ESPHTTPUpdateIasMod.cpp
* @date 01.01.2018
* @author Onno Dirkzwager
*
* This is a heavily modified version of the original ESP8266HTTPUpdate.cpp written by Markus Sattler
* It is specifically modified for IotAppStory.com But feel free to use it in any way you would like to.
*
* Copyright (c) 201... |
e57794a9a66394428bc06aadc7df9bb173cd8622 | 5045849958ae76ba9221e35e7b72b8cb2a258de4 | ue4sdk/WTLOnline-SDK | /WTLOnline-SDK/SDK/WTLOnline_SlateCore_classes.hpp | C++ | hpp | 2,829 | no_license | #pragma once
// Will To Live Online (0.57) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "WTLOnline_SlateCore_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//------------------------------------------------------------------------... |
154c5228a03a6ac8aa623b4f0be8e5172be9fdce | f8235b111e0eaeb4cb52a17adfb087f307eba074 | Booooooooooo/wyb---ACM | /简单数据结构/B1.cpp | C++ | cpp | 528 | no_license | #include<stdio.h>
#include<queue>
#include<iostream>
using namespace std;
int n,len[20005];
long long ans=0;
void solve()
{
priority_queue<long long,vector<long long>,greater<long long> >que;
for(int i=0;i<n;i++)
{
que.push(len[i]);
}
while(que.size()>1)
{
int l1,l2;
l1=que.top();
que.pop();
l2=que.... |
68b6791413feb74404e2eb0dd2775c9453a0dc2b | fc7600cfd013f0b34b7bf106eacc66e97cf9bb0d | green-fox-academy/julcsi2121 | /week-01/day-4/DoubleItems/main.cpp | C++ | cpp | 503 | no_license | #include <iostream>
#include <string>
int main(int argc, char* args[]) {
// - Create an array variable named `numList`
// with the following content: `[3, 4, 5, 6, 7]`
// - Double all the values in the array
int numList[5] = {3, 4, 5, 6, 7};
for (int i = 0; i < (sizeof(numList) / sizeof(numList[... |
2fee0d019a80f0bcec8fd76671632d00c55422ca | 26c9b2120674a1dfd53a46efb668a8675e48901a | romanstrazanec-uni/minGL | /samples/circles.cpp | C++ | cpp | 2,808 | no_license | #include <mingl>
#include <cstdlib> // rand()
int main() {
// Inicializujeme okno.
Window window("Nahodne kruhy", 100, 100, 500, 500);
// Pridáme popis pre vstupné pole.
window.addLabel(1, "Zadaj pocet: ", 10, 450, 100, 20);
// Pridáme vstupné pole do okna. To nám vráti ukazovateľ na vytvorený ob... |
d000c13b70df76ddbe65d8b21a3ebdfe599dd1d3 | 6ac0bff9d50d4e09726e08d204911ef23a952689 | kumader/ces_demo | /tof_motion_camera/src/tof_sdk_src/Rtl16/src/Rtl16_Eth0TcpCtrlPortReg.cpp | C++ | cpp | 3,870 | no_license | ///////////////////////////////////////////////////////////////////////////
// PROJECT: Cpp -- Eth0TcpCtrlPortReg
// COPYRIGHT: R. Hranitzky
// $RCSfile$
// $Revision: 4027 $
// AUTHOR: R. Hranitzky
// LANGUAGE: C++
// DESCRIPTION: The implementation for class Eth0TcpCtrlPortReg
// use... |
e590d0cd7b3c2d80a1782e07a11bfa093ab2feac | 4efa055b6b97097e1139307fe7c0e946bc95414e | KalyanovD/daal | /lang_service/java/com/intel/daal/data_management/compression/compressor.cpp | C++ | cpp | 2,288 | permissive | /* file: compressor.cpp */
/*******************************************************************************
* Copyright 2014-2019 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licens... |
1ea4dbdc50762c24438021394726e4ed3a8ad158 | 7a0c94b5b232772320fa53f2dc44631991835543 | strimbob/MoisPie | / Visualisation/example-Buttons 2 2/src/ofApp.cpp | C++ | cpp | 11,424 | no_license | #include "ofApp.h"
int ledNumberStrip = 60;
int numberOf = 20;
//--------------------------------------------------------------
void ofApp::setup(){
end = 1; // tweener end
numberOf = 9;
for(int x = 0;x<numberOf;x++){
fadeTime.push_back(10);
tween.push_back(0);
tweenTime.push_... |
1544ed228b1e93f22aa2a14cdecff45e13e21054 | b83bdbdde0e58477534742a7462b2d19037c5723 | cleancoindev/shadow-of-the-wyrm | /world/source/unit_tests/Consumable_test.cpp | C++ | cpp | 1,010 | permissive | #include "gtest/gtest.h"
#include "Food.hpp"
TEST(SW_World_Consumable, consumable_properties_match)
{
Food f1;
Food f2;
EXPECT_TRUE(f1.consumable_properties_match(f2));
f1.set_nutrition(111);
f2.set_nutrition(111);
f1.set_standard_drinks(3);
f2.set_standard_drinks(3);
f1.set_food_type... |
670fdaf7046abc5e0864eef5c558d7252712d3fe | aee0ba5cda96daa17fbc8655ff041828efc96543 | CountingLogic/Numerical-Analysis | /nbdi for tabulated point.cpp | C++ | cpp | 1,079 | no_license | //derivative by NBDI for tabulated point
#include<iostream>
#include<cmath>
using namespace std;
inline int fact(int p)
{
return (p<1?1:p*fact(p-1));
}
void derbdi()
{
int i,j,k,n,m,p;
float bd[20][20],x[20],y[20],X,h,sm,sm1,pr,dery,z;
cout<<"enter the point of differentiation";
cin>>X;... |
1dae1bf3c2e49539189ca69d436d5fbe5e9b22b8 | a1b474ec84373658540078cd945e60fa6bf2e3df | wesmail/hydra | /old_hydra/hydra/trunk/rich/hrichpadlabel.cc | C++ | cc | 9,470 | no_license | // File: hrichpadlabel.cc
// ***************************************************************************
//*-- Author : Witold Przygoda (przygoda@psja1.if.uj.edu.pl)
//*-- Modified : 1999/12/04 by Witold Przygoda (przygoda@psja1.if.uj.edu.pl)
//*-- Modified Oct. 2000 by W. Koenig (W.Koenig@gsi.de)
using namespace std;... |
ea500239ae77b2199285a1985d846611fa476a33 | 85a731e62e7c331bc49ade51d34c98546450cce1 | Cr0ckyy/udemy_cpp | /Section13/ImplementingMethods2/Account.cpp | C++ | cpp | 521 | no_license | #include "Account.h"
void Account::set_name(std::string s){
// no need for self, C++ automatically resolves to proper scope
name = s;
}
std::string Account::get_name(){
return name;
}
bool Account::deposit(double amount){
if (amount > 0){
balance += amount;
return true;
}
else... |
382ca3391dbd2cf9c8a55f74519f5eb296019d06 | 631afc0c68cf289ef4e332b9314ad8cd761d35cc | TheFlyingFiddle/Risk-Phone | /Risk/Risk.NativeActivity/main.cpp | C++ | cpp | 11,894 | no_license | /*
* main.cpp
*
* Created on : Feb 15, 2014
* Author : Lukas_2
*/
#include "main.h"
#include "sys/stat.h"
#include "errno.h"
#include "core/remote_debug.h"
#include "unistd.h"
ndk_helper::GLContext* context;
int getUnicodeChar(struct android_app* app, int eventType, int keyCode, int metaState)
{
JavaVM* javaVM = a... |
f21a450340b407d8d8a8ae9882348d34483c7d9d | 164406abf57cea6c93ba999486152cb5e333340b | Samsung/Castanets | /content/renderer/image_downloader/image_downloader_impl.cc | C++ | cc | 5,217 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/image_downloader/image_downloader_impl.h"
#include <utility>
#include "base/bind.h"
#include "base/logging.h"
#include "conte... |
b8b6fdc3b47b647b3ca8f7771d578e1b604ebe18 | a2bf6d5512322746e5da16c13082ee01c602b1e3 | JamesCondon22/Games-Programming | /jp-team-h/JointProject/License.cpp | C++ | cpp | 487 | no_license | #include "License.h"
#include <iostream>
License::License(Game & game, sf::Font font) :
m_game(&game),
m_comicSans(font)
{
}
License::~License()
{
std::cout << "destructing License " << std::endl;
}
void License::update(sf::Time deltaTime)
{
m_cumulativeTime += deltaTime;
//if (m_cumulativeTime.asSeconds() ... |
cba313e12fc16e5ad22ae6edb490b82f53fab591 | 05f060cb2630f64295c51cfc8ebea980f96617b1 | yanyikai/Code | /Codeforces/545/C.cpp | C++ | cpp | 444 | no_license | #include<bits/stdc++.h>
#define inf 0x7f7f7f7f;
using namespace std;
struct tree
{
long long x,h;
}tr[100001];
long long n,i,ans;
int main()
{
scanf("%lld",&n);
for(i=1;i<=n;i++)
{
scanf("%lld%lld",&tr[i].x,&tr[i].h);
}
tr[0].x=-inf;
tr[n+1].x=inf;
for(i=1;i<=n;i++)
{
if(tr[i].x-tr[i-1].x>tr[i].h) ans++;
... |
38ee3314bfe980a4819c397776dc6e75d4074257 | 528dbad921c0a1fc7869acb1195391641ec8895b | staccDOTsol/ccd | /tests/tests/smt_tests.cpp | C++ | cpp | 37,949 | permissive | #include <fc/macros.hpp>
#if defined IS_TEST_NET && defined CreateCoin_ENABLE_SMT
FC_TODO(Extend testing scenarios to support multiple NAIs per account)
#include <boost/test/unit_test.hpp>
#include <CreateCoin/protocol/exceptions.hpp>
#include <CreateCoin/protocol/hardfork.hpp>
#include <CreateCoin/chain/database.... |
2ac7397f0cdc9a4eacf58d11d93c76f8324102b3 | 36e4f0acb0b8926f980ec7267138b91dd22b1864 | manoj1511/HELICS | /src/helics/common/logger.cpp | C++ | cpp | 4,290 | permissive | /*
Copyright (c) 2017-2019,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See
the top-level NOTICE for additional details. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
/*
* LLNS Copyright Start
* Copyright (c) 2014-2018, Lawrence Liverm... |
091ed7c674c939e7110171b8f5947f2230528670 | 3f8ac5b1f861ab4c45983d2f7e9548654dc1b4b8 | mrange/experiments | /amp/mandelbrot/MandelbrotApp/MandelbrotApp/DeviceResources.cpp | C++ | cpp | 24,960 | no_license | #include "pch.h"
#include "DeviceResources.h"
#include "Common\DirectXHelper.h" // For ThrowIfFailed
#include <windows.ui.xaml.media.dxinterop.h> // For SwapChainBackgroundPanel native methods
using namespace MandelbrotApp;
using namespace D2D1;
using namespace DirectX;
using namespace Microsoft:... |
9c11ead3f17c38e7721d869efa613b12b817449d | fe990ffc7ec0e8fb8703411eca2f92274d56e506 | Sir2B/Uni | /C++/Programmiertechniken/Vorlesungsbeispiele/prog_class/point4.cpp | C++ | cpp | 751 | no_license |
#include <iostream>
#include <cmath>
using namespace std;
class Point {
public:
Point(double x=0, double y=0) { x_ = x; y_ = y; Npoints++;}
~Point() {Npoints--;}
double dist() const { return sqrt(x_*x_ + y_ * y_);}
static int Npoints;
private:
double x_;
double y_;
};
int Point::Npoints = 0; // must... |
765c0ddf14cb0ced92cbd64b4b7663e9fa865af4 | 80fdc15c7fa5d72668ba3f396a8a594a82889b89 | olym/yevent | /yevent_cc/test/ThreadCondition_test.cc | C++ | cc | 1,254 | no_license | /*
* =====================================================================================
*
* Filename: ThreadCondition.h
*
* Description:
*
* Version: 1.0
* Created: 05/26/2012 10:15:09 AM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* ... |
33826b0e34fc7e79d2102998166b624cfb20c566 | f29ff5b65995e2995797cad7f0885ad41c87b42b | msmaryannie/chromium-src-chrome-browser | /search_engines/template_url_service_util_unittest.cc | C++ | cc | 4,362 | 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/memory/scoped_vector.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser... |
5c8cb85f00d3c34efa019a62cf5cc41b5d339e33 | a69798789e1cd4843c316f36acc679f2edd43afc | surajpatel11/arangodb | /3rdParty/iresearch/core/analysis/analyzers.cpp | C++ | cpp | 5,810 | permissive | ////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 by EMC Corporation, 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... |
0acad1c097338f8389b7f6993243006caa32aecd | 54a772d7ff46cc3671821c1b6ea888583cea8347 | angryHedgehog11/FMI_DSA | /exercises/vector_tasks_ex3.cpp | C++ | cpp | 2,946 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using std::vector;
using std::cerr;
using std::cout;
using std::endl;
using std::min_element;
using std::iter_swap;
using std::sort;
typedef vector<int>::iterator iter;
typedef vector<int>::const_iterator const_iter;
//we assume that for all the tasks... |
8cfc0ced421f6c9541f3472db6f76339c88d21d4 | b87911fde85d80586b0f4f8a831384d18c34a295 | xinxu/LaluneCommon | /3rdparty/protobuf/src/google/protobuf/compiler/java/java_service.cc | C++ | cc | 15,933 | permissive | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistri... |
6f0ee762682649a63be20c154f45069c8204b0fe | 8f87f94d8da7ca43a0876e4e7886dcdc87caafd8 | vish96esh/medical-advisor | /computer.cpp | C++ | cpp | 47,930 | no_license | #include "computer.h"
#include "medicine.h"
#include "manufacturer.h"
#include "store.h"
#include "user.h"
#include "customer.h"
#include "employee.h"
#include "store_list.h"
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
class user;
class store;
class medicine;
class ... |
3a698ed790a0b5b41b3c6f10d87fc193711704f9 | 131555763cfb3035acbf923f5adc617e2a659968 | rzr/chromium-crosswalk | /chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc | C++ | cc | 1,857 | permissive | // Copyright 2015 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/renderer/printing/chrome_print_web_view_helper_delegate.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/prerende... |
01285bf2e80a99d5aec784957930c7597ba80c16 | 1186a9ab246d0925e4e8dbe6fa1b34a5b70e7131 | bronsonj98/Ne3O2_errorsimulator | /Simul.hpp | C++ | hpp | 273 | no_license | #ifndef Simul_hpp
#define Simul_hpp
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <random>
int compare(const void *a, const void *b);
void run_simul(int trials, double val, double error, double &lowerBound, double &upperBound);
#endif /* Simul_hpp */
|
f6f7a0f424591bfe6a4f016d52144b2dddd762ef | c039e69ecceb0f356cfb2568ec449268ef5f3001 | igoroogle/codeforces | /div523/ZAD_E.cpp | C++ | cpp | 3,889 | no_license | #include<bits/stdc++.h>
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define em emplace_back
#define sqr(x) (x) * (x)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1E9 + 7;
const int DL = 1507;
int f[DL][DL], u[DL][DL], c[DL][DL], a[DL], d[DL], par[DL], ... |
19210b54b4f4a3501693ad3c90b68fa4cc35ac72 | 0118a0ca5f4b8b919b9d51a7e8827b52fd656b91 | ess-dmsc/event-formation-unit | /src/efu/test/ServerTest.cpp | C++ | cpp | 3,399 | permissive | // Copyright (C) 2018 - 2022 European Spallation Source ERIC
#include <arpa/inet.h>
#include <chrono>
#include <common/testutils/TestBase.h>
#include <efu/Server.h>
#include <sys/socket.h>
#include <thread>
uint16_t ServerPort = 8889;
constexpr int mask_close = 0x0001;
constexpr int mask_connect = 0x0002;
constexpr ... |
d4c1665d15710a4c4d549a70c32154684be2b28a | 6239fe9f2e07a147d672cf0a434fa9bed433a40e | blowery/phantomjs | /src/qt/src/3rdparty/webkit/Source/WebCore/generated/JSMediaError.cpp | C++ | cpp | 9,823 | permissive | /*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation... |
33a6c9f96b40de7be1abd4ccc5e226f4e261a7f8 | d043ac09fc50deb54f1ea5feb8b317fbadce24a7 | 1073X/log | /source/lib/impl.hpp | C++ | hpp | 1,076 | no_license | #pragma once
#include <memory> // unique_ptr
#include "log/frontend.hpp"
#include "log/log.hpp"
#include "backend.hpp"
#include "log_term.hpp"
#include "rings.hpp"
namespace miu::log {
class impl {
public:
impl()
: _rings { 512 }
, _frontend { &_rings }
, _backend { &_rings }
... |
6e4d48f2af824a0535310d851d6e4f3f965a7429 | d91aa40f05a79157f3e327e46931525210231f95 | cr-marcstevens/g6k | /kernel/control.cpp | C++ | cpp | 26,837 | no_license | #include <thread>
#include <mutex>
#include "siever.h"
// reserves size for db and cdb. If called with a larger size than the current capacities, does nothing
void Siever::reserve(size_t const reserved_db_size)
{
CPUCOUNT(216);
db.reserve(reserved_db_size);
cdb.reserve(reserved_db_size);
// bgj1_cdb_co... |
242d17b59cf2eae6700f2f962583bd37b7ac3057 | 76415a81eee78604a5e7bb34f6ea1e47698f65c4 | lnkuiper/duckdb | /src/common/serializer/format_serializer.cpp | C++ | cpp | 291 | permissive | #include "duckdb/common/serializer/format_serializer.hpp"
namespace duckdb {
template <>
void FormatSerializer::WriteValue(const vector<bool> &vec) {
auto count = vec.size();
OnListBegin(count);
for (auto item : vec) {
WriteValue(item);
}
OnListEnd(count);
}
} // namespace duckdb
|
144fd57f8d2d2523b5a5268218cc3ad640414cdd | bf4a5d2b360df4403055646b50886f8f9641703b | srxdev0619/eos-expression-aware-proxy | /include/eos/fitting/RenderingParameters.hpp | C++ | hpp | 11,618 | permissive | /*
* eos - A 3D Morphable Model fitting library written in modern C++11/14.
*
* File: include/eos/fitting/RenderingParameters.hpp
*
* Copyright 2016 Patrik Huber
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obta... |
a1a03de003577e40de9897ba6e0e8d2d8a71c75e | d5f4ef1f3556830238409f829f263e3d2e3fcffb | Kolyan4ik316/UDPFirst | /UDP_Server/Main.cpp | C++ | cpp | 884 | no_license | #include <iostream>
#include <thread>
#include "Server.h"
#include "Game.h"
int main()
{
try
{
Game game;
std::mutex mtx;
std::cout << "Server start work" << std::endl;
std::vector<std::thread> threads;
for (size_t i = 0; i < std::thread::hardware_concurrency(); i++)
{
threads.emplace_back([&]()
... |
0dc68188fcf499306ec393aa2227898bcbbca8fa | ba4efaf4a68b866bc853ea1df2fe076e1712a189 | saccadic/ofxNNabla | /example-ResNet(CIFAR-10)/src/ofApp.cpp | C++ | cpp | 4,043 | permissive | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
ofLogToConsole();
ofSetWindowShape(512 * 3, 512);
ofTrueTypeFont::setGlobalDpi(72);
font.load("verdana.ttf", 30, true, true);
ofTrueTypeFont::setGlobalDpi(72);
font2.load("verdana.ttf", 300, true, true);
... |
494a3c47a03a169b9c08a6069495a87edb005c5c | 25f8713246b1076c18b8d0094d7417278dc64b1f | issackpgit/Parallel-Processing | /Openmp Parallel Prefix/Parallel Prefix parallel/a0.hpp | C++ | hpp | 1,813 | no_license | /* ISSAC KOSHY
* PANICKER
* issackos
*/
#ifndef A0_HPP
#define A0_HPP
template <typename T, typename Op>
void omp_scan(int n, T* in, T* out, Op op) {
int *temp;
// int *x;// = (int*) malloc ((n+1)*sizeof(int));
int numofthreads, work;
int i, tid, last;
int start ,end;
// x = const_cast<int... |
722586b831eec5682ac26c0115fd0393f1b2a8cb | 92ea4c617889c62955674f9f3982c2bcd2901c46 | Sythelux/Streamlines | /src/xlines.cpp | C++ | cpp | 3,986 | permissive | /* lines_intersect: AUTHOR: Mukesh Prasad
*
* This function computes whether two line segments,
* respectively joining the input points (x1,y1) -- (x2,y2)
* and the input points (x3,y3) -- (x4,y4) intersect.
* If the lines intersect, the output variables x, y are
* set to coordinates of the point of in... |
77a15ae49d53f1355a88b0dbd9680244b35da33b | 56ceb38003338ee90de6e8059936d767c6e33361 | attaoveisi/AttBot_Rasberry | /catkin_ws/src/mrpt_navigation/mrpt_rawlog/src/mrpt_rawlog_record/rawlog_record.cpp | C++ | cpp | 3,443 | permissive | /***********************************************************************************
* Revised BSD License *
* Copyright (c) 2014, Markus Bader <markus.bader@tuwien.ac.at> *
* All rights reserved. *
* *
* Redistribution and use in sour... |
0d6f27c0aaa8698d2c330a23cc7e2403be0b0a6d | a06bf0c399caf0af58a8ef3f041791d04c9ee338 | lzw19951010/graphResolution | /graphResolution/main.cpp | C++ | cpp | 931 | no_license | #include "graphInfo.h"
#include "resolution.h"
int main()
{
Graph G;
string infileName = "2.Online Social Network.net";
G.initGraphFromFile(infileName);
Graph sG;
G.screenFromGraph(sG);
/*
vector <int> Q;
int v0, destination;
cin >> v0 >> destination;
double res = DIJK(G,v0,destination,Q);
if (destination =... |
222f0ccbe193db29c43edaf9950fc9ce832f33a7 | a1a7a727572021f2f481efeb3a2d2cd8db1400ef | JDenghui/blink | /renderer/modules/accessibility/testing/accessibility_test.cc | C++ | cc | 2,273 | no_license | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/accessibility/testing/accessibility_test.h"
#include "third_party/blink/renderer/core/dom/document.h"
#inclu... |
703ccefe5b89636e447298cd23a4cb9e4b465948 | df042420ed6a6550702e5c2ea8477cf5d0268d3d | fukai98/CCCC-GPLT | /L1-037 A除以B.cpp | C++ | cpp | 1,025 | no_license | /*
L1-037 A除以B (10 分)
真的是简单题哈 —— 给定两个绝对值不超过100的整数A和B,要求你按照“A/B=商”的格式输出结果。
输入格式:
输入在第一行给出两个整数A和B(−100≤A,B≤100),数字间以空格分隔。
输出格式:
在一行中输出结果:如果分母是正数,则输出“A/B=商”;如果分母是负数,则要用括号把分母括起来输出;如果分母为零,则输出的商应为Error。输出的商应保留小数点后2位。
输入样例1:
-1 2
输出样例1:
-1/2=-0.50
输入样例2:
1 -3
输出样例2:
1/(-3)=-0.33
输入样例3:
5 0
输出样例3:
5/0=Error
*/
#include <cstdi... |
61eb2aa4e4991d10c4df49874f40f129f1800bbe | 0c4a638de622cbceebc0790c4a48b8283165c81e | aoxy/HuaWei-CodeCraft-2021 | /SDK_C++/CodeCraft-2021/Server_purchase.cpp | C++ | cpp | 866 | no_license | // #include"Server_Purchase.h"
// void Server_Purchase::Count_request(){
// int CAB=0,MAB=0,CS=0,MS=0;
// for(auto x: requests){
// for(auto R:x){
// int id=R.id();
// string op=R.optype();
// if(op=="add"){
// if(HashidVM[id].node()==1){
// ... |
c5f4bfdadca47619b605f678db2b2897335ecbf3 | 77faebd824b57af7c66566678fa04f67fd58cedc | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_old_hunk_3387.cpp | C++ | cpp | 1,339 | no_license |
context->overlapped.hEvent = CreateEvent(NULL, TRUE,
FALSE, NULL);
if (context->overlapped.hEvent == NULL) {
/* Hopefully this is a temporary condition ... */
ap_log_error(APLOG_MARK, APLOG_... |
da4c3c77f63a87c62c2388c34abbe267a1eaf6ed | 31a4d114a69e11059a9d69c5c913d08e96153ba3 | gbrlas/AVSP | /CodeJamCrawler/dataset/08_8921_40.cpp | C++ | cpp | 2,551 | no_license | /*
* File: Ugly.cpp
* Author: root
*
* Created on July 27, 2008, 3:37 PM
*/
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <set>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <iostream>
using namespace std;
/*
*
*/
string str;
int strLen;
//set <lon... |
0c999d268916fb8e5ee236332e57c4fe00690fee | 7bca6f327287049f9b410eecb4935147922cff3a | bit4bit/microcalo | /escenario.cpp | C++ | cpp | 744 | no_license | #include "cspa.h"
#include "escenario.h"
Escenario::Escenario(Uint32 _id) : Cosa(_id) {
_nombre = "sinnombre";
es_objeto_ruby = false;
}
Escenario::~Escenario() {
//@todo llamar pariente?
}
void Escenario::agregar(Cosa* cosa){
cosas.push_front(cosa);
}
void Escenario::remover(Cosa* cosa){
cosas.remove(cos... |
49aa4512811f7f02b0af781ff63efd05b01cadeb | abb4bd4a2a4ab9bdce17f7eb40a3d373c61bf448 | srijitpaul/quda | /lib/dslash_coarse.in.cpp | C++ | cpp | 2,063 | permissive | #include "multigrid.h"
namespace quda
{
template <int...> struct IntList {
};
template <int Nc, int... N>
void ApplyCoarse(cvector_ref<ColorSpinorField> &out, cvector_ref<const ColorSpinorField> &inA,
cvector_ref<const ColorSpinorField> &inB, const GaugeField &Y, const GaugeField &X, doubl... |
eadc87263b38218b142a5488f2809de4ee083e9e | a8925ac03240367db525921bd403cddb8d160549 | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/termsrv/common/license/common/certlib/licecert/pkcs_1.cpp | C++ | cpp | 894 | no_license | /*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
pkcs_1.cpp
Abstract:
This module implements the PKCS 1 ASN.1 objects
Author:
Frederick Chong (fredch) 6/1/1998
Notes:
--*/
#include <windows.h>
#include "pkcs_1.h"
RSAPublicKey::RSAPublicKey(
DWORD dwFlags,
DWORD dwTag)
: CAsnS... |
1260774c61b09f0a67e710816ff834c8dfaf8baa | 294b9dabe7dcc46d9ee571d90521c64877fa620f | coxchris502/chromium | /components/update_client/component.cc | C++ | cc | 41,009 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/update_client/component.h"
#include <algorithm>
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "... |
773734c3a4a21fb3b910c757d1f8cfdedaddaf2f | a8cf134b797c26dc8cb4fb3549f16e5ac129fe02 | chuuko/stksamp | /main.cpp | C++ | cpp | 21,132 | permissive | /*
* stksamp: a resampler based on libstk and WORLD
* Created by Squeekers
* License: MIT
* Dependencies: libcantamus, WORLD, libstk
* stksamp provides both wavtool and resampler functionality akin to smsvoice
* As the Cantamus UI does not use scientific notation, both libcantamus and stksamp have to compensate f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.