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 |
|---|---|---|---|---|---|---|---|---|
a82aa710d5c4b1ea585128ec7c226803af0370d7 | 581cee74bb8cb9bda2381a89d808b412bc01054d | Jamiras/RAVBA | /src/wx/wxvbam.cpp | C++ | cpp | 39,519 | no_license | // mainline:
// parse cmd line
// load xrc file (guiinit.cpp does most of instantiation)
// create & display main frame
#include "wxvbam.h"
#include <stdio.h>
#include <wx/cmdline.h>
#include <wx/file.h>
#include <wx/filesys.h>
#include <wx/fs_arc.h>
#include <wx/fs_mem.h>
#include <wx/mstream.h>
#include <wx/pr... |
2c40b2ad79a1e93f63bc1e8b10b6241bfcd4fba6 | 24e86e5142c4998cb324281a2a4c5eda4a75a9a0 | xiaoxuehuang/OPS | /apps/c/CloverLeaf_3D/OpenCL/update_halo_kernel1_fr1_opencl_kernel.cpp | C++ | cpp | 18,173 | no_license | //
// auto-generated by ops.py
//
#ifdef OCL_FMA_SWITCH_ON
#define OCL_FMA 1
#else
#define OCL_FMA 0
#endif
static bool isbuilt_update_halo_kernel1_fr1 = false;
void buildOpenCLKernels_update_halo_kernel1_fr1(OPS_instance *instance,
int xdim0, int ydim0, int xdim1,
... |
30e47b44acfab3383063b7bc99315da1e43c9720 | 0fc8f6745ada16c9cf995aa42cc0fc9d6b27ed0b | lekhoa2017/SPIR1 | /spir_atnv/src/nodes/atnv_control.cpp | C++ | cpp | 2,664 | no_license | #include "spir_atnv/robust_integral_control_full_dof.h"
#include "ros/ros.h"
#include "geometry_msgs/Quaternion.h"
#include "std_msgs/Int32.h"
#include "spir_atnv/PileStateStamped.h"
#include "std_msgs/Float32MultiArray.h"
/** @file atnv_control.cpp
* @brief Calculates the required thruster commands for the short dis... |
ee77f26f748ed241447a719708cdc27b33aa7ce7 | 39cbfc7820a5908c3876ad7c1930a6b6486b4eb0 | FaridCH/ApiRaspberry | /src/sourcefiles/Calcul_GPIO.cpp | C++ | cpp | 1,609 | no_license | /*
* Calcul_Gpio.cpp
*
* Created on: 27 mai 2014
* Author: youssef
*/
#include "../headers/Calcul_GPIO.h"
#include "../headers/Sortie_Locale.h"
#include <pthread.h>
#include <cmath>
Entree_Distante entree_distante;
pthread_t t1;
pthread_mutex_t timer_mutexs;
pthread_cond_t timer_condition_variables;
Calcu... |
9366ee74d8872e70b0dbbc788d6649d9b972265e | 7fbf00914bfe897a0789f03bf767c7ae708c4574 | MedicaicloudLink/Rosetta | /main/source/src/protocols/abinitio/KinematicTaskControl.cc | C++ | cc | 6,800 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
648f1f38cfb612e7d518aadcd3e5ebc91dcf5349 | 21d4cda15ae4d88eb7d2e0742ec11296e0b9f004 | skyellen/robwork-mirror | /RobWorkHardware/example/sdh/sdhoptions.cpp | C++ | cpp | 11,340 | no_license | //======================================================================
/*!
\file
\author Dirk Osswald
\date 2008-05-05
\brief
Implementation of a class to parse common SDH related command line options
\section sdhlibrary_cpp_demo_sdhoptions_cpp_copyright Copyright... |
f65ee5ae901d6a024354923f0b929d59bc14151c | be2143c68be7d19f6abfa66df3f1ae766ad228ff | iridium-browser/iridium-browser | /buildtools/third_party/libc++/trunk/test/std/containers/associative/multimap/multimap.nonmember/op_compare.pass.cpp | C++ | cpp | 3,245 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
9309791eb023a8396912ff182082e108201415b7 | ac0f97ca5df11ad28e80cf279311ed47d04680a2 | DarkTXYZ/COMPROG_LAB_22 | /lab22_3.cpp | C++ | cpp | 396 | no_license | #include <iostream>
#include <set>
using namespace std;
//Write function count() here.
int count(int a[] , int size){
set<int> S;
for(int i = 0 ; i < size ; ++i)
S.insert(a[i]);
return S.size();
}
int main(){
int data[] = {1,2,4,5,4,8,2,1,2,4,6,1,4,4,4,2,1,0,12};
cout << "There are " << count(data,sizeof(... |
30a75ad69a502c3c152834604bc5c3621e9bf841 | 8ef58e22398ca924071b83dd13e0b7e584a7b6a0 | DenisBarabanov/OOP-Class | /reverseWords/main.cpp | C++ | cpp | 719 | no_license | #include <iostream>
#include <stack>
using namespace std;
int main()
{
stack<string> stk;
string str;
int N;
cin >> N;
cin.ignore();
for(int i = 0; i < N; i++) {
getline(cin, str);
string::size_type pos = str.find(' ');
string::size_type prev_pos = 0;
while(pos ... |
8e525bcdf6187f276cb0e5431666e35728b8fbe5 | 049a66129dd31fb78aa46b8104003f8d6dfc8d48 | mxiaotangcaim/creo5.0_otk | /otk_exe1/otk_exe1.cpp | C++ | cpp | 2,807 | no_license | /*
木盒子(Wood’Box)---Creo/OTK C++二次开发教程专用培训案例
*/
#include "stdafx.h"
#include "SyncModel.h"
#include "AboutMe.h"
#include <ProUI.h>
extern "C" int user_initialize(
int argc,
char *argv[],
char *version,
char *build,
wchar_t errbuf[80])
{
wfcWSession_ptr wSession;
//初始化产品信息
OTKApp::AppName = L"木盒子(Wood'Box)"; ... |
ee3f95f266dab14939ae90b7382f2238a12ba8b9 | c51368d6d2af3b1c1f20c2469d9e4aeca7c82bc6 | weicz11/llvm-sgx | /lib/Target/PowerPC/PPCVSXSwapRemoval.cpp | C++ | cpp | 36,966 | permissive | //===----------- PPCVSXSwapRemoval.cpp - Remove VSX LE Swaps -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------------... |
06dbacaeeb9c5688e99300f2f7282544e634862f | 5a24c0fc809c99ebbd52d82e3db1c7dd40e7e783 | hefen1/chromium | /android_webview/lib/main/aw_main_delegate.cc | C++ | cc | 7,633 | 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 "android_webview/lib/main/aw_main_delegate.h"
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/brows... |
7f0acd5a4f48784e1c8f23845b3a01338e767d85 | efc29f466a4fb311ad736f66fc02d42f250f4824 | arichardson/juliet-test-suite-c | /testcases/CWE369_Divide_by_Zero/s02/CWE369_Divide_by_Zero__int_listen_socket_modulo_43.cpp | C++ | cpp | 7,463 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_listen_socket_modulo_43.cpp
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-43.tmpl.cpp
*/
/*
* @description
* CWE: 369 Divide by Zero
* BadSource: listen_socket Read data using a listen socket (... |
a5f6f120e379d421a83cba79c64833e41c1c1a8d | daf4477abdde1800bc53cf8b479af1d582ba7e27 | Irvanabdurrahman/My-Code | /Algoritma-dan-Pemrograman-2/Praktikum-03/fakval.cpp | C++ | cpp | 981 | no_license | #include <conio.h>
#include <iostream.h>
#include <stdio.h>
int faktorial(int x);
void main()
{
clrscr();
int angka,x;
cout << "__________________________________________________\n";
cout << "\nNama Program : Menghitung faktorial by Value \n";
cout << "Pembuat : Irvan Abdurrahman | 4510210003\n";
cout << "Update ... |
64d93ef20f3733dd45e52692ae7ecaad5ed1c2a4 | 37104da89a5b0f468a0636ecd46bb1d083349838 | dwitek/Data-Structures-and-Algorithms | /Element na k-tej pozycji/main.cpp | C++ | cpp | 967 | no_license | #include <iostream>
using namespace std;
int partition_horae(int tab[], int l, int r)
{
int q = tab[l];
int i = l - 1;
int j = r + 1;
while (true)
{
do j--;
while (tab[j] > q);
do i++;
while (tab[i] < q);
if (i < j)
swap(tab[i], t... |
08ff70b53e4caf4bcd6634f67173e4d74174e5ec | 85ec727efdaacf8ae9687352c4233d0f93804e7e | ClaireLC/drake | /solvers/test/clp_solver_test.cc | C++ | cc | 5,700 | permissive | #include "drake/solvers/clp_solver.h"
#include <gtest/gtest.h>
#include "drake/solvers/test/linear_program_examples.h"
#include "drake/solvers/test/quadratic_program_examples.h"
namespace drake {
namespace solvers {
namespace test {
TEST_P(LinearProgramTest, TestLP) {
ClpSolver solver;
prob()->RunProblem(&solver... |
280e9d8fc057a64f8a558554c70c199d6caaa1a7 | 08fe2cf2acdf91faf05c599d1e075b83e3b86c03 | NazarKachmar/cpp_drafts | /reverse_massive/main.cpp | C++ | cpp | 488 | no_license | #include <iostream>
using namespace std;
int main()
{
int c;
int arr[8];
cout<<"input massive:"<<endl;
for(int i=0;i<8;i++)
{
cin>>arr[i];
}
cout<<"reverse massive: ";
for(int ia=7;ia>=0;ia--)
{
cout<<arr[ia];
}
cout<<endl<<endl;
cout<<"change nearby: ";
for(i... |
cbe6d1409f5674ddf8a3ce2b4ee68770a6087861 | 5f7e998bae928a925c7935d84191d540a891cdf7 | philipritchey/csce12x-fall21-ICAs-week02-FizzBuzzSum | /main.cpp | C++ | cpp | 1,641 | no_license | #include <iostream>
#include <utility>
#include <tuple>
#include <list>
#include "code.h"
/*
This file unit tests the function(s) in code.cpp
Dr. Ritchey had to write this because Replit doesn't support unit testing for C++ (smh)
By the end of 121, you could be able to write this (and better), too.
*/
std::pair<int,i... |
740bbe7221ef0659ab09e6e87f258f33601ec0dc | 0963863db13805765aeaa088303b17fe41719519 | longvd336/ds-algo | /full_code_ptit/cay_nhi_phan.cpp | C++ | cpp | 780 | no_license | #include <stdio.h>
#include <stdlib.h>
struct node {
int info;
node *right;
node *left;
};
typedef struct node* tree;
void khoitao(tree &t) {
t = NULL;
}
void chennode(tree &t, int x) {
node*p = (node*)malloc(sizeof(node));
p->info = x;
p->right = p -> left = NULL;
if(t == NULL) {
t = p;
}
else {
i... |
7e55612de8fa1dd131e992216b5fdf33132dc91c | a0bac7e255dc38f042323d90052c4afd65392289 | w747351274/ChatServer | /iOSSocketClient/boost/format/format_class.hpp | C++ | hpp | 7,889 | no_license | // ----------------------------------------------------------------------------
// format_class.hpp : class interface
// ----------------------------------------------------------------------------
// Copyright Samuel Krempp 2003. Use, modification, and distribution are
// subject to the Boost Software Licens... |
096b21770842b33f78c181cdc3c203563ac0bc94 | 585f0b36171ce0be08eb1980bc4084a0ed8fa10e | rblonski18/algorithm-practice | /leetcode/addTwoNumbers.cpp | C++ | cpp | 1,707 | no_license | // Add Two Numbers
//
// Two numbers are given as values in a linked list, stored
// in reverse order (250 is 0->5->2). Add them together and
// return the sum in the same format.
//
// Since the numbers are in reverse order, dealing with carry
// digits becomes much easier. Construct a new linked list.
// p... |
b8f0b60fb712ddb7a17aa05de2c8dbdc478274df | 2edcede72959ae050ed11a8ee39e7129c48f2a17 | marco-c/gecko-dev-wordified | /third_party/libwebrtc/net/dcsctp/packet/chunk/sack_chunk_test.cc | C++ | cc | 2,907 | permissive | /
*
*
Copyright
(
c
)
2021
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
contributing... |
40cd3fd79b1ac13c950a9490a6e54aa9870ac8b9 | 9d355707e3d76d6e9ec37a7640dc10af82767ff6 | pagict/leet_code | /1450.number-of-students-doing-homework-at-a-given-time.cc | C++ | cc | 301 | no_license | #include <vector>
int busyStudent(const std::vector<int> &startTime,
const std::vector<int> &endTime, int queryTime) {
int cnt = 0;
for (auto i = 0u; i < startTime.size(); ++i) {
if (queryTime >= startTime[i] && queryTime <= endTime[i]) {
++cnt;
}
}
return cnt;
} |
67e5ffd99dd34442341965f6b743eb7ed4d42ffa | e423f243466a70a7ade1d53317a19fa989cb3879 | ravi-indurkar/misc | /myclass_pointer_very_basic.cpp | C++ | cpp | 734 | no_license | #include <cstdio>
using namespace std;
class myclass {
public:
int house_number;
int zip;
myclass() {
house_number=0;
zip=0;
}
myclass( int house_ , int zip_ ) {
house_number = house_;
zip = zip_;
}
void myprint(void) {
printf("This=%x house_number=%d, zip=%d\n", this, house_... |
5916d2e160ca3247f643c6bc1b2c857ea265da65 | 1eb743486eeab25ac18b4f9d80b01d08442677d4 | adityaitoriya/ADA-Practical | /graphn colouring.cpp | C++ | cpp | 596 | no_license | #include<iostream>
using namespace std;
bool gph[4][4]= {{0,1,1,1},{1,0,1,0},{1,1,0,1},{1,0,1,0}};
int V=4; int m=3; int x[4]={0};
bool isSafe(int v, int c)
{ for(int i=0;i<V;i++)
{
if(gph[v][i] && c==x[i]) return false;
}
return true;
}
bool gphcolor(int v)
{ if(v==V) return true;
for(int c=1;c<=m;c... |
21555e9db5132f6ef399e497211aec285afcea3e | e550299066fcf00961b5dd79063980e3d49117d2 | thejerome/simple-cpp-project | /src/main/cpp/t09_snail.cpp | C++ | cpp | 910 | no_license | //Улитка
//
// Улитка ползет по вертикальному шесту высотой H метров, поднимаясь за день на A метров, а за ночь спускаясь на B метров. На какой день улитка доползет до вершины шеста?
//
//
//Формат входных данных
//
// Программа получает на вход целые неотрицательные числа H, A, B, причем H > B. Числа не ... |
c510124e5aaf51139442b41bcbc5ab3218784903 | c72f37ca7403d29330759cf488dc8c1f21cf12e3 | ChevalierPierre/chipset-simulator | /include/false.hpp | C++ | hpp | 525 | no_license | /*
** EPITECH PROJECT, 2017
** false.hpp
** File description:
** <..>
*/
#ifndef FALSE_HPP_
#define FALSE_HPP_
#include "pin.hpp"
#include "IComponent.hpp"
class false_cmp: public virtual nts::IComponent {
public:
false_cmp(std::string str);
~false_cmp();
nts::Tristate compute(std::size_t pin = 1);
void set... |
05eb0b19281319e3452f8e9492223e5bbdebb229 | 8cd3d3a73cd7254c6bb2676de011005f0f0557dc | Areustle/heasoft-6.20 | /Xspec/src/XSUser/Handler/xsDelcomp.cxx | C++ | cxx | 6,210 | no_license | //
// XSPEC12 November 2003
//
//
#include <XSUser/Global/Global.h>
#include <XSUser/Global/XSGlobal.h>
#include <XSUser/Handler/HandlerUtils.h>
#include <XSUser/Handler/XSinterface.h>
#include <XSModel/GlobalContainer/ModelContainer.h>
#include <XSModel/Model/Model.h>
#include <XSModel/Model/Component/Component.h>
... |
57387880f08141043ee7f6b51c63620ce92cd813 | 6d6fca9ee416be4f6fb43f291f2f239aed6e93db | eltaiguer/tdi_grupo3 | /Lab 2/Doll_Head_Pose_MSFT-master/src/Traces.cpp | C++ | cpp | 9,304 | no_license | #include "Traces.h"
/**
Traces is a project for trying out eye-processing related code.
It uses and works with openframeworks 0.071.
tomas laurenzo
tomas@laurenzo.net
*/
void Traces::setup(){
// setup
ofSetLogLevel(OF_LOG_SILENT); // keep the console quiet
ofEnableAlphaBlending();
ofSetDataPathRoot("bin/da... |
1f6fc90cfdd0e169d66c569cf41d359aa348d91a | 1d555d8bc3ad1c82f9bbb949b7f84d8d19de7297 | shalevy1/implot | /implot_items.cpp | C++ | cpp | 118,789 | permissive | // MIT License
// Copyright (c) 2020 Evan Pezent
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, mer... |
e25d508753f6b6261d23202f5b780dc7211784fc | 9a0425587389b2be08dd44bd154b8844a4cf585d | chrrs/serenity | /Userland/Libraries/LibPDF/Fonts/TrueTypeFont.cpp | C++ | cpp | 2,209 | permissive | /*
* Copyright (c) 2022, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibPDF/CommonNames.h>
#include <LibPDF/Fonts/TrueTypeFont.h>
#include <LibPDF/Fonts/Type1Font.h>
namespace PDF {
PDFErrorOr<NonnullRefPtr<PDFFont>> TrueTypeFont::create(Document* document, Nonnu... |
0d9b1ab6c92fed4a5165296a6047b9ca584cde20 | 31a71875529a5d10ff422fdd55861b1047cbb760 | ItachiEU/University | /MIA/Contest12/b.cpp | C++ | cpp | 984 | no_license | #include<bits/stdc++.h>
const int maxn = 105;
const long long int INF = 1e18+7;
using namespace std;
vector<int> G[maxn];
long long int d[maxn], dp[maxn];
queue<int> q;
void bfs(int a, int n){
for(int i=1; i<=n; i++){
d[i] = INF;
dp[i] = 0;
}
d[a] = 0;
dp[a] = 1;
q.push(a);
while(!q.empty()){
int v = q.fro... |
a08492f7bc56783b1872bd70dc6e1f53cf3ac40e | 94d4d3036c994bde33f1eb769f8642e709b85618 | sfink/tHqAnalysis | /tHqAnalyzer/src/GenTopEvent.cpp | C++ | cpp | 39,012 | no_license | #include "tHqAnalysis/tHqAnalyzer/interface/GenTopEvent.hpp"
GenTopEvent::GenTopEvent (){
isFilled=false;
ttxIsFilled=false;
ttXid=-1;
}
GenTopEvent::~GenTopEvent(){}
bool GenTopEvent::IsFilled() const{
return isFilled;
}
bool GenTopEvent::TTxIsFilled() const{
return ttxIsFilled;
}
void GenTopEvent::FillTT... |
f7819325bbec24fae9a7c027d9bd4393cc1b5422 | 3f4ee82ac045a1b28ecf4845cb8abe9f99ca0425 | checkoutb/LeetCodeCCpp | /ge600/LT0699_2022-04-01_Falling_Squares.cpp | C++ | cpp | 1,241 | no_license |
#include "../header/myheader.h"
class LT0699
{
public:
// D D
// .
//Runtime: 64 ms, faster than 50.00% of C++ online submissions for Falling Squares.
//Memory Usage: 10.8 MB, less than 91.15% of C++ online submissions for Falling Squares.
// v[0] - v[0]+v[1] 下标间的 最大值。
// 1000 个数
vector<int> lt0699a(vector<... |
e3d87a5c0fb546db19bf2d9e0d37feeaa9f4703f | 3add965ce0cb7c5cefb850ea4c0d5021a25b4e69 | roles/deep_learning | /src/CBLAS/Logistic.cpp | C++ | cpp | 1,337 | no_license | #include "Logistic.h"
using namespace std;
Logistic::Logistic(int nIn, int nOut) :
SoftmaxLayer(nIn, nOut, "Logistic") ,
TrainComponent(Supervise, "Logistic") { }
Logistic::Logistic(FILE* fd) :
SoftmaxLayer(fd, "Logistic") ,
TrainComponent(Supervise, "Logistic") { }
Logistic::Logistic(const char... |
22644e7cc9c9054164918d4189f7ce27df6eb0ac | 9b1966aadc024e11332a1030a1210adee09d7e88 | arkiny/DreamCoast3D | /DreamCoast3D/DreamCoast3D/cPlayerOnHit.cpp | C++ | cpp | 3,882 | no_license | #include "stdafx.h"
#include "cPlayerOnHit.h"
#include "cGamePlayableObject.h"
#include "cSkinnedMesh.h"
cPlayerOnHit::cPlayerOnHit()
{
m_nCurrentStateType = 11; //11번 (장)피격
SetIsRestart(false);
SetIsDoing(false);
SetStateGroup(ESTATEGROUP::E_STATEGROUP_PASSIVE);
m_mapCancelInfo[ESTATEGROUP::E_STATEGROUP_IDLE] =... |
58f9325cefbd231a2269bd2e21e3ef7cdae0aad7 | eda5a0546c7749da565750dcc59deed63c506e8b | baojunli/FastCAE | /OCC/opencascade-7.2.0/x64/debug/inc/DDF_Browser.hxx | C++ | hxx | 3,312 | permissive | // Created by: DAUTRY Philippe
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public Li... |
d248e0574a2c5b493d0c31c74e8d6129fe4515d7 | 74b54f3b4785e3f348fc87b888f917a1e06e2541 | Kertek/projet_dbf | /codeDBF/DBFsrc/SocketFactory.cpp | C++ | cpp | 3,207 | no_license |
#include <string.h>
#include <netinet/in.h>
#include <iostream>
#include<arpa/inet.h>
#include <fcntl.h>
#include "SocketFactory.h"
bool SocketFactory::startServer(int nPort) {
mOpenServersMutex.lock();
if (openServers.count(nPort) != 0) { // if the server already exist: ERROR on starting
mOpenSer... |
91bb845ca056c233479045b8c17af05477ae2fa1 | a625c2f5a4fa57248798d3b1cd57c936c3bff632 | akire/djinni_with_cx | /test-suite/handwritten/cpp/constants_interface.cpp | C++ | cpp | 558 | permissive | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#include "constants_interface.hpp" // my header
namespace cppns {
bool const ConstantsInterface::BOOL_CONSTANT = true;
int8_t const ConstantsInterface::I8_CONSTANT = 1;
int16_t const ConstantsInterface::I16_CONSTANT = 2;... |
2d62831b1d524ed5b7a6106f868632d19292336e | 6155c0b7c4a02e31bb24817039d4d29724421de9 | s1040486/xiaohui | /02/01.static/Demo.10/MainFrm.cpp | C++ | cpp | 2,404 | no_license | // MainFrm.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "ExampleDIB.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainFrame
IMP... |
988ca38a5cee55c8e071ff22647b784d44d9fced | 51ba023a0bb1dcfe4645460e70300225f0cecef0 | JiaoMX-keeping/rsp3-armv8-baremetal | /src/filesystem/VirtualFileSystem.cpp | C++ | cpp | 604 | permissive | /*
* VirtualFileSystem.cpp
*
* Created on: Apr 8, 2018
* Author: 13774
*/
#include <filesystem/VirutalFileSystem.h>
#include <memory/MemoryManager.h>
#include <io/Output.h>
#include <asm_instructions.h>
VirtualFileSystem::VirtualFileSystem()
:_root( new VirtualFile(""))
{
if(!_root)
{
kout << FATAL << ... |
6223108cd5387fe0d87157e4f44588593aa932c1 | 442700cc4b778afc2c059488784774382d40ef4f | slogic/E323AI | /CGroup.cpp | C++ | cpp | 18,403 | no_license | #include "CGroup.h"
#include <sstream>
#include <iostream>
#include <string>
#include "CAI.h"
#include "CUnit.h"
#include "CUnitTable.h"
#include "CTaskHandler.h"
#include "CPathfinder.h"
#include "CDefenseMatrix.h"
int CGroup::counter = 0;
void CGroup::addUnit(CUnit &unit) {
if (unit.group) {
if (unit.group == ... |
f01314fdf4323d51dc91208e5c32e4529ee7f8fe | ddc7f7ddea50a4ce6c749641c8ca1607d1196b38 | benmurrell/sockets-and-threads | /Thread.cpp | C++ | cpp | 3,058 | no_license | // Copyright(C) 2011 Ben Murrell
#include "Thread.hpp"
//-----------------------------------------------------------------------------
//! Constructor
//-----------------------------------------------------------------------------
Thread::Thread
(
Thread::FunctionType aFunction //!< The function to call in the new ... |
a84b41af3e4c095972598c9343ade86aa4c48040 | 1260481a0b4c14745cd06093ace264c7bc0d1d4e | mandalsudipti/competitive_programming | /codeforces/Binary String to Subsequence.cpp | C++ | cpp | 1,555 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int T;
cin>>T;
while(T--)
{
int n ;
cin>>n;
string S;
cin>>S;
vector<int>arr(n);
vector<set<int>>end_with(2);
int idx = 1;
for(int i=0;i<n;i++)
{
if(S[i]=='0')
... |
98d900e7d8dc330c048ef14bb583bef91d64a6a4 | ab5307eade5e2886ae442d79e2e0cbc5fbc066fd | radtek/nwifms70 | /ClaimRec.cpp | C++ | cpp | 1,761 | no_license | #include "stdafx.h"
#include "resource.h"
#include "claimrec.h"
#include "nwivar.h"
#include "sqlstmt.h"
#include "qdata.h"
IMPLEMENT_DYNAMIC(CClaimRec, CRecObj)
void CClaimRec::Copy(CClaimRec &ClaimRec)
{
SetID(ClaimRec.GetID());
SetCP(ClaimRec.GetCP());
SetClaimCode(ClaimRec.GetClaimCode());
SetNa... |
c507ab94d559ccb183a6a1f5491c9c019a597b28 | fac551bb9bad6f34e96c89fa9045188c3ae9b59a | sudhanshu27/dsa-learning | /Patterns/0-1pattern.cpp | C++ | cpp | 402 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
//loop for pattern
for(int i=1;i<=n;i++) //loop for row
{
for(int j=1;j<=i;j++) // loop for column
{
if((i+j)%2==0) //even sum of indices have 1
cout<<"1 ";
else
... |
a8ca22f5e21e6ae14d4b87cc5ebf069fe931a9a5 | 09b1988985299ed3ae7c48f3da3392b0aad8a37a | Magda079/gitrepo | /programowanie/cpp/nwd.cpp | C++ | cpp | 384 | no_license | /*
* nwd.cpp
*/
#include <iostream>
using namespace std;
int nwd(int a,int b){
if(a==b) return a;
else
if(a>b)
return nwd(a-b, b);
else
return nwd(b-a, a);
}
int main(){
int a,b;
cout << "Podaj a ";
cin >> a;
cout << "Podaj b ";
cin >> b;
cout << "Naj... |
132a1598b07030721c261e439742f7e513f51a12 | 8ed5d34e3a51f5d2588857dde24f8f9c225942f1 | lamar-studio/Code365 | /rjcore_linux/interfaces/utils/rj_log.cpp | C++ | cpp | 5,749 | no_license | #define MODULE_TAG "rj_log"
#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <pthread.h>
#include "rj_log.h"
#define RJ_LOG_MAX_LEN 1024
#define MODULE_NAME "rjcore_linux"
#define FILE_NAME_MAX 1024
#d... |
d6539ca37fb30c9ffa7c659f72f838561ee7ddc2 | 85a99c2571ac7c23b42f3aeac9f2f0032494245e | wilson-ko/dr_param | /test/yaml.cpp | C++ | cpp | 602 | no_license | /// Catch
#include <catch2/catch.hpp>
/// Fizyr
#include "yaml.hpp"
namespace dr {
TEST_CASE( "Yaml Test", "[array]" ) {
std::array<int, 2> original{{1, 2}};
std::string encoded = YAML::Dump(encodeYaml(original));
YamlResult<std::array<int, 2>> decoded = parseYaml<std::array<int, 2>>(YAML::Load(encoded));
... |
cb0efe02a8f666e36bdfb925a3b98c666b645b76 | 40fee92dec59120a23e90c1423e7b53c33d4293c | krishnachaitanya7/OpenGL_Assignments | /homework_3/main.cpp | C++ | cpp | 628 | no_license | #define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
#include "util.h"
// Initialize required Variables for static class
float utils::horizontal_angle = 50.0f;
float utils::vertical_angle = 0.0f;
// Main program
int main(int argc, char** argv) {
glutInit( & argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB ... |
14436f1fdf8622725c062f2a7d7f4bce5d87cbb7 | a86c120bceb033a28419dd89be8711f858146af9 | ShuoHe97/CS239-Final-Project | /chrono/chrono-dev/src/tests/unit_tests/joints/utest_JOINT_linactuator.cpp | C++ | cpp | 16,769 | permissive | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... |
8806afa97c9d9b51f43481f6cb1d8a255fddaed0 | 30bd1af24f804d5c40644433bc084367c6680595 | Pramodjais517/competitive-coding | /Vestigium.cpp | C++ | cpp | 1,346 | no_license | #include<bits/stdc++.h>
using namespace std;
// template starts here
#define ll long long
#define ull unsigned long long
#define rs reserve
#define pb push_back
#define mp make_pair
#define fi(i,s,e,inc) for(auto i=s;i<e;i+=inc)
#define fie(i,s,e,inc) for(auto i=s;i<=e;i+=inc)
#define fd(i,s,e,dec) for(auto i=s;i>e;i-=... |
1935c25c2fdc767c9134adcdefe084e89b497ba5 | dd2a6f6da8cfee5ca7f986c790d19d0b0ed7d2ea | andre4688/rpcs3 | /rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp | C++ | cpp | 9,302 | no_license | #include "stdafx.h"
#include "SC_FileSystem.h"
#include "Emu/SysCalls/SysCalls.h"
extern Module sys_fs;
int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
{
const wxString& path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size... |
680335d2172f7226e5454d5c2ed8e7b6d021e876 | d00299e2d25ab5b10db493871e95a4422d58ce85 | vxl/vxl | /contrib/brl/bseg/boxm2/cpp/pro/processes/boxm2_cpp_change_detection_process2.cxx | C++ | cxx | 4,972 | no_license | // This is brl/bseg/boxm2/cpp/pro/processes/boxm2_cpp_change_detection_process2.cxx
#include <iostream>
#include <fstream>
#include <bprb/bprb_func_process.h>
//:
// \file
// \brief A process for rendering the scene.
//
// \author Vishal Jain
// \date Mar 10, 2011
#ifdef _MSC_VER
# include "vcl_msvc_warnings.h"
#end... |
122e85fb4f3517e8615e4f1110c62506364cdd48 | 546b61d85a8731e5f1b0d3372e8f2a0ac853adef | manuelF/isw2 | /src/plant_log_item.cpp | C++ | cpp | 250 | no_license | #include "plant_log_item.h"
PlantLogItem::PlantLogItem(std::string) {
}
PlantLogItem PlantLogItem::Build(std::string log){
return PlantLogItem(log);
}
PlantLogItem::~PlantLogItem() {
}
std::string PlantLogItem::Serialize() {
return _log;
}
|
ba98c092cd0418068b408abefe922d062361c5e4 | c1e27e88f6487568d8e59db9a15fd0b9565f73d3 | cuongdh1603/Data-structure-and-Algorithm | /Chon_so_tu_ma_tran_vuong_cap_N.cpp | C++ | cpp | 1,178 | no_license | #include<bits/stdc++.h>
#define mxn 13
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int c[mxn][mxn],ans[mxn][mxn];
int a[mxn];
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
cin>>c[i][j];
for(int i=1;i<=n;i++) a[i] = i;
int dem = 0,sum = 0,d = 0;
for(int i=1;i<=n;i++... |
47a5493baa206a4299ca8d2f309876e15ca7411a | 4a7c43c05cc0be230f6416d3325d4e995da4404a | BeccaBecca/proxy | /extensions/access_log_policy/plugin.cc | C++ | cc | 5,775 | permissive | /* Copyright 2019 Istio 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 applicab... |
7963833645bdccfbd93b6a607fc9cedacab9339f | 29bfaa6dc0b7b03cbee4bf74e13341ce0b27a008 | akash-singh/lazy-crypto | /src/arith.cpp | C++ | cpp | 16,002 | no_license |
#include <arith.h>
// Constructor - Initialize with a integer val
bigInt::bigInt() {
}
// Initialize size words with 0
bigInt::bigInt(int size) {
data.resize(size,0);
}
// Initialize size words with val
bigInt::bigInt(int size, int val) {
data.resize(size,val);
}
// Constructor - Initialize with... |
4ca005215de761be62f788078228631d32e4a3ca | 2417cbc7b9fa0e3c23a5a37cac3b046d22480c90 | the-locksmith/fuchsia | /garnet/bin/ui/view_manager/view_state.cc | C++ | cc | 6,903 | permissive | // Copyright 2015 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "garnet/bin/ui/view_manager/view_state.h"
#include <algorithm>
#include "garnet/bin/ui/view_manager/view_impl.h"
#include "garnet/bin/ui/view_ma... |
380b90b74e52d2a48b3073f8ce9a76cff31c1ac2 | 762ceb844c5c81329a36de3f832c8afe9b104e14 | uvbs/wx2Server | /Common/Packets/GCDetailHealsAndDamages.cpp | C++ | cpp | 3,597 | no_license |
#include "stdafx.h"
#include "GCDetailHealsAndDamages.h"
namespace Packets
{
BOOL GCDetailHealsAndDamages::Read( SocketInputStream& iStream )
{
__ENTER_FUNCTION
iStream.Read((CHAR*)m_DirtyFlags.GetFlags(), m_DirtyFlags.GetByteSize());
iStream.Read((CHAR*)&m_nReceiverID, sizeof(m_nReceiverID));
iS... |
b376cf1b7beafaf77e46cce02aae06e35f20881d | 366b83cc8b88c7363f12dfecdf3fecdc315a95fd | perrozzi/cmg-cmssw | /DQM/SiStripMonitorSummary/src/SiStripLorentzAngleDQM.cc | C++ | cc | 9,304 | no_license | #include "DQM/SiStripMonitorSummary/interface/SiStripLorentzAngleDQM.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "TCanvas.h"
// -----
SiStripLorentzAngleDQM::SiStripLorentzAngleDQM(const edm::EventSetup & eSetup,
edm::ParameterSet const& hPSet,
edm::ParameterSet const& fP... |
0fb6b5bf0dd03baeade7c9fe4fd2b93b9cd8db48 | e8aeecda7d3115b9b8d569f1a20c8a93b19da764 | aPruner/ActionRPGGame | /ActionRPG/Inventory.cpp | C++ | cpp | 3,146 | no_license | #include "Inventory.h"
#include "Weapon.h"
Inventory::Inventory()
{
m_maxSize = InventoryConstants::c_defaultMaxSize;
m_gold = InventoryConstants::c_defaultStartingGold;
m_isFull = false;
m_freeSlots = m_maxSize;
// Initialize Inventory data structures
m_itemsVec = new std::vector<Item *>();
m_itemsMap = new s... |
1cdfd23531f34ba9a6beb3e575052b1860ff7b1c | 1203ace1a6dff3f1f01f2cecf321d89a014c53c0 | akrsmangipudi/progamming | /LTC/LinkedList/MergeSortOnLL.cpp | C++ | cpp | 1,945 | no_license | # include <iostream>
# include <stdlib.h>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* FindMidElem( ListNode *head )
{
ListNode *slow = head;
ListNode *fast = head->next;
... |
bb8de8304dabe23ec81c058c0aa220c09f787233 | 4b152dc2c2884bdc7ffa181f44068718e8c1be3b | anthonykrose/DarkSUSY | /AnalysisTools/CutFlowAnalyzer/src/Analysis.cc | C++ | cc | 35,488 | no_license | // System include files
#include <memory>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSe... |
57de6773352153d23bbcfcc5ea8a8275db6e4501 | 3a60eb75c1414458fbf1dca724b4635e42471178 | VincentZ-42/PaintBot | /Automatic_Controls/PaintBotAutomaticControls/PaintBot.cpp | C++ | cpp | 13,389 | no_license | #include "PaintBot.h"
/**
* The PaintBot class represents the painting robot as a whole. The purpose of
* the PaintBot class is to simplify the initial set up and allow users to
* easily move the center piece by entering coordinates, or by entering a
* distance to travel, and an angle at which to travel. Automation of... |
e5bc0cfafc2189a674a233d6cbf13df78c21cd4f | c875b585133c6cb75fa9fd3e085f0811bf3a821c | siosio34/DesignPattern | /Iterator/Movie.cpp | C++ | cpp | 297 | no_license | #include "Movie.h"
Movie::Movie()
{
movieId=0;
movieTitle="";
runningTime="";
ageRequire=0;
mainActor="";
}
Movie::Movie(int id, string title, string time, int age, string actor)
{
movieId=id;
movieTitle=title;
runningTime=time;
ageRequire=age;
mainActor=actor;
}
Movie::~Movie()
{
}
|
4d54eae2530b9ba4e9716562ee5c71c72c751ec6 | e303b2cdbb6d646bfd6a2f1e2973bb632d1e840b | aiRobots-athome/Joy | /src/Gui/src/Scara/Form_Scara.cpp | C++ | cpp | 4,414 | no_license | #include "Scara/Form_Scara.h"
Form_Scara::Form_Scara(QWidget *parent) : QDialog(parent),
ui(new Ui::Form_Scara),
thread_display(nullptr)
{
ui->setupUi(this);
form_scara_arm = new Form_ScaraArm(ui);
thread_scara_arm = new QThread();
QObject::connect(ui->ScaraArm_btn_PosGo, SIGNAL(clicked()... |
bb359a144b19622fd694f59abf8c3f228b612db6 | b654d787d5fc48df109b6256ae844a0147fbe815 | ahouts/CIS22B_FinalProject | /CIS22B_FinalProject/CIS22B_FinalProject/BookDatabase.cpp | C++ | cpp | 22,814 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include "BookDatabase.h"
BookDatabase::BookDatabase()
{
//creates a book array of size 1024
//initiializes indentifiercount, size and databaseFile
books = new Book[1024];
invalidBook = new Book();
identifierCount = 1;
size = 0;
databaseFile = "database.txt";
}
void BookDatabas... |
94e8642c4c18c426270f3ca9ddb8183094ef81e2 | 400f03b829cc25af4b65d84c4242494929f8beb5 | SkyStars/LoE-PrivateServer | /tcp.cpp | C++ | cpp | 11,962 | no_license | #include "widget.h"
#include "message.h"
#include "utils.h"
void Widget::tcpConnectClient()
{
logMessage("TCP: New client connected");
QTcpSocket *newClient = tcpServer->nextPendingConnection();
tcpClientsList << newClient;
connect(newClient, SIGNAL(readyRead()), this, SLOT(tcpProcessPendingDatagrams... |
e67f2dcc10d924c211a6bf97c596c890ce3e4c51 | a7d3657e19f9d6c68f8dd140cfc2387c272611bd | liangaili/leet | /Search in Rotated Sorted Array.cpp | C++ | cpp | 1,030 | no_license | class Solution {
public:
int search(int A[], int n, int target) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int begin = 0;
int end = n;
while (begin<end-1) {
int middle = (begin+end+1)/2;
int s... |
583b31f19fe10f76d0eaf2377680465d13e05339 | edbe4ab181966e5cd877a87955de4fb3e9642e37 | facebookincubator/spectrum | /cpp/test/unit/plugins/webp/LibWebpCompressorTest.cpp | C++ | cpp | 2,703 | 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.
#include <spectrum/plugins/webp/LibWebpCompressor.h>
#include <spectrum/testutils/TestUtils.h>
#include <folly/Optional.h>
#include <gtes... |
f5039e7504672a36d240d8fb764d64c07afc6037 | 96ea3ede468447a6b44771ef3a4bdc9d3798a1cf | BlackTeaML/ModLoader | /main.cpp | C++ | cpp | 1,668 | permissive | #include <vector>
#include <fstream>
#include <jni.h>
#include <sstream>
#include <unistd.h>
#include <filesystem>
#include <dlfcn.h>
bool isMod(std::string const& path) {
std::string s;
std::stringstream ss(path);
while(std::getline(ss, s, '.'));
return s == "so";
}
JNIEXPORT jint JNI_OnLoad(JavaVM*,... |
513ab527f416515716b8c1d90ce7a802ce569f31 | 2e0105f12bde868f0d7f52c69967feb3b0f0830a | stardog-union/boost | /libs/metaparse/example/getting_started/6_2.hpp | C++ | hpp | 606 | permissive | #ifndef BOOST_METAPARSE_GETTING_STARTED_6_2_HPP
#define BOOST_METAPARSE_GETTING_STARTED_6_2_HPP
// Automatically generated header file
// Definitions before section 6.1
#include "6_1.hpp"
// Definitions of section 6.1
using minus_token = token<lit_c<'-'>>;
#include <boost/metaparse/one_of.hpp>
using e... |
06795b3064a6789e52e453d754adfdf74c18e433 | 3e6a28b4cfe68dc2a82a57c56e7769b59e05e2fa | PollyPalindrom/arcanoid2 | /arcanoid2/arcanoid1.cpp | C++ | cpp | 1,101 | no_license | #include "Arcanoid1.h"
#include "game_scene.h"
#include "title_scene.h"
#include "fail_scene.h"
#include "win_scene.h"
#include "engine.h"
#include "level1_creator.h"
#include "level2_creator.h"
#include "next_level_scene.h"
#include "level3_creator.h"
#include "level4_creator.h"
using namespace std;
void Arcanoid1::On... |
9e725ca8775f5ce8386eecabb31c0019b48481ca | b6a0b730b4de29ab89dd405ae2d683719c798f80 | iwannatto/kyopro | /others/gcj2019-qual/c.cc | C++ | cc | 1,683 | no_license | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define ABS(a) (((a) >= 0) ?... |
e40c83a0a5f09b69425ea5dc7c8665630db809c7 | 1dd8ee3f13dca94e9ac07dc949bf5fecd568e010 | Micalson/puppet | /src/Simulation/point_cloud_segment_simulation/point_source.cpp | C++ | cpp | 1,853 | no_license | #include "point_source.h"
#include <fstream>
PointSource::PointSource()
{
m_point_cloud.reset(new PointCloud());
m_normal_cloud.reset(new NormalCloud());
m_kdtree.reset(new KdTree());
}
PointSource::~PointSource()
{
}
bool PointSource::Load(const char* file_name)
{
std::ifstream stream;
stream.open(file_name, ... |
149e61f9acb7cd07f212d5c377069401b18cfb60 | 071f4b2330a2c2f22de88b3278fdcc90fae1c0bd | Matthew-Chidlow/CITS3003_Labs | /src/CHAPTER02_CODE/example1.cpp | C++ | cpp | 3,001 | no_license | // Two-Dimensional Sierpinski Gasket
// Generated using randomly selected vertices and bisection
#include "Angel.h"
const int NumPoints = 5000;
//----------------------------------------------------------------------------
void
init( void )
{
vec2 points[NumPoints];
// Specifiy the vertices of a tri... |
635de783bdccd80c8ac0abe6548d303f70f407a5 | db557423fe1df3e78e91047d00828a5c781d548a | zachdirk/growth-curve-coercer | /src/Polygon.cpp | C++ | cpp | 2,760 | no_license | #include <iostream>
#include <string>
#include <locale>
#include <vector>
#include <sstream>
#include <fstream>
#include "Polygon.h"
#include "Tools.h"
Polygon::Polygon(int ID, double SiteIndex, std::string BEC, std::string Species, int AU){
mID = ID;
mSiteIndex = SiteIndex;
mBEC = BEC;
mSpecies = Spec... |
fdcdec92c2490122c0e8a2a5481d8ee9a232fce6 | 28469dcad30b76036382b7f511f48bad499c3820 | perfect28/USACO | /3.3/game1/main.cpp | C++ | cpp | 1,097 | no_license | /*
ID:perfect13
LANG:C++
TASK:game1
*/
#include <iostream>
#include <cstdio>
#include <cstring>
#define INF 0x7FFFFFFF
#define MAXN 105
using namespace std;
int num[MAXN];
int sum[MAXN][MAXN];
int dp[MAXN][MAXN];
int main()
{
FILE *fin=fopen("game1.in","r");
FILE *fout=fopen("game1.out","w");
int n;
... |
894b0f90a56938378ac571e8de8ca8e7b4e54b0d | bed4c1c54dcadafad32402eeef43852fe0d49658 | Diegores14/CompetitiveProgramming | /Uri/graph/1855 - Maester's Map/solution.cpp | C++ | cpp | 851 | no_license | #include <bits/stdc++.h>
using namespace std;
vector<vector<bool>> used;
char answer(vector<vector<char>> & v){
int j=0, i=0, di=0, dj=0;
if(v[i][j]== '<')dj=-1;
if(v[i][j]== '>')dj=1;
if(v[i][j]== '^')di=-1;
if(v[i][j]== 'v')di=1;
while(v[i][j]!='*' && !used[i][j] && 0<=i && i<(int)v.size() && 0<=j && j<(int... |
e20c47e9f72d06359b8eb79c14df6e08dd01788a | 194a5c6f7e61a21b7a4158a1a957a41fa397c6ad | xiepengchong/chromium | /content/browser/indexed_db/indexed_db_reporting.cc | C++ | cc | 2,560 | 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 "content/browser/indexed_db/indexed_db_reporting.h"
#include <string>
#include "base/metrics/histogram_macros.h"
#include "content/browser/inde... |
6ff63bd51c269044ab61971b36549e19d96100d5 | 9b05aa166b8ef2a7a2311c288d092aebb2485a93 | hermanzdosilovic/fuzzy-evolutionary-and-neuro-computing | /include/fuzzy/implication.hpp | C++ | hpp | 3,251 | no_license | #pragma once
#include <fuzzy/domain.hpp>
#include <fuzzy/relation.hpp>
#include <cstdint>
#include <cmath>
#include <stdexcept>
namespace fuzzy
{
enum class ImplicationType : std::uint8_t
{
KLEENE_DIENS,
LUKASIEWICZ,
ZADEH,
GODEL,
MAMDANI_MIN,
MAMDANI_PRODUCT
};
namespace detail
{
template... |
9b2a1eea144dc7edc067e84c44a0e78caed0bda4 | d445c083a94e491c13c57373085fbd61d5a431ca | janisozaur/ja2_1.13 | /GameSource/ja2_v1.13/Build/Tactical/Keys.cpp | C++ | cpp | 56,705 | no_license | #ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "BuildDefines.h"
#include <stdio.h>
#include <memory.h>
#include "Types.h"
#include "Keys.h"
#include "Debug.h"
#include "Smoothing Utils.h"
#include "SkillCheck.h"
#include "Opplist.h"
#include "Items.h"
#include "Weapons.h"
#include "AI... |
3366e130d8a85e1159fcca2b5ae4484662f736b4 | 1e9c55d94e7e43a8a49397d0cb121573d21d7a8d | Ankur-2002/code-made-by-me | /cal.cpp | C++ | cpp | 1,665 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>> n;
int nums[n];
for(int i=0; i<n; i++)
cin>>nums[i];
int tar;
cin >>tar;
bool dp[n+1][tar+1];
memset(dp,0,sizeof(dp));
for(int i=0; i <= n; i++)
{
dp[i][0] = true;
}
... |
028be2dae41f3535bcd7233eb388bf0fc6ba7cf0 | 37ffb416825c2ffee8c4a0d0928c56c049b3d737 | NeoniteDev/Osmium | /Osmium/SDK/FN_FriendCodeConsole_classes.hpp | C++ | hpp | 2,420 | no_license | #pragma once
// Fortnite (4.5-CL-4159770) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// WidgetBlueprintGeneratedClass FriendC... |
f4d5dc4fdb17733769b2d6640efcd81b8d1a9699 | 80b9e4a1accbd7de15dca56e6466b3d725bc771f | DStagg/SFML-Framework-Template | /SFML Framework Template/Framework/Entities/Entity.cpp | C++ | cpp | 2,608 | no_license | #include "Entity.h"
Entity::Entity(Level* lvl)
{
SetAlive(true);
SetLevel(lvl);
};
Entity::~Entity()
{
};
// Components //
PairFloat& Entity::GetPosition()
{
return _Position;
};
PairFloat& Entity::GetVelocity()
{
return _Velocity;
};
PairFloat& Entity::GetSize()
{
return _Size;
};
//////////////////
Graphic& ... |
2a344b7b886ee882b8b45840c8f549a6799ab9b8 | 1f10865365b5b787d658887ce08e9aa3c76e3ab7 | decorus-kazuma/gptp-burningground | /GPTP/hooks/apply_upgrade_flags.cpp | C++ | cpp | 4,619 | no_license | //Source file for the Apply Upgrade Flags hook module.
//This file is directly responsible for applying movement speed / attack speed
//upgrades to units.
#include "apply_upgrade_flags.h"
#include <SCBW/scbwdata.h>
#include <SCBW/enumerations.h>
#include <SCBW/api.h>
namespace hooks {
//This hook function i... |
253984534f16529799de04c8a98d8cb681f90247 | 5b392012df1c2cb35c436bcde71d4552f06ef8ae | LeeRuns/cpprestsdk | /Release/src/http/listener/http_server_asio.cpp | C++ | cpp | 48,168 | permissive | /***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* HTTP Library: HTTP listener (server-side) APIs
* This ... |
5f36ee2fd8400e5a26f7a33a4e679e3b43e273a0 | ce7e8edc2ab562e20e1621417c4a0f80c9e683b1 | ybouret/yocto4 | /src/kr/yocto/hashing/digest.cpp | C++ | cpp | 3,569 | no_license | #include "yocto/hashing/digest.hpp"
#include "yocto/code/utils.hpp"
#include "yocto/code/round.hpp"
#include "yocto/code/bswap.hpp"
#include <cstring>
#include <iostream>
namespace yocto {
#define YOCTO_DIGEST_ROUND(N) YOCTO_ROUND(3,N)
static uint8_t *acquire_digest( size_t n )
{
assert(n>0);
return static_... |
c60f6f682fa47ab2c7ab5d0d3c28af04ad760da4 | ad3756883d573c70cfa7de611175934437ff5654 | hamin7/ITE_1010_CPP_Programming | /18_12_03/18_12_03(1).cpp | C++ | cpp | 621 | no_license | #include <iostream>
#include <vector>
#include <string>
using namespace std;
void main() {
vector<string> names;
names.push_back("Kim");
names.push_back("Park");
names.push_back("Lee");
names.push_back("Gang");
for (unsigned int i = 0; i < names.size(); i++)
cout << i << names.at(i) << endl;
names[2] = "W... |
4693672e25f1b89ea9c9a75ab9e460b63ae43f7f | 4385efeab9ee8ea0240b5462a872d73dedd41ffe | ivaaahn/bmstu-oop | /lab_01/includes/model.hpp | C++ | hpp | 636 | no_license | #ifndef _MODEL_HPP_
#define _MODEL_HPP_
#include "points.hpp"
#include "lines.hpp"
#include "errors.hpp"
#include "drawer.hpp"
typedef const char *filename_t;
struct model_t
{
points_t points;
lines_t lines;
};
model_t create_model();
err_t load_model(model_t &model, filename_t fname);
void destruct_mode... |
1d5642061c20eb31b4e739bc3fd7b66f5e9426c6 | 375cb51d3e31fe52f651b5a4bd43614a80ed873b | DOCGroup/ACE_TAO | /ACE/performance-tests/TCP/tcp_test.cpp | C++ | cpp | 17,597 | no_license |
//=============================================================================
/**
* @file tcp_test.cpp
*
* Measures TCP round-trip performance.
*
* @author Based on udp_test by Fred Kuhns and David L. LevineModified by Carlos O'Ryan and Nanbor Wang.
*/
//====================================================... |
67175be5b4b74af780f78482c4dd49df72c3306d | 354b13780394e1552e924b5468653e88bc2a5742 | LaundryShop/-MudBear | /CDX9SkinMesh.cpp | C++ | cpp | 42,688 | no_license | /***************************************************************************************************
* SkinMeshCode Version 2.00
* LastUpdate : 2019/10/09.
* パーサークラスとスキンメッシュクラスを別ファイルに分割.
**/
#include "CDX9SkinMesh.h"
#include <crtdbg.h>
//シェーダ名(ディレクトリも含む)
const char SHADER_NAME[] = "SkinMesh.hlsl";
/*****... |
8400363bb8337d17d2ea24db23b23be8f4a545f1 | 175fed4a2ffa3f504047deda0f235612faaea9f5 | shengwudiyi/leetcode | /algorithms/cpp/70.ClimbingStairs.cpp | C++ | cpp | 394 | no_license | // Source : https://leetcode-cn.com/problems/climbing-stairs/
// Author : Lianfeng Shen
// Date : 2019-05-06
class Solution {
public:
int climbStairs(int n) {
if (n <= 2) {
return n;
} else {
int f = 1, s = 2;
while(n-- > 2) {
s = f + s;
... |
981457f14033429c11849e55b66a219674384be8 | 3839d3002aadc892cab42d39496902eb3b765eb6 | Fabcien/bitcoin-abc | /src/test/util_tests.cpp | C++ | cpp | 93,337 | permissive | // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/system.h>
#include <clientversion.h>
#include <optional.h>
#include <sync.h>
#include <test/util/str.h>
#incl... |
1ec36724e308d8d800f4bfe3e22fe09a8f57ecbb | 0f9a9a079ca0dd2d874e9b15d10f5bc5429185f1 | X39/X39_OpenGL_Application | /src/DCButton.cpp | C++ | cpp | 2,676 | no_license | #include "globals.h"
#include "DCButton.h"
namespace X39
{
namespace GUI
{
DCButton::DCButton(double x, double y, double w, double h, void(*callback)(void), std::string& displayedText, ::X39::Singletons::MATERIAL& mat, unsigned int textureIndex) : DisplayBase(x, y, w, h), material(mat)
{
this->callbackFuncti... |
85ebac4912a6e7b6b531b4c7593827a4a41da3e8 | 08fa2161ccc09a7414e06d0a851d2533037e5a1e | Djent-/GBALua | /Tools/PCX2Agb/FileWrite.cpp | C++ | cpp | 17,512 | permissive | #include "FileWrite.h"
#include "Params.h"
void WriteOutFiles(std::string fileName,
std::list<unsigned char*> tileList,
unsigned short *tileMap,
std::list<_RGBColor*> palette,
_PCXHeader *pcxHeader){
if(!globals.m_silet){
printf("Writ... |
935099ddf604187ce1abef0e25602136e5daabd8 | 26d978c97b9ad95147319bc404dbe6ac36b35843 | laoreja/LicensePlate | /PlateDetectByColor/ColorLocate.cpp | C++ | cpp | 8,148 | no_license | //
// Created by 顾秀烨 on 11/26/15.
//
#include "PlateDetect.h"
#include "ColorLocate.h"
//blue的H范围
int min_blue = 90; //100
int max_blue = 150; //140
//yellow的H范围
int min_yellow = 15; //15
int max_yellow = 40; //40
//morphology
//closing operation
int color_morph_width = 15;
int color_morph_height = 3;
extern bool... |
16bcfb57830cc146f2948cae2cf71d70aa696749 | 799ae85dad30b1b325046040d7827e603b05ac98 | ramoro/Dune | /src/Socket.cpp | C++ | cpp | 5,451 | no_license | #include "Socket.h"
#include "socket_error.h"
#include <vector>
#include <string>
//PRIVATE
Socket::Socket() {}
Socket::Socket(int file_desc){
this->fd=file_desc;
}
int Socket::socket_connect(){
return connect(this->fd, this->ptr->ai_addr, \
this->ptr->ai_addrlen);
}
void Socket::fill_addrinfo(struct addrinfo *... |
caf6fc3edbba98fc144c305484ad29a6ca2ecedb | 931be5cbf171f36929f4b583e710aeac441aef15 | sc2ad/BeatSaber-Quest-Codegen | /include/OVR/OpenVR/IVRRenderModels__FreeRenderModel.hpp | C++ | hpp | 5,422 | permissive | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: OVR.OpenVR.IVRRenderModels
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.