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 |
|---|---|---|---|---|---|---|---|---|
151400ee2d59945cd0384562b5c5e557f20ed4f4 | d1cecf3bb986820b3803c7d838fb11939be21a5a | jsmereka/CrossModalMultimediaRetrieval | /TMBP/source/lda/bp/active/ABPtrain_doc.cpp | C++ | cpp | 6,927 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <mex.h>
#include "topiclib.cpp"
// Syntax
// [ PHI , THETA , MU ] = ABP_doc( WD , J , TD , TK , N , ALPHA , BETA , SEED , OUTPUT )
// Syntax
// [ PHI , THETA , MU ] = ABP_doc( WD , J , TD , TK , N , ALPHA , B... |
f772718f03fff2251febc571b404e4eda438731f | 6692d7d48b6733d1b46287d064b44060abe42115 | AokiMasa/DxLib_BlockGolf | /Ball.cpp | C++ | cpp | 4,100 | no_license | #include "GV.h"
#include "Function.h"
int ballHandle; //画像
int m_Xpos, m_Ypos; //マウス座標
double angle = -1.57; //初期弧度
int deg; //角度
//初期化
void init_balls() {
int x, y;
ballHandle = LoadGraph("./src/Ball3.png");//変更箇所
GetGraphSize(ballHandle, &x, &y);
//printfDx("Ball_X:%d Ball_Y:%d\n", x, y);
for (int i = 0... |
b4a6a18774d09dd7c6e3d55a2b29bc61520cc039 | 927250735511a8bb4566e526a725249508914574 | dstuck/mtgAlg | /mtgGame/SBA_NoLife.cpp | C++ | cpp | 578 | no_license | /*
* SBA_NoLife.cpp
*
* Created on: Dec 1, 2013
* Author: dstuck
*/
#include "headers/SBA_NoLife.h"
SBA_NoLife::SBA_NoLife() {
// TODO Auto-generated constructor stub
}
SBA_NoLife::SBA_NoLife(Player* thePlayer_) {
thePlayer = thePlayer_;
}
SBA_NoLife::~SBA_NoLife() {
// TODO Auto-generated destructor ... |
64f331c9279367de395cd700e830a40250fa0af5 | 2cafcf749ffe2396a20b33716f3383da5ab2de90 | SayaUrobuchi/uvachan | /paiza/lsE.cpp | C++ | cpp | 5,197 | no_license | // 5361
#include <stdio.h>
#include <stdlib.h>
#define M 25005
#define TANE 0
#define HN 256
#define T 228
#define L 7
#define W 51
char qbb[M][50][W];
int qs[M], qx[M], qy[M], qd[M], qt[M], dn;
int adx[100], ady[100];
int heap[M], hn;
char (*board)[50][W], (*board2)[50][W];
int used[50][50], uc;
int dx[] = {0, 1, 0,... |
31a9b08e14aafdcd87ee7b3a630663ce71331735 | ef25bf3b54a23057444ad2fea31fa69b31825655 | keremgure/CS409 | /project.cpp | C++ | cpp | 9,371 | permissive | /*
* Kerem Güre
* S015664
* Department of Computer Science
*/
#include <iostream>
#include <vector>
#include <utility>
/* Tiny Ranges Implementation by Furkan KIRAC
* as part of CS409/509 - Advanced C++ Programming course in Ozyegin University
* Supports transforming and filtering ranges and,
* to<CONTAINER>() ... |
10fcbddde6cae250cc70a1b5224f0ccc4200afbf | 8222f55f96370c0c47c39cb31f29ce3874c5ed49 | lipcoin/lipcoin | /src/blockencodings.cpp | C++ | cpp | 10,467 | permissive | // Copyright (c) 2016 The LipCoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "blockencodings.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "chainparams.h"
#include "... |
cbffde21b57a33f2016e90529fee9450ada9f77c | ceadd51a7d735db1cb343956670f924a6bcc246a | HappinessSeekers/lmc_catkin_ws | /src/testbench_interface/src/pid_controller.cpp | C++ | cpp | 884 | no_license | #include "testbench_interface/mainwindow.h"
PID_Algorithm::PID_Algorithm(const float& controller_frequency)
{
last_margin = 0.0;
last_I = 0.0;
Kp = 0.0;
Ki = 0.0;
Kd = 0.0;
I_limit = 10000.0;
ctrl_freq = controller_frequency;
}
void PID_Algorithm::set_Kp(const float& kp) {Kp = kp;}
void PI... |
794acd3e74ddca3a403b8f4bbb80867dc65cdfa8 | 552363bf35da23cec5b3e70aca5e889ad1567e3e | longstl/mus12 | /_Library/_Include/boost/date_time/local_time/posix_time_zone.hpp | C++ | hpp | 18,356 | no_license | ////////////////////////////////////////////////////////////////////////////////
// posix_time_zone.hpp
#ifndef _DATE_TIME_POSIX_TIME_ZONE__
#define _DATE_TIME_POSIX_TIME_ZONE__
/* Copyright (c) 2003-2005 CrystalClear Software, Inc.
* Subject to the Boost Software License, Version 1.0. (See accompanying
* file LICEN... |
59cbacd7bf54a1c1ad8db34b204959b3aa6a30a6 | b06fdec140da9ff6c09db6489fd768ae505c8c30 | jcgramos/CaveLander | /ALander/bin/android/obj/src/openfl/gl/GLFramebuffer.cpp | C++ | cpp | 2,813 | no_license | #include <hxcpp.h>
#ifndef INCLUDED_openfl_gl_GLFramebuffer
#include <openfl/gl/GLFramebuffer.h>
#endif
#ifndef INCLUDED_openfl_gl_GLObject
#include <openfl/gl/GLObject.h>
#endif
namespace openfl{
namespace gl{
Void GLFramebuffer_obj::__construct(int version,Dynamic id)
{
HX_STACK_FRAME("openfl.gl.GLFramebuffer","new... |
fe156b6e5706b5c5f8fb79052ff221361accbcbc | 3f860268136701d9e43bffa0ac6e09163b045f33 | zaourzag/chromium | /content/browser/sms/sms_browsertest.cc | C++ | cc | 36,205 | permissive | // Copyright 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 <memory>
#include <string>
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "components/ukm/test_ukm_recorde... |
78f4810950532dcac6fc371175fb6709ea247e92 | 922328d11234841fc358c2c2bf1071ebdb28f782 | CU-0xff/juliet-cpp | /000/233/301/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_memcpy_43.cpp | C++ | cpp | 3,332 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_memcpy_43.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE805.string.label.xml
Template File: sources-sink-43.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocate... |
fa8540cea2953abd07badad4d6282262ac2479a7 | 07de8f4d2674391ae822e6d983897523280968ea | F4HTB/hpsdr2alsaconnector | /metis.cc | C++ | cc | 13,252 | no_license | /* -*- C++ -*- */
/* metis.cc */
/**
* @file metis.c
* @brief Metis protocol implementation
* @author John Melton, G0ORX/N6LYT
* @version 0.1
* @date 2009-10-13
*/
/* Copyright (C)
* 2009 - John Melton, G0ORX/N6LYT
* This program is free software; you can redistribute it and/or
* modify it under the terms of the ... |
6eaa690ef46bca5a4a1f479ae44faa0456c478e4 | 984b3c669a01d1f9d8f743b739209207d6da5b1b | miallo/PP15 | /GoeKiessee/C-PlotProgramm/main.cpp | C++ | cpp | 1,564 | no_license | #include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <string.h>
#include <cstdlib>
#include <unistd.h>
using namespace std;
int main()
{
int i = 0;
ifstream in ("../Datenpunkte.txt");
while(!in.eof()){
string dateiname, a;
stringstream ass;
in >> a;
ass << a... |
5dc16b08ec0ab97daedeb31b3fcd5ac2f134b96e | af1e6a67755916679a50b2f66b0c41bb697874d5 | slipschutz/EconSim | /src/Base.cc | C++ | cc | 454 | no_license |
#include "Base.hh"
int Base::rNextBase_Id=0;
int Base::rNumDeletes=0;
Base::~Base(){ //Deconstructor
//std::cout<<"this is Base Deconstructor"<<std::endl;
Base::rNumDeletes++;
}
Base::Base(){ //Defualt constructor
//std::cout<<"Base Constructor"<<std::endl;
SetBaseId(Base::rGetNextBaseId());
}
Base::Base... |
6465b7fe314b6787496ff579ae4d3707b970d7ac | 8bc69de6c13ca179a1d42ce2d065e949058948ae | compstruct/hornet | /src/exec/memtraceThread.cpp | C++ | cpp | 4,556 | permissive | // -*- mode:c++; c-style:k&r; c-basic-offset:4; indent-tabs-mode: nil; -*-
// vi:set et cin sw=4 cino=>se0n0f0{0}0^0\:0=sl1g0hspst0+sc3C0/0(0u0U0w0m0:
#include "memtraceThread.hpp"
#define DEBUG
#undef DEBUG
#ifdef DEBUG
#define mh_log(X) if(true) cout
#define mh_assert(X) assert(X)
#else
#define mh_assert(X)
#defi... |
c5a9634c1fae7be1e93febb4fc34fa61b3d3abc8 | af3cb5021787ee1bbe3ca351f427a0b1d9317229 | xich4932/csci3010 | /.history/hw3/ElectoralMap_20211017091505.cpp | C++ | cpp | 4,300 | no_license | #include<iostream>
#include<map>
#include<set>
#include<random>
#include<time.h>
#include<stdlib.h>
#include"ElectoralMap.h"
#define num_district 3
#define num_enum 4
//int Candidate::id = 0;
//int ElectoralMap::count_district = 0;
int Election::ids = 0;
Candidate::Candidate(){
;
}
Candidate::Candidate(int gi... |
5108db8e42dcd345642e7db9a700b3c29d772c84 | 07d590a51cee5f47d113fdcda1145e84506bce6e | vogler/dbimpl | /02/SimiopaDB/buffer/BufferFrame.cpp | C++ | cpp | 705 | no_license | /*
* BufferFrame.cpp
*
* Created on: May 6, 2012
* Author: user
*/
#include "BufferFrame.h"
#include <sys/mman.h>
#include <iostream>
BufferFrame::BufferFrame(int fd, unsigned pageId) {
data = (char *)mmap(0, FRAME_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, pageId*FRAME_SIZE);
if (data == MAP_FAILED)... |
2ef750f53904e21b98e016a63e1e8b08f2210997 | c0cf21137ed3ffd471b274e09178bf43fa528e10 | youtube/cobalt | /cobalt/dom/performance_timing.cc | C++ | cc | 1,218 | permissive | // Copyright 2015 The Cobalt 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 ap... |
0a5d27fd91cfca36f634dc0498d4f7afbb387e8d | 42e1a9f743fbe78bcb6d1f851be5a6353b08051b | Leothomasv/Programacion3_2019 | /EjemploArbolReferencia/nodo.cpp | C++ | cpp | 469 | no_license | #include "nodo.h"
#include <iostream>
using std::cout;
void agregarElemento(nodo** raiz, nodo* nuevo) {
if (*raiz == 0)
*raiz = nuevo;
else {
if (nuevo->valor >= (*raiz)->valor)
agregarElemento(&(*raiz)->hijoDerecho, nuevo);
else
agregarElemento(&(*raiz)->hijoIzquierdo, nuevo);
}
}
void imprimir(nodo... |
cf6b425f11ccbadff9516ecc3cc1ec3bc97ea130 | c3da84f4a103c5730245ad03195ce7ef0cfb012d | JosuaKugler/uni | /1_ws19_20/ipi/ipiclib/SimpleArrayCSImp.cc | C++ | cc | 797 | no_license | template <class T, int m>
inline SimpleArrayCS<T,m>::SimpleArrayCS (T v)
{
for (int i=0; i<m; i=i+1) p[i]=v;
}
template <class T, int m>
inline T& SimpleArrayCS<T,m>::operator[] (int i)
{
return p[i];
}
template <class T, int m>
inline int SimpleArrayCS<T,m>::numIndices () { return m; }
template <class T, int m>... |
5e4d9e78ab788c607e53db554ca9a4954e3b90b1 | 77270ecb00b490bced1c69d6753ef010886724fb | heni/PP-2014 | /concurrent-queue/test.cpp | C++ | cpp | 470 | no_license | #include <iostream>
#include "concurrent_queue.h"
void ThreadFunc(TConcurrentQueue<int>& queue) {
int res;
while (queue.Get(res)) {
std::cout << res << std::endl;
}
}
int main() {
TConcurrentQueue<int> SampleQueue;
boost::thread printer(boost::bind(ThreadFunc, boost::ref(SampleQueue)));
... |
9ac6439edd293c66da0d7f6bd805737dfd18183e | a4341f2021c87dd87d3c3f42284c00bc69409398 | SamBumgardner/csc-131-computational-thinking | /lecture_materials/introduction_to_c++/function_demo2.cpp | C++ | cpp | 933 | no_license | // function_demo2.cpp
#include<iostream>
using namespace std;
constexpr float BONUS_PERCENTAGE = 0.15; // assuming 15% bonus pay
//Function Prototypes
float get_pay (float, float);
float get_bonus (float salary);
void done ();
int main () {
float wage = 12.5; // hourly
float hours;
float pay, bonus;
cout << "En... |
14c8b323c83f651e4b74d3cfab17c93a1edc752d | c9e6ae138640f06e4ccf9cbb0fac19a2df810229 | cucheung/PSS | /opencv2.framework/Versions/A/Headers/core/utility.hpp | C++ | hpp | 39,137 | no_license | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
9714845c9daabc6811bd58e6c3a6919cf00ea077 | b0c6afe2242deba2dfdbc3e14ab9c98accae8a3b | rufatm/Multithreaded-Video-Server | /km/MyCond.cpp | C++ | cpp | 607 | no_license | #include "MyCond.h"
using namespace std;
MyCond::MyCond()
{
MyMutex sleeper(0);
MyMutex m2(1);
init_cond();
}
int MyCond::init_cond()
{
char module[] = "Leonardo";
char name[80];
fd_cond = open("/proc/Leonardo", O_RDONLY);
sleepers = 0;
//struct condition_struct pass;
//pass.pid = ge... |
b41486ee37e007decd0942d5dff0fc532f794790 | 5049535a33159356bb622cb6f975d713f969c99e | isabella232/glow | /tests/unittests/ImageTest.cpp | C++ | cpp | 15,988 | permissive | /**
* Copyright (c) Glow Contributors. See CONTRIBUTORS file.
*
* 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 b... |
63f70565c8626a26ce8a90e5b1127f74fbac0eba | c5ef781f1efd61549667c111b948776a8d2afe8b | JonnyBanana/botnets | /VirusPack/nullbot[2.1.1] [23-11-05] (4)/Peer2Peer.cpp | C++ | cpp | 2,309 | no_license | #include "includes.h"
#ifndef NO_P2PSPREAD
char *szPath[] =
{
"C:\\program files\\kazaa\\my shared folder\\",
"C:\\program files\\kazaa lite\\my shared folder\\",
"C:\\program files\\kazaa lite k++\\my shared folder\\",
"C:\\program files\\icq\\shared folder\\",
"C:\\program files\\grokster\\my grokst... |
624ab2bda1442cb8ebe9314b50f79058488f3c88 | 2180158ddb511444a33c67507150c8a258f4ed57 | Thrinaria/Codebase | /boost_1_34_1/boost_1_34_1/libs/wave/test/testwave/testfiles/t_6_053.cpp | C++ | cpp | 2,306 | permissive | /*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
Copyright (c) 2001-2006 Hartmut Kaiser. Distributed under the Boost
Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt o... |
480dccbdf2c3d0c2f8db9ee6016882a47a838b31 | 59674c0eecb9d69074b4c9d74149d28bac0013ab | KochankovID/CNN_ITMM | /SimplePerceptron/StartPerceptron.cpp | C++ | cpp | 3,626 | no_license | //: Нейросеть распознающая 4
#include "Perceptrons.h"
#include <vector>
#include <iostream>
#include <fstream>
#define Teach
// Макрос режима работы программы (с обучением или без)
#define Teach
// Функтор
class Sign : public II_Func
{
public:
Sign() : II_Func(){};
int operator()(const int& x) {
if (x <= 0) {
... |
665e8cb1d8bf4a1dbade49da740a6b68d494dc15 | 121bd52893f0128d974c7b9223867ee31ae7a183 | markverick/ioi-training | /ioi-thailand/nattee/l10_pizza.cxx | C++ | cxx | 607 | no_license | #include<bits/stdc++.h>
#define MI 1000000000
#define X first
#define Y second
#define MP make_pair
#define MT make_tuple
#define EB emplace_back
using namespace std;
long long a[100135];
int main()
{
//freopen("out.txt","w",stdout);
//freopen("in.txt","r",stdin);
long long n,i,j,k,p,fs,md,ls,mn,sm=0;
... |
9d76264f867b13d386991234614d1f0338329d3e | 5d2a3fb64b5b0896aeaa65e6f00223dbee27ee4f | hoatd/Ds-Algos- | /codeforces/1151B.cpp | C++ | cpp | 447 | no_license | #include<iostream>
#include<cstdlib>
using namespace std;
int n,m,a[505][505],b[505][505],c[505];
void pr()
{
cout<<"TAK"<<endl;
for(int i=1;i<=n;i++)
cout<<c[i]<<" ";
exit(0);
}
int main()
{
cin>>n>>m;
int i,j,sum=0;
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
{
cin>>a[i][j];
}
for(i=1;i<=n;i++) sum^=a[i][1],c[i... |
adf14623a091e873f6d1aee0e0374cada80d2112 | 45785dce88b0a8f7a5d54b00ad61aecbd10ed4be | ahanin/BrewPiLess | /BrewPiLess/TempSensor.cpp | C++ | cpp | 3,413 | no_license | /*
* Copyright 2012-2013 BrewPi/Elco Jacobs.
*
* This file is part of BrewPi.
*
* BrewPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any late... |
2c118d243ee1d53ca1eb5fd5d27184d509d1d4d0 | 5db86acf48d059a3a83982aeba23bfedfb4aa12d | subhash1-0/thirstyCrow | /src/rice/p2p/past/gc/GCIdFactory_GCMapEntry.cpp | C++ | cpp | 2,645 | no_license | // Generated from /pastry-2.1/src/rice/p2p/past/gc/GCIdFactory.java
#include <rice/p2p/past/gc/GCIdFactory_GCMapEntry.hpp>
#include <java/lang/ClassCastException.hpp>
#include <java/lang/NullPointerException.hpp>
#include <java/lang/Object.hpp>
#include <java/lang/String.hpp>
#include <java/lang/UnsupportedOperationEx... |
5a5b25ceec1bd92dc7593462b41043865138667d | 867814efb247d09af3c7fac159def98e414beea3 | nvuong21/nimblephysics | /dart/dynamics/RevoluteJoint.hpp | C++ | hpp | 4,098 | permissive | /*
* Copyright (c) 2011-2019, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
0283fa129e2cd000ef6078b13a801360ab56263f | 7102206135797c04f4ee86a341b914d2d6aaf443 | giuliaamato/japp_games-and-consoles | /model/console.cpp | C++ | cpp | 1,246 | no_license | #include "console.h"
//COSTRUTTORE DI DEFAULT
Console::Console(const QString& Name, const QString& Developer, const QDate& Pubb_date,
const QString& Controllertechtype, const QString& HardDisk, const QString& Maxresolution, const QString& Consolecolor, bool Specialedition) :
Product(Name, Developer, Pubb_date), co... |
aee00c657e73eddba1e8aa7cc7f851f860d3ecd7 | fca833cdec5b82242c94ae4accac8bcb109fe3db | LucianoBentrup/Introducao-a-Programacao-Estruturada-em-C | /exercicio-StructFunc.cpp | C++ | cpp | 1,953 | no_license | #include <iostream>
using namespace std;
//Pessoa = nome + idade
//Fazer cadastro
//Exibir cadastros
//Menu com opção de 1 - Cadastrar 2 - Exibir 9 - Sair
int opcao; //Para Escolher a opcao no menu.
struct pessoa
{
string nome;
int idade;
};//fim estrutra "pessoa".
... |
35f5ea142926fb3a208727e3f807ce9ed9e9d1fe | abbdd48e5cdcc4da76556c44519061a21a00ea1b | Zyloc/Algorithm-and-library | /HackerEarth/guess.cpp | C++ | cpp | 1,168 | no_license | /*
* Satyam Swarnkar (Zyloc), NIT Silchar
*/
#include <bits/stdc++.h>
using namespace std;
#define loop(i,start,end) for (lli i=start;i<=end;i++)
#define pool(i,start,end) for(lli i=start;i>=end;i--)
#define zyloc() lli t;cin>>t;while(t--)
#define vi(v) vector <long long int> v;
#define pb(n) push_back(n)
#define mp(... |
bb94b4770d197abc8b73cf2f2703e5dd0a8445ad | d716b47bf5e64af597e67822df7162548429c762 | alexandraback/datacollection | /solutions_5631989306621952_1/C++/xyz600/main.cpp | C++ | cpp | 468 | no_license | #include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
int main()
{
string line;
getline( cin, line );
int T = stoi( line );
for ( int t = 1; t <= T; t++ )
{
getline( cin, line );
string ans = "";
for ( char ch : line )
{
char front_ch = ans == "" ? 'a' : ans[0... |
2320164fb9afc8dbeb078ebcc8e40a9797d3b084 | e7b219f76a97ae85e83899241d45d84230a678c8 | jieziww/JoSIM | /src/TransmissionLine.cpp | C++ | cpp | 17,052 | permissive | // Copyright (c) 2019 Johannes Delport
// This code is licensed under MIT license (see LICENSE for details)
#include "JoSIM/TransmissionLine.hpp"
#include "JoSIM/Misc.hpp"
#include "JoSIM/Errors.hpp"
#include "JoSIM/Constants.hpp"
#include <iostream>
#include <string>
#include <algorithm>
#include <locale>
#include <... |
ec7a0c4669504abad5ee719d7353140008062f6f | 9bffce2493205199f3ca53c9c9481e79fbddc448 | yochju/Vulkan | /examples/computecloth/computecloth.cpp | C++ | cpp | 29,492 | permissive | /*
* Vulkan Example - Compute shader sloth simulation
*
* Updated compute shader by Lukas Bergdoll (https://github.com/Voultapher)
*
* Copyright (C) 2016-2017 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
#include <stdio.h>
#inclu... |
84e0338e43d3ff468040467980b619a26e07cf9f | 47d2936423ae503cf0c06e309f7b743b9a18d31c | niuxu18/logTracker-old | /second/download/curl/gumtree/curl_patch_hunk_529.cpp | C++ | cpp | 15,482 | no_license | "\n"
" 2. Send two fields with two field names:\n"
"\n"
" curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\"\n"
"\n"
" To send a field value literally without interpreting a leading '@'\n"
-" or '<', or an embedded ';type=', use --form-string instead of\n"
, stdout);
fputs(
+" or '<', or an ... |
82425124836776cc4c9ef9d906b2644e895a5bcf | 60c67375d3851ed795522dfeecaef9dd5a31e037 | otcshare/chromium-src | /third_party/blink/renderer/core/inspector/inspector_dom_agent.cc | C++ | cc | 95,454 | permissive | /*
* Copyright (C) 2009 Apple Inc. All rights reserved.
* Copyright (C) 2011 Google Inc. All rights reserved.
* Copyright (C) 2009 Joseph Pecoraro
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redis... |
5ec8a700cc1ac2c69284290520d60c1076ace4f8 | 3051b72b0ef645a852aaf47a33efe080a0322348 | youngf5/practice | /973.cpp | C++ | cpp | 1,062 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<windows.h>
#include<time.h>
#include<vector>
#include<conio.h>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
class Solution
{
public:
vector<vector<int>> kClosest(vector<vector<int>> &points, int K)
{
multimap<int,vector<int>> di... |
fe4b2b77a494d83c0a60ef04995d2bb408f34bbd | cfc7c01b70a833b7db41e76a5f302fa29897addd | aurantst/windows-XP-SP1 | /XPSP1/NT/printscan/ui/printui/spllibex.cxx | C++ | cxx | 9,774 | no_license | /*++
Copyright (C) Microsoft Corporation, 1995 - 1999
All rights reserved.
Module Name:
spllibex.cxx
Abstract:
spllib extentions
Author:
Lazar Ivanov (LazarI) 29-Mar-2000
Revision History:
--*/
#include "precomp.hxx"
#pragma hdrstop
#include "spllibex.hxx"
////////////... |
bb6e0856b4f0f484f22f107cdfb59a9d79fdddbe | f78e222eac6403484f4740d78d464871f66ab3c6 | doug0102/GAM1514FinalProject | /Source/Common/Menus/LoadMenu.cpp | C++ | cpp | 605 | no_license | #include "LoadMenu.h"
#include "../UI/UIButton.h"
#include "../Game/Game.h"
#include "../Game/Level.h"
#include "../Screen Manager/ScreenManager.h"
LoadMenu::LoadMenu() : Menu(NULL, NULL)
{
addButton(new UIButton("ButtonExit"));
}
LoadMenu::~LoadMenu()
{
}
const char* LoadMenu::getName()
{
return LOAD_MENU_SCR... |
d6908512a5f7312ce5ca88f38c42dfde19ea8c7c | 1ed26301ea9d40665c3d70c56e2c9aa5848fec8a | gabrielbmotta/mne-cpp | /libraries/disp3D/engine/model/materials/shownormalsmaterial.cpp | C++ | cpp | 5,110 | permissive | //=============================================================================================================
/**
* @file shownormalsmaterial.cpp
* @author Lars Debor <Lars.Debor@tu-ilmenau.de>;
* Lorenz Esch <lesch@mgh.harvard.edu>
* @version dev
* @date January, 2017
*
* @section LICENS... |
a0d4d53020eb952146a07b2826f992f626e1a66e | 9a42ad41c690b5cae7a0d2a4be2342ec6ba099c1 | Ajisaputrars/swift | /lib/Sema/TypeCheckAvailability.cpp | C++ | cpp | 96,758 | permissive | //===--- TypeCheckAvailability.cpp - Availability Diagnostics -------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
5597db9fcd6f0006e7ca3748101841972993af94 | 08fce579afffd1a134fbb04441f4a025e81ec09f | jellybeanjohnny/BreakoutOpenGL | /Breakout/Game.hpp | C++ | hpp | 902 | no_license | //
// Game.hpp
// Breakout
//
// Created by Matt Amerige on 4/11/17.
// Copyright © 2017 Matt Amerige. All rights reserved.
//
#ifndef Game_hpp
#define Game_hpp
#include <GL/glew.h>
#include <GLFW/glfw3.h>
// Represents the current sate of the game
enum GameState {
GAME_ACTIVE,
GAME_MENU,
GAME_WIN
};... |
000a09c394a643f07bf1778a2578d4d4125a1a1a | 61b5965081bfadbf8cee52c0fedf4a3a394e2a81 | Mike-Fink-Jr/CS122-Data_Structs | /Compiler_HMWKs/Func_&_Expr-Tree/Code/Driver.cpp | C++ | cpp | 1,011 | no_license | #include <iostream>
#include "evaluate.h"
using namespace std;
int main()
{
char userInput[80];
VarTree vars; // initially empty tree
FunctionDef funs;
cout << "deffn sqr(x) = x*x" << endl;
evaluate("deffn sqr(x) = x*x", vars, funs);
cout << "sqr(5): " << evaluate("sqr(5)", vars, funs) << endl;
c... |
0bd8f9e77a5f543fb02b83ba6b0704f44840b29c | 78765ee59e9d1667f9ec55267bbe7c4948504087 | dualword/chatmachine | /src/aimlbot.cpp | C++ | cpp | 200 | permissive | #include "aimlbot.h"
#include "aimltemplateelement.h"
using namespace std;
using namespace aiml;
string Bot::name() {
return m_sName;
}
string Bot::toString() {
return "<bot" + m_sName + "/>";
}
|
da8b624312ff6830c30b763003830174e107d006 | bff1d1a11534480de185720225a88b85629e49ab | ClayHanson/tge-152-fork | /engine/game/aiPlayer.cc | C++ | cc | 14,035 | no_license | //-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
... |
889cda3334c7bd3ba48ccc9b0b720486274fdcfd | 99b149864dc0b71e43f5787bfbcf0cbbe29191ab | bingwan/Cut2.1.2Classes | /EditLayer.cpp | C++ | cpp | 16,619 | no_license |
#include <iostream>
#include "cocos2d.h"
#include "EditLayer.h"
#include "CCScrollLayer.h"
#include "CCButton.h"
#include "CCAPI.h"
#include "CharacterManager.h"
#include "tinyxml.h"
#include "CCMenuItemButton.h"
#include "CCSceneManager.h"
#include "Box2dManager.h"
#include "ResManager.h"
#include "CCTextField.h"
... |
bb5481539368279d3eb21aca0e7dcaab32ad65ce | 7d6999272e7e7daef25284f0a842ecbe701a268d | WeelCJ/Vitis-AI | /Vitis-AI-Library/facefeature/test/test_facefeature_batch.cpp | C++ | cpp | 3,254 | permissive | /*
* Copyright 2019 Xilinx Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
0d01bab671abbaa5d8cb9afa672465a72b87e46d | 9113621c51a6e8ca683b9e816ff2908e7d604aa2 | kktek123/DirectXWorld | /Framework/Environment/TerrainRender.cpp | C++ | cpp | 1,288 | no_license | #include "Framework.h"
#include "TerrainRender.h"
TerrainRender::TerrainRender(Shader * shader, Terrain * mesh)
: mesh(mesh)
{
Pass(0);
//mesh->SetShader(shader);
for (UINT i = 0; i < MAX_MESH_INSTANCE; i++)
D3DXMatrixIdentity(&worlds[i]);
instanceBuffer = new VertexBuffer(worlds, MAX_MESH_INSTANCE, sizeof(M... |
a5bf4851c9287c87c57f0be57948864632cdace8 | 8033b959b64ddda0d86d9de4adf840001cad4715 | hellange/poor-mans-smu | /src/FunctionPulse.cpp | C++ | cpp | 8,681 | no_license | #include "FunctionPulse.h"
#include <SPI.h>
#include "GD2.h"
#include "tags.h"
#include "colors.h"
#include "digit_util.h"
#include "Stats.h"
#include "Debug.h"
FunctionPulseClass FUNCTION_PULSE;
//TODO: Clean up the static mess...
float FunctionPulseClass::max;
float FunctionPulseClass::min;
int FunctionPulseClas... |
bd3e56d04bce6d0eb181e78f8deaa0e70e13a8d9 | a1d15ac28411e3f20fe5d04d21804fe386d631f4 | pkhadilkar/compcode | /spoj/CHICAGO/CHICAGO.cpp | C++ | cpp | 1,866 | no_license | #include <iostream>
#include <functional>
#include <iomanip>
#include <set>
#include <list>
#define MAX_N (100)
#define pi pair<int, int>
#define MIN_DIST (0)
#define DEBUG (0)
using namespace std;
int N, M;
double dist[MAX_N];
bool visited[MAX_N];
list< pi > adj[MAX_N];
void print_list(list< pi > l) {
for(list< pi ... |
7d66f210a79f0cefed60948ecd21376762b6bf04 | 5ee87b118f9bbd53b03a4440bc227dc4909d997f | SlaggyWolfie/learn-opengl | /src/Learn-OpenGL-Sln/Learn-OpenGL-Main/engine/Shader.cpp | C++ | cpp | 5,409 | no_license | #include "Shader.hpp"
#include <fstream>
#include <sstream>
#include <iostream>
#include <glm/gtc/type_ptr.hpp>
std::map<Shader::ShaderType, Shader::ShaderTypeInfo> Shader::_shaderTypes =
{
{ShaderType::VERTEX, {"VERTEX", GL_VERTEX_SHADER}},
{ShaderType::FRAGMENT, {"FRAGMENT", GL_FRAGMENT_SHADER}},
{ShaderType::... |
b9becc47385da5f5eb586ae7dd4e0de28028aedd | fca32f592144e2aaf64bb8c4da961cf516334985 | criley81/mattcoin | /src/qt/bitcoin.cpp | C++ | cpp | 10,782 | permissive | // Copyright (c) 2011-2013 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 <QApplication>
#include "bitcoingui.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#... |
27789988b4dde2b47a5c7dedfe0283f0b3aa7acb | c8e0098192d38b9a2a2f567b9bfbed02b959ff25 | YoungHaKim/GameServerHomework | /Homework7/EduServer_IOCP/EduServer_IOCP.cpp | C++ | cpp | 1,587 | no_license | // EduServer_IOCP.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "Exception.h"
#include "EduServer_IOCP.h"
#include "ServerSession.h"
#include "ClientSession.h"
#include "ClientSessionManager.h"
#include "IocpManager.h"
#include "DBManager.h"
#include "Log.h"
#include "FeedC... |
40269b74205357d7c11c89c81ced1aa136aaf8ab | e190cd417889bfc2e9e9c2969dd6e60da3630586 | azag17/HungryPet | /TuneManager/TuneManager.cpp | C++ | cpp | 4,402 | no_license | #include <SD.h>
#include "ABCNoteParser.h"
#include "TuneManager.h"
// File information
File tuneFile;
File root;
// Buffered note storage/parsing
ABCNoteParser* abcParser;
unsigned int readNoteIndex = 0;
unsigned int writeNoteIndex = 0;
int tuneFreq[MAX_NOTE_BUFFER];
int tuneDur[MAX_NOTE_BUFFER];
// Timing
unsigned... |
9bf7930d0a03b2d483ade75a89110b34b786d370 | 3d3bf7af4df3b22b7aa230f0e27a0e933e62d853 | randyma01/CE2103-GeneticKingdom | /GeneticKingdom/src/genetickingdom.client/Client.cpp | C++ | cpp | 790 | no_license | /*
* Client.cpp
*
* Created on: 10 oct. 2016
* Author: gustavo
*/
#include "Client.h"
Client::Client() {
// TODO Auto-generated constructor stub
/**
* Web Server
*/
FILE * wfp = fopen("parameter.xml", "w+");
CURL *curl;
curl_global_init(CURL_GLOBAL_ALL); //pretty obvious
curl = curl_easy... |
b5064c8e40ecd394b6519e3585dc5a1debde2f5a | 99107808312a55f52cd860b283c7d9fe8f185251 | Yashvishnoi/DATA-STRUCTURE | /ImplementationOfStackUsingArray.cpp | C++ | cpp | 500 | no_license | #include<iostream>
#define Max 50
using namespace std;
int A[Max];
int top=-1;
void push(int x)
{
if(top== Max-1)
cout<<"OVERFLOW CONDITION \n ";
top=top+1;
A[top]=x;
}
void pop()
{
if(top==-1)
cout<<"UNDER FLOW CONDITION \n ";
top=top-1;
}
int Top()
{
return A[top];
}
void print()
{
int i;... |
c7d6f85817b823984b0b68ad81b5726340e20201 | 776c12cc8f1457a3efc6840a8f324100aa6030e0 | mehmetbarisyaman/ITU | /Robotics/Homework 2/1101275.cpp | C++ | cpp | 5,942 | no_license | /*
*
* Student Name: Mehmet Barış Yaman
* Student ID: 150130136
*
*/
#include "ros/ros.h"
#include <iostream>
#include "geometry_msgs/Transform.h"
#include "geometry_msgs/Twist.h"
#include <tf/transform_listener.h>
#include <math.h>
#define PI 3.14
//contains waypoint data
geometry_msgs::Transform waypoint... |
634ef2abdd29746e3575bb3888226c762e8b558d | 77f2c4b8b9e3fa0c40064ee9897de1cb61316026 | Hassan-Farhat/FarhatHassan_48102 | /Lab/Lab_Sort/MarkSort_1Function_Vector/main.cpp | C++ | cpp | 1,870 | no_license | /*
* File: main.cpp
* Author: Hassan Farhat
* Created on November 17, 2016, 11:08 AM
* Purpose: Combine the 3 functions.
*/
//System Libraries Here
#include <iostream> //I/O
#include <cstdlib> //Random
#include <ctime> //Time
#include <vector> //Vector
using namespace std;
//User Libraries Here
//G... |
97066ccb91c9cdf25ef7e964a33d33746c7b261a | 1eadd67e8909b0e6804fa96b701535d4603d0107 | sgc109/algorithm_practice | /BOJ/9359.cpp | C++ | cpp | 1,366 | no_license | #include <cstdio>
#include <iostream>
#include <map>
#include <vector>
#include <cassert>
using namespace std;
typedef long long ll;
ll A,B,N;
int notPrime[100003];
vector<int> primes;
map<ll, int> mp;
vector<ll> dividers;
int main(){
int T;
cin >> T;
for(int i = 2; i <= 100000; i++){
if(... |
b798e644b028a96c3295e332e9ca8376efb2a8ab | 8dbc5fdea613f4ccfdc6ad186ee5185d26b2b5b1 | TakumiArita/CarGame7 | /GameTemplate/game/CubeMap.cpp | C++ | cpp | 390 | no_license | #include "stdafx.h"
#include <gl/GL.h>
#include "CubeMap.h"
//const char *cubename[] = { "Assets/modelData/water.png","Assets/modelData/water.png" ,"Assets/modelData/water.png" ,"Assets/modelData/water.png" ,"Assets/modelData/water.png" ,"Assets/modelData/water.png" };
//unsigned int cubeface[6] = {
// GL_TEXTURE_CUBE... |
da42f767f4ff2767dbe1f601b07f4371a1b7bce9 | 093b46abdbcd87ede6ef1bc33450a439a6fa6169 | gboyraz/macchina.io | /platform/JS/V8/v8/test/unittests/compiler/control-equivalence-unittest.cc | C++ | cc | 6,523 | permissive | // Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/control-equivalence.h"
#include "src/bit-vector.h"
#include "src/compiler/compiler-source-position-table.h"
#include "src/compile... |
d7026196106ecbf160e56d35990d1613bdefd1c3 | 04717633de6315777ffa40504943eb0b6df37f3d | xtblock/chromium | /base/i18n/break_iterator.cc | C++ | cc | 9,693 | permissive | // Copyright (c) 2011 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/i18n/break_iterator.h"
#include <stdint.h>
#include "base/check.h"
#include "base/lazy_instance.h"
#include "base/notreached.h"
#incl... |
1f5cacfdd3e70df154624d3f5fc955503e8baa17 | fb59b11bffedce9134435af08176400888631b78 | theolol/MiMHexPatterns | /patterns/utils/hash_generator.cpp | C++ | cpp | 1,372 | no_license | /********************************************************************************
* Bartosz Borkowski *
* Faculty of Mathematics, Informatics and Mechanics *
* University of Warsaw ... |
73d4fd4c7a976c6bb7e85e43a83422e736faf02b | 4f41295ce3bfd6e16b6c807bdeb6188c2d752cf2 | slimsag/mega | /chromium/chrome/browser/ash/net/apn_migrator.cc | C++ | cc | 21,693 | permissive | // Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/net/apn_migrator.h"
#include "ash/constants/ash_features.h"
#include "ash/public/cpp/network_config_service.h"
#include "base/containers/contains.... |
e0439b1c8e8c61714e7828e6389503a047176fa9 | 4d1db424422d34cb6769bff2e8ff2c58965df038 | nanathia/tenninoboru_ketui | /Sources/TileLayerManager.cpp | C++ | cpp | 1,804 | no_license | //
// TileLayerManager.cpp
// Karakuri2 Mac
//
// Created by 小林 伸 on 2014/08/20.
// Copyright (c) 2014年 Satoshi Numata. All rights reserved.
//
#include "TileLayerManager.h"
#include "SaKumas_includes.h"
#include "TileLayer.h"
#include "tinyxml2.h"
#include <string>
namespace baseArea{
TileLayerManager::... |
e271aa102da19389052a6ea18a2a3121508aee64 | b4a991a4f2bd6a048b65b2a8a6bab44062caabda | hometoned/hms-computer-graphics-demo | /samples/huawei-cg-renderframework-android-cpp-demo/app/src/main/cpp/source/Main.cpp | C++ | cpp | 464 | permissive | /*
* Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
* Description: The entry point class in sample, use different defined to distinct platform handle.
*/
#include "MainApplication.h"
using namespace CGKit;
void android_main(android_app* state)
{
auto app = CreateMainApplication();
... |
1f397bccbcf6da46425f1205f9ab4b85d77bc473 | dbe520be4bdc1789a1707a5a4d2a744ed32540ab | ailyanlu/ACM-ICPC-7 | /cf/test..11.cpp | C++ | cpp | 505 | no_license | // File Name: test..11.cpp
// Author: darkdream
// Created Time: 2014年08月02日 星期六 19时43分49秒
#include<vector>
#include<list>
#include<map>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<sstream>
#include<iostream>
#incl... |
744b67fe40869f6e51b075058f586c51a95e54b1 | 184b7075bb3a65cde5ea6a649140f133b4edade0 | matthb2/ParaView-beforekitwareswtichedtogit | /Applications/OverView/Core/StopListDialog.cxx | C++ | cxx | 7,342 | permissive | /*
* Copyright 2006 Sandia Corporation.
* Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
* license for use of this work by or on behalf of the
* U.S. Government. Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that this Notice and a... |
4f62fbc2236b101fd7208aa1afce0f3e4f87d5c4 | aa915ded4444dba202f6162cce05f9f8ff79face | qaz734913414/MyACM | /AC代码/ZZULIOJ/ZZULIOJ-2207.cpp | C++ | cpp | 460 | no_license | #include <iostream>
using namespace std;
long long modxx(long long a,long long b,long long mod)
{
long long res = 1;
while (b > 0)
{
a = a % mod;
if (b & 1)
{
res = res * a % mod;
}
b = b >> 1;
a = a * a % mod;
}
return res;
}
int main()
... |
67f6af32e7bab1c31fe420f6b364b24482cf31b6 | ab3866594c71eb17e35f5f91737a1e965b1a0db1 | aafontoura/mission-groundstation | /GroundStation/ZigBeeProtocol-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug/debug/moc_qextwineventnotifier_p.cpp | C++ | cpp | 3,442 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'qextwineventnotifier_p.h'
**
** Created: Sat 19. May 11:24:25 2012
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
***********... |
9146e38d72bcc854cec175ccaa7da0ae84004106 | 01a84a28a9f1ac8851f0e18e2a77e6d64a2b5acd | kamyu104/LeetCode-Solutions | /C++/minPathSum.cpp | C++ | cpp | 724 | permissive | // Time Complexity: O(mn)
// Space Complexity: O(mn)
class Solution {
public:
unordered_map<int, unordered_map<int, int> > hash;
int minPathSumeImpl(vector<vector<int> > &grid, int i, int j) {
if(hash.find(i) != hash.end() && hash[i].find(j) != hash[j].end())
return has... |
d438bdb0b334e78b96526fd244547e489e32ba2b | 5e421e22384cd6ccfb8c1987cff000791baefbf3 | Yang-33/competitive-programming | /Others/MISERE_NIM.cpp | C++ | cpp | 1,513 | no_license | #include "bits/stdc++.h"
using namespace std;
const int INF = 1e9;
/* ----- 2017/09/14 Problem: __CONTEST_NAME__ / Link: http://www.spoj.com/problems/MMMGAME/en/ ----- */
/* ------問題------
Misere Nim
-----問題ここまで----- */
/* -----解説等-----
Nimの逆形。
ゲームの末尾の状態について考えれば、1がたくさんあるときに、これが奇数なら負け、偶数なら勝利である。
一方で山に1以外のものが存在して... |
8e9ad0cc1f99d5608a3670d881a6972aee080ab0 | c005abc5b62a6e44a9afbdff8f5ab626ded13330 | liangruuu/my_leetcode | /Explore/Linked-List/Remove Nth Node From End of List.cpp | C++ | cpp | 764 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode *removeNthFromEnd(ListNode *head... |
ab206c1a8b179878e90077ffbfc4466e4adfdbda | 5f5b9747a2150590f0b2adfd6ad6abe7df24b8cf | BrentSouza/ray | /src/ray/raylet/node_manager.cc | C++ | cc | 169,323 | permissive | // Copyright 2017 The Ray Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
ebc7f95318125d8720c034a0813f16b61528365e | c714106b6b4c1a3d0ad299d9de600a1d07f39d0a | mega-pixel-pxl/NLP_Xmind | /数据结构/归并排序.cpp | C++ | cpp | 1,052 | no_license | #include"排序用结构和函数.h"
//递归实现归并算法
void MergeSort(SqList *L)
{
Msort(L->r,L->r,1,L->length);
}
void MSort(int SR[], int TR1[], int s, int t)
{
int m;
int TR2[MAXSIZE+1];
if(s==t)
TR1[s]=SR[s];
else
{
m=(s+t)/2;
MSort(SR,TR2,s,m);
MSort(SR,TR2,m+1,t);
Merge(TR2,TR1,s,m,t);
}
}
void Merge (int SR[], in... |
3990264e88b81863c132c50d369fb0c74937898a | 9cabb93f6e81fdf0771f712550a80fffe0b032cf | julkothegu/OpenGL_C | /Project1/Source/Camera.cpp | C++ | cpp | 3,833 | no_license | #include "Camera.h"
Camera::Camera(float Yaw, float Pitch, float LastX, float LastY, float Fov, bool FirstMouse, glm::vec3 CameraPos, glm::vec3 CameraFront, glm::vec3 CameraUp, float DeltaTime, float LastFrame, float CurrentFrame)
{
yaw = Yaw;
pitch = Pitch;
lastX = LastX;
lastY = LastY;
fov = Fov;... |
b156e8aef63b1847f93bece6e38451ed855346fd | 7185999b95ba4f1e5bf73647b6bb1c9ffe751c16 | tuanduong3001/homework2 | /bai2.26.cpp | C++ | cpp | 268 | no_license | #include<stdio.h>
int main()
{
int n, i;
int n1 = 1;
int n2 = 1;
int n3;
printf("give me n ");
scanf_s("%d", &n);
printf("%d %d ", n1, n2);
for (i = 1; i <= n; i++)
{
n3 = n2 + n1;
n1 = n2;
n2 = n3;
printf("%d ", n3);
}
}
|
34345dd4b70c195040e77aa83f7e8ae372c9d919 | 180fbfaf32e357343356d118b5474fecc5d15438 | galin-kostadinov/Software-Engineering | /C++/C++ Fundamentals Sept 2019/02. INTRODUCTION TO C++ AND BASIC SYNTAX/codecpp/src/OrderTwoNumbers.cpp | C++ | cpp | 221 | permissive | #include<iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a > b) {
cout << b << " " << a << endl;
} else {
cout << a << " " << b << endl;
}
return 0;
}
|
516d1ac714c38a2ae4d37dec11b52c365e2a41ee | f8625099fb1ce4bbd0f392470dae4036e700c4e3 | devjsc/ledger-1 | /libs/network/include/network/tcp/tcp_server.hpp | C++ | hpp | 3,476 | permissive | #pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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 Licen... |
169563d6144c1ff9ca50a16d7bd2df1fe8b45d05 | 9c2c2272287954b255a98b0a55fc56f1ba236143 | Xianmuyingyue/aero-ros-pkg | /aero_startup/.templates/aero_hardware_interface/AeroControllers.cc | C++ | cc | 5,044 | no_license | #include "aero_hardware_interface/AeroControllers.hh"
using namespace aero;
using namespace controller;
//////////////////////////////////////////////////
AeroUpperController::AeroUpperController(const std::string& _port) :
AeroControllerProto(_port, ID_UPPER)
{
stroke_vector_.resize(AERO_DOF_UPPER);
stroke_r... |
958ecbb2a8232e9ebda1d399206ebe03fe198d91 | 313998f9a7cdb9bd2c019d3fd8a5a0a41011b73a | Carbonautics/ACC-Lab | /C++/Expt. 5/expt_5.cpp | C++ | cpp | 1,979 | no_license | #include <iostream>
#include <iomanip>
using namespace std;
class student
{
private:
char Name[30], grade;
int USN;
float mssc, mccn, mcpp, total, percentage;
public:
student()
{
cout << "\nIn student Constructor";
Name[0] = '\0';
USN = 0;
grade = '\0';
mssc ... |
aa76703b09a67b9f24a88956b9acbe2495005fcb | a0e9bd7f5d5d18624654bed05f591d762ad40d88 | cpe102/lab15-2562-2-danwristband | /lab15_1.cpp | C++ | cpp | 1,419 | no_license | #include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void randData(double *, int, int);
void findRowSum(const double *, double *, int, int);
void showData(double *, int, int);
int main()
{
srand(time(0));
const int N = 7, M = 7;
double data[N][M] = {};
double result[N] = {};
double *dPt... |
67c7c7a6d28286037626fcf7e5d9d7f97e255a78 | 4dbd60b6a9fcac60de458b5e18454fdface64619 | vasudsun/Cpp11-STL-Containers | /Rvalue-Example/src/Rvalue-Example.cpp | C++ | cpp | 535 | no_license | //============================================================================
// Name : Rvalue-Example.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#in... |
c92df7416283a0acd847b01847170460ec7e043e | 7977a24f41e7657e00129b8e17c9230b69266a4b | haska1025/spiritbreaker | /src/third_party/webrtc/modules/video_capture/video_capture_impl.cc | C++ | cc | 8,482 | no_license | /*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
fa63c204d00d8023b8446d0a44165c5ab66b8c48 | a2f427f306e537365ff91d8f8e2e0c389980f43e | qchateau/rpclib | /dependencies/include/asio/detail/task_io_service_operation.hpp | C++ | hpp | 1,883 | permissive | //
// detail/task_io_service_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2015 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)... |
bbedbab1991de4abeb5261286f8bd0a3023d45e2 | 2b92a3a584dd54db519beb7ab3c8e0fddb1d3443 | phfr83/CTK | /Libs/PluginFramework/ctkPluginContext.cpp | C++ | cpp | 7,974 | permissive | /*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... |
b819f0c5186fa750206adcedb5045d4fccb02b91 | 15a6c2749bc1911014042e38f55596b49978de8f | ani37/codes | /dp_on_trees1.cpp | C++ | cpp | 2,339 | no_license | //Given a tree T of N nodes, where each node i has Ci coins attached with it. You have to choose
// a subset of nodes such that no two adjacent nodes(i.e.
// nodes connected directly by an edge) are chosen and sum of coins attached with nodes in chosen subset is maximum.
//1} using twp dps
#include<bits/stdc++.h>
#d... |
f862dded34192e89f6a8113af18a5d5b914bc062 | b7c703b04489488a206205d1fca6a16ddb1d20dd | danieldennett/gap_sdk | /examples/native/mbed/test_driver_c++/test_Timer/test_Timer.cpp | C++ | cpp | 957 | permissive | /**
* @file
* Mbed OS Standard Test
* Reference : https://os.mbed.com/docs/latest/reference/timer.html
*/
/* mbed Example Program
* Copyright (c) 2006-2014 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... |
5a8465876c4eba5d68ce2f0cf0829bff22d19dfa | f30fc0273cf47e37817b6b5cca172063327b6f61 | sid1980/MyGame | /MyGame/dxSimple/exercise/Chapter3/DrawMeshWithXFile/DrawMeshWithXFile/main.cpp | C++ | cpp | 15,314 | no_license | /************************************************************************
* This project draws a Lolita with prepared .X file, and also DInput.
* .X file is a format supported by DX, which includes much information
* such as mesh, texture, material, animation, and so on;
***********************************************... |
980bed08fc2d9b94a8473c0648a7e14ba4d92da5 | 816bead0ed090f7de00f54cc7336e79636c275d1 | crowsonkb/pytorch | /torch/csrc/jit/constants.cpp | C++ | cpp | 5,962 | permissive | #include <torch/csrc/jit/constants.h>
#include <ATen/core/functional.h>
#include <torch/csrc/autograd/variable.h>
#include <torch/csrc/jit/custom_operator.h>
#include <torch/csrc/jit/operator.h>
#include <torch/csrc/jit/ir.h>
namespace torch {
namespace jit {
namespace {
c10::OperatorOptions aliasAnalysisInternalSpec... |
018a34ebb3f84220e40cf0a2f263c47d183eba9d | 3727625564c7f907fd4ec537b03c82003329b706 | MarcelSchm/Studienarbeit | /Arduino Code/BMA180.cpp | C++ | cpp | 2,145 | no_license | #include "BMA180.h"
BMA180::BMA180(bool debug) {
// BMA180 setup and shakehands
Wire.begin();
if (debug) {
Serial.println("Initializing the BMA180 sensor");
Serial.println();
}
accelerometerInit();
if (debug) {
Serial.println("Reading chip id and version");
Serial.println();
readFrom(... |
3d3817735f735dbe7ccd3824fc2e54efadb6d156 | 8fa458b9a253fda529ade0a8d30d6ff0196f1a34 | AzeDonLees/CSGOSimple | /CSGOSimple/valve_sdk/interfaces/CClientState.hpp | C++ | hpp | 3,126 | permissive | #pragma once
#include <cstdint>
// Created with ReClass.NET by KN4CK3R
#pragma pack(push, 1)
class INetChannel
{
public:
char pad_0000[20]; //0x0000
bool m_bProcessingMessages; //0x0014
bool m_bShouldDelete; //0x0015
char pad_0016[2]; //0x0016
int32_t m_nOutSequenceNr;... |
f01b79a1cd761df34993e002cf539401c3d5d8e1 | 5f4c33082181c3f3a94d2a1e08c086a071095e7f | mrousavy/hermes | /lib/BCGen/HBC/Passes/FuncCallNOpts.cpp | C++ | cpp | 1,781 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#define DEBUG_TYPE "funccallnopts"
#include "hermes/BCGen/HBC/Passes/FuncCallNOpts.h"
#include "hermes/IR/IRBuilder.h"
using nam... |
3d128f296f75c7778a0ab7d63e37062be02ba797 | dee0726cc65eccdda0379c4707e3bf52ffd084af | Noggi0/OOP_arcade_2019 | /lib/SDL.hpp | C++ | hpp | 2,534 | no_license | /*
** EPITECH PROJECT, 2020
** SDL.hpp
** File description:
** SDL
*/
#include <iostream>
#include "../Headers/IDisplayModule.hpp"
#include "../games/ICharacter.hpp"
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <fstream>
class SDL : public IDisplayModule
{
public:
SDL();
~... |
f27b8a43f40b22913dd9f949d109ead4550181ae | e7bb1294e39918466769d0639e1320e4f376304c | zeph1912/milkomeda_chromium | /chrome/browser/signin/dice_browsertest.cc | C++ | cc | 31,990 | 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 <map>
#include <memory>
#include <string>
#include "base/base_switches.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.