text string | size int64 | token_count int64 |
|---|---|---|
//'''This code is from after reading tutorial'''
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
bool can(int m,int s){
return s >=0 && s <= 9*m;
}
int main(){
int a,b,c,d,i,m,s;
cin >> m >> s;
string minn;
a = s;
for(i=0 ; i < m; i++){
for(d=0; d < 10; d++){
... | 723 | 392 |
// Copyright (c) 2021 Van Hecke Seppe
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, ... | 33,990 | 11,838 |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int closestValue(TreeNode* root, double target) {
double diff = target - root->val;
... | 750 | 231 |
#include <iostream>
#include "day23.h"
int main() {
day23(std::cin, std::cout);
return 0;
} | 97 | 45 |
/* pvAlarm.cpp */
/*
* Copyright information and license terms for this software can be
* found in the file LICENSE that is included with the distribution
*/
/**
* @author mrk
*/
#include <string>
#include <stdexcept>
#define epicsExportSharedSymbols
#include <pv/pvType.h>
#include <pv/pvIntrospect.h>
#include <... | 2,416 | 874 |
/*
** EPITECH PROJECT, 2018
** bomberman
** File description:
** LoadState.cpp
*/
#ifdef __linux__
#include <glob.h>
#elif _WIN32
#include <windows.h>
#endif
#include "../../include/States/LoadState.hpp"
#include "../../include/Singletons/StateMachine.hpp"
#include "../../include/Singletons/IrrManager.hpp"
#include ".... | 6,245 | 2,708 |
#include <bits/stdc++.h>
#define watch(x) std::cout << (#x) << " is " << (x) << std::endl
#define print(x) std::cout << (x) << std::endl
using LL = long long;
int main() {
//freopen("in", "r", stdin);
std::cin.tie(nullptr)->sync_with_stdio(false);
int cas;
std::cin >> cas;
while (cas--) {
int n;
std::cin >> ... | 1,049 | 557 |
/*
Copyright (C) 2003-2013 by David White <davewx7@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.... | 6,963 | 3,012 |
// C&C NLP tools
// Copyright (c) Universities of Edinburgh, Oxford and Sydney
// Copyright (c) James R. Curran
//
// This software is covered by a non-commercial use licence.
// See LICENCE.txt for the full text of the licence.
//
// If LICENCE.txt is not included in this distribution
// please email candc@it.usyd.edu... | 3,930 | 1,379 |
#include "BillboardedSpriteExample.h"
#include "BatchedSpriteRenderable.h"
#include "BatchedSpriteShader.h"
#include "BatchedSpriteMaterial.h"
#include "RenderingModule.h"
#include "ShaderIdGenerator.h"
#include "MaterialIdGenerator.h"
#include "VertexLayoutPool.h"
#include "VertexBindingPool.h"
#include "RenderableF... | 9,051 | 2,526 |
#include <jni.h>
#include <string>
#include <iostream>
#include <cmath>
#include "mpParser.h"
#include "mpDefines.h"
using namespace std;
using namespace mup;
Value Calc(string input) {
ParserX parser(pckALL_NON_COMPLEX);
Value ans;
parser.DefineVar(_T("ans"), Variable(&ans));
try
{
pars... | 3,471 | 1,197 |
#include "Main.h"
#include "Log.h"
#include <glad/glad.h>
#include "imgui.h"
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include "Layers.h"
#include "Box2DLayer.h"
#include "FirstTriangleLayer.h"
#include "Core\Input.h"
int main()
{
float lastTimeFrame = 0;
Zinc::Log::Init();
ZINC_CORE_WARN("Init... | 3,282 | 1,249 |
#ifndef __RGSMANAGER_H__
#define __RGSMANAGER_H__
#include <cmath>
#include <map>
#include <algorithm>
#include "rsamplegraph.hpp"
#include "simrankvalue.hpp"
#include "../util/mytime.h"
using namespace std;
class RGSManager {
public:
RGSManager(int sn, int mvid, bool isfm) :
sampl... | 5,427 | 1,631 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "pch.h"
#include "Rest/Schema/1_0/Interface.h"
#include "Rest/Schema/IRestClient.h"
#include "Rest/HttpClientHelper.h"
#include "Rest/Schema/JsonHelper.h"
#include "winget/ManifestValidation.h"
#include "Rest/Schema/RestHelper.h... | 10,541 | 2,820 |
/*
Copyright (c) 2017-2020,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See
the top-level NOTICE for additional details. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include "helics/application_api/Publications.hpp"
#incl... | 13,509 | 4,945 |
/* Copyright © 2017 Apple Inc. All rights reserved.
*
* Use of this source code is governed by a BSD-3-clause license that can
* be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
*/
#include <unity/toolkits/ml_data_2/row_slicing_utilities.hpp>
#include <logger/assertions.hpp>
#incl... | 6,523 | 2,294 |
#pragma once
// sqrt.hpp: sqrt functions for decimals
//
// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.
#include <universal/native/ieee754.hpp>
#include <universal/number/decimal/numeric_limits.hpp>... | 1,616 | 632 |
#include "library1.hpp"
#include "library2/library2.hpp"
#include <cstdio>
void hello_world() {
printf("Hello World");
new_line();
}
| 142 | 52 |
/*
Generated with CMSIS-DSP SDF Scripts.
The generated code is not covered by CMSIS-DSP license.
The support classes and code is covered by CMSIS-DSP license.
*/
#include "arm_math.h"
#include "custom.h"
#include "GenericNodes.h"
#include "AppNodes.h"
#include "scheduler.h"
/***********
FIFO buffers
***********... | 2,436 | 997 |
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <grpc/grpc.h>
#include <grpcpp/channel.h>
#include <grpcpp/create_channel.h>
#include <grpcpp/security/credentials.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
#include "farm_ng/core/blobstore.h"
#include "farm_ng/core/event_log... | 6,835 | 2,225 |
//
// Created by hhy on 2022/2/8.
//
#include <iostream>
#include <unordered_map>
#include <vector>
#include <list>
using namespace std;
int main() {
list<int> list1 = {1, 2, 3, 4, 5};
list<int> list2 = {11, 12, 13, 14, 15};
list<int>::iterator iter = list1.begin();
iter++;
//把list2全部剪贴到list1的iter位置
list... | 1,534 | 714 |
//Mid Point Circle Drawing Algorithm
#include<iostream>
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
void symPlot(int xc, int yc, int x, int y)
{
putpixel(x+xc,y+yc,RED);
putpixel(x+xc,-y+yc,YELLOW);
putpixel(-x+xc,-y+yc,GREEN);
putpixel(-x+xc,y+yc,... | 899 | 477 |
#include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int N;
cin >> N;
if (N < 1200) {
cout << "ABC" << endl;
} else {
cout << "ARC" << endl;
}
return 0;
} | 194 | 89 |
#include<iostream>
using namespace std;
int merge(int *a, int s, int e){
int mid= (s+e)/2;
int i=s;
int j=mid+1;
int k=s;
int temp[1000];
int cnt=0;
while(i<=mid and j<=e){
if(a[i]<=a[j]){
temp[k++]=a[i++];
}
else{
temp[k++]=a[i++];
cnt+= mid-i+1;
}
}
while(i<=mid){
temp... | 763 | 426 |
// 11231 Black and white painting finding patterns harder
// focus on the lower left tile
#include <iostream>
using namespace std;
int main() {
int n, m, c;
while (cin >> n >> m >> c and n + m + c) {
cout << ((n - 7) * (m - 7) / 2 + ((((n - 7) * (m - 7)) % 2) & c)) << '\n';
}
} | 298 | 119 |
#include "StdAfx.h"
#include "GumpEditor.h"
#include ".\gumppaperdoll.h"
CGumpPaperdoll::CGumpPaperdoll(CGumpPtr pGump) : CGumpPicture(NULL)
{
SetGump(pGump);
SetTitle("paperdoll");
SetType("paperdoll");
CString strName;
strName.Format("paperdoll_%x", pGump ? pGump->GetGumpID() : 0);
SetName(strName);
//Ad... | 723 | 333 |
#include <marnav/units/detail/basic_unit_cmp.hpp>
| 50 | 22 |
#include<iostream>
#include<fstream>
#include<cstring>
using namespace std;
class topluluklar {
protected:
struct uyeler {
string* ad, * soyad, * yas, * bolumu;
}uyeBilgisi[100];
int uyeSayisi;
char kullaniciAdi[20];
enum doluluk {
dolu, bos
}uye[100];
public:
topluluklar()
{
for (int i = 0; i < 100; i+... | 6,339 | 3,418 |
#include <thread>
#include <dirent.h>
#include <algorithm>
#include <Elementary.h>
#include <rive_tizen.hpp>
#include "shapes/paint/fill.hpp"
#include "shapes/paint/stroke.hpp"
#include "shapes/paint/color.hpp"
#include "shapes/paint/solid_color.hpp"
#include "animation/linear_animation_instance.hpp"
#include "artboar... | 11,524 | 4,589 |
/* The file is part of Snowman decompiler. */
/* See doc/licenses.asciidoc for the licensing information. */
//
// SmartDec decompiler - SmartDec is a native code to C/C++ decompiler
// Copyright (C) 2015 Alexander Chernov, Katerina Troshina, Yegor Derevenets,
// Alexander Fokin, Sergey Levin, Leonid Tsvetkov
//
// Th... | 2,680 | 763 |
/*
* STRUMPACK -- STRUctured Matrices PACKage, Copyright (c) 2014, The
* Regents of the University of California, through Lawrence Berkeley
* National Laboratory (subject to receipt of any required approvals
* from the U.S. Dept. of Energy). All rights reserved.
*
* If you have questions about your rights to use... | 19,406 | 6,919 |
#include "StdAfx.h"
#include "takdecoder.h"
CTAKDecoder::CTAKDecoder(void)
{
}
CTAKDecoder::~CTAKDecoder(void)
{
}
bool CTAKDecoder::Open(LPTSTR szSource)
{
char tempname[MAX_PATH];
WideCharToMultiByte(CP_UTF8, 0, szSource, -1, tempname, MAX_PATH, 0, 0);
Options.Cpu = tak_Cpu_Any;
Option... | 2,846 | 1,214 |
#include "taichi/ir/ir.h"
#include <numeric>
#include <thread>
#include <unordered_map>
// #include "taichi/ir/analysis.h"
#include "taichi/ir/statements.h"
#include "taichi/ir/transforms.h"
namespace taichi {
namespace lang {
std::string snode_access_flag_name(SNodeAccessFlag type) {
if (type == SNodeAccessFlag:... | 13,552 | 4,930 |
// Rock, Scissors, Paper engine
#include "engine.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <cstring>
#include <limits>
#include <memory>
namespace Engine
{
using std::array;
using std::string;
using std::to_string;
using std::unique_ptr;
using std::vector;
class Choice
{
public:
virtual... | 3,835 | 1,253 |
/************************************************************************
Main QSlim file.
Copyright (C) 1998 Michael Garland. See "COPYING.txt" for details.
$Id: main.cxx,v 1.1.1.1 2006/09/20 01:42:05 marc Exp $
************************************************************************/
#include <stdmix.h... | 5,407 | 2,163 |
#pragma once
#ifndef IDOCK_MATRIX_HPP
#define IDOCK_MATRIX_HPP
#include "atom.hpp"
/// Returns the flattened 1D index of a 2D index (i, j) where j is the lowest dimension.
inline size_t triangular_matrix_restrictive_index(const size_t i, const size_t j)
{
BOOST_ASSERT(i <= j);
return i + j * (j + 1) / 2;
... | 1,012 | 414 |
// Copyright 2017-2018 Johan Paulsson
// This file is part of the Water C++ Library. It is licensed under the MIT License.
// See the license.txt file in this distribution or https://watercpp.com/license.txt
//\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_
#ifndef WATER_CMATH_HPP
#d... | 7,134 | 2,368 |
#include "\z\havoc\addons\common\script_component.hpp" | 54 | 20 |
#include <gzc/games/sokoban/core/Platform.hpp>
#include <sstream>
#include <iostream>
using namespace sokoban::core;
/**
* Default constructor for the platforms
* @param x The X coordinates on the board
* @param y The Y coordinates on the board
*/
Platform::Platform( float x, float y )
: Actor( x, y )
{
... | 1,435 | 419 |
/* author : @akash kumar */
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb push_back
#define ld long double
int solve(vector<int> array)
{
int maxLen = 0;
for(int i = 0; i < array.size() - 1;) {
int j = i;
int common_difference = ar... | 915 | 386 |
/*
* Copyright 2018 The Polycube 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 agree... | 12,028 | 4,122 |
#include <iostream>
using namespace std;
void SetNumber( int& number )
{
number = 5;
}
int main()
{
int myNumber1, myNumber2, myNumber3;
SetNumber( myNumber1 );
myNumber2 = 20;
myNumber3 = 10;
cout << "Variable value 1: " << myNumber1 << endl;
cout << "Variable address 1: " << &myNumber... | 596 | 214 |
#include "mbedcrypto/pk.hpp"
#include "mbedcrypto/hash.hpp"
#include "./pk_private.hpp"
//-----------------------------------------------------------------------------
namespace mbedcrypto {
namespace pk {
//-----------------------------------------------------------------------------
static_assert(std::is_copy_constr... | 12,114 | 4,504 |
/*
* TravelTime.cpp
*
* Created on: 11 Mar 2016
* Author: gishara
*/
#include "TravelTime.hpp"
#include "util/Utils.hpp"
using namespace sim_mob::long_term;
TravelTime::TravelTime(BigSerial origin, BigSerial destination, double carTravelTime,double publicTravelTime,double numTransfers): origin(origin), des... | 1,455 | 449 |
#include "stdafx.h"
#include "TitleFormat.h"
TitleFormat::TitleFormat(const std::wstring& pattern)
{
const string8 upattern = from_wide(pattern);
titleformat_compiler::get()->compile_safe(m_obj, upattern);
}
STDMETHODIMP TitleFormat::get__ptr(void** out)
{
if (!out) return E_POINTER;
*out = m_obj.get_ptr();
ret... | 1,887 | 798 |
#include <bits/stdc++.h>
using namespace std;
long long n, p, k, now, temp;
int main()
{
scanf("%lld%lld%lld", &n, &p, &k);
/*
now = 0;
for (int i = 0; i < k; i++)
{
temp = ((p + n - now) % n + p) % n;
now = p;
p = temp;
}
printf("%d", now);
*/
printf("%d",p*k... | 340 | 153 |
#ifndef SIMPLE_PUBSUB_CPP__SIMPLE_SUBSCRIPTION_HPP_
#define SIMPLE_PUBSUB_CPP__SIMPLE_SUBSCRIPTION_HPP_
#include "rclcpp/rclcpp.hpp"
#include "sample_msgs/msg/simple_msg.hpp"
class SimpleSubscription : public rclcpp::Node
{
public:
explicit SimpleSubscription(const rclcpp::NodeOptions & options);
~SimpleSubscript... | 563 | 220 |
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <queue>
#include <stack>
using namespace std;
// class Solution {
// public:
// // DP dynamic programming
// int rob(vector<int>& nums) {
// int s = nums.size();
// if(s == 0) re... | 1,130 | 468 |
#include "GPC2PCC.h"
int main(int argc, char * argv[])
{
SetConsoleTitleA("GPC2PCC");
std::cout << " GAME PAD CONTROLS TO PERSONAL COMPUTER CONTROLS\n";
std::cout << " 2P \n";
std::cout << "PCC \n";
std::cout << "---------... | 439 | 162 |
// Computes the area of a circle with the radius given and
// the volume of a sphere with the radius given.
#include <iostream>
#include <cmath>
using namespace std;
const double PI = 3.14159;
double area(double radius);
// area - Computes the area of a circle with the radius given.
// @param double - The... | 1,379 | 451 |
/* E L L _ B R E P . C P P
* BRL-CAD
*
* Copyright (c) 2008-2021 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1... | 3,697 | 1,623 |
/*
* Copyright (c) 2019 Samsung Electronics Co., Ltd. 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... | 2,791 | 1,172 |
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<vector>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#define ll long long
#define F(i,a,b) for(int i=(a);i<=(b);i++)
#define mst(a,b) memset((a),(b),sizeof(a))
#define PII pair<int,int>
#define rep(i,x,y) for(auto i=(x);i<... | 1,161 | 551 |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008-2010, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... | 3,116 | 942 |
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
==============================================================... | 142,444 | 50,557 |
/**
* Created by Xiaozhong on 2020/10/6.
* Copyright (c) 2020/10/6 Xiaozhong. All rights reserved.
*/
#include <vector>
#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
class Solution {
public:
vector<string> findRelativeRanks(vector<int> &nums) {
vector<string> ans(nums.si... | 1,477 | 490 |
#include "stack.hpp"
#include "string.hpp"
int main() {
for (int n; n = in, n != 0;) {
Vector<String> w(n, in);
for (int i = 0;; ++i) {
Stack<int> s({7, 7, 5, 7, 5});
for (int j = i; j < n && !s.empty(); ++j) {
int k = s.top() - w[j].size();
if (k == 0) {
continue;
... | 492 | 208 |
#pragma once
#include "Common.hpp"
#include "String.hpp"
namespace ge
{
//----------------------------------------------------------------------------//
// Defs
//----------------------------------------------------------------------------//
#ifdef _FAST_HALF_FLOAT
# define FAST_HALF_FLOAT
#endif
... | 40,099 | 20,689 |
#include "GuacInstructionParser.h"
#include "CollabVM.h"
#include <vector>
#include <functional>
#include <string>
namespace GuacInstructionParser
{
typedef void (CollabVMServer::*InstructionHandler)(const std::shared_ptr<CollabVMUser>&, std::vector<char*>&);
struct Instruction
{
std::string opcode;
Instructi... | 3,249 | 1,251 |
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
#include "tree/ParseTree.h"
#include "tree/pattern/ParseTreePatternMatcher.h"
#include "tree/pattern/ParseTreeMatch.h"
#i... | 1,797 | 582 |
/**
* \file
* \author Thomas Fischer
* \date 2011-12-13
* \brief Implementation of the GMSH2OGS converter.
*
* \copyright
* Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* ... | 3,310 | 1,176 |
#include "DepthPredictor.h"
#include<iostream>
#include<opencv2\core.hpp>
#include<opencv2\highgui.hpp>
#include<opencv2\imgproc.hpp>
using namespace cv;
DepthPredictor::DepthPredictor(ORB_SLAM2::Map* pMap, KeyFrameQueue* frame_queue,
DenseMap* dense_map, std::string setting_file):mpOrbSlamMap(pMap),
m_success(... | 6,672 | 2,209 |
#include "data_symbols.h"
#include <cstring>
void data_symbols::add(string symbol_name, const char* data)
{
check_duplicates(symbol_name);
check_cached_zeros();
strm_ << data;
strm_ << 0_b;
symbols_.emplace_back(std::move(symbol_name), current_offset_);
current_offset_ = incr_check_overflow(cur... | 1,950 | 676 |
//===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... | 3,322 | 988 |
/*
* Copyright 2019 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 ... | 7,413 | 2,265 |
//
// Created by dji on 4/15/20.
//
#include "mmap_file_buffer.hpp"
#include "dji_log.hpp"
#include <string.h>
namespace DJI {
namespace OSDK {
MmapFileBuffer::MmapFileBuffer() : fdAddr(NULL), curFilePos(0) {}
MmapFileBuffer::~MmapFileBuffer() {}
bool MmapFileBuffer::init(std::string path, uint64_t fileSize) {
cu... | 1,337 | 595 |
#include <qpdf/QPDF_String.hh>
#include <qpdf/QUtil.hh>
#include <qpdf/QTC.hh>
// DO NOT USE ctype -- it is locale dependent for some things, and
// it's not worth the risk of including it in case it may accidentally
// be used.
#include <string.h>
// See above about ctype.
static bool is_ascii_printable(unsigned ch... | 4,599 | 1,807 |
class Solution {
public:
bool pdf(string s1, string s2) {
set<long long> b;
for(int i = 0; i < (int)s1.size(); ++i) b.insert((s1[i] << 20) + i);
for(auto &i : s2) {
// cout << i << ' ' << b.size() << endl;
auto t = b.lower_bound(i << 20);
if(t == b.end()) ... | 500 | 193 |
#include "recording.hpp"
#include "file_utils.hpp"
#include <math.h>
bool Recording::getIsRecording() { return isRecording; }
void Recording::start(const int32_t bufferWidth, const int32_t bufferHeight,
const std::string& fileName, const int32_t videoType,
const int32_t web... | 8,880 | 2,728 |
#define FK_DEF_SIZETYPE
#include <FK/RectTexture.h>
#include <FK/Error.H>
#include <FK/Window.h>
using namespace std;
using namespace FK;
vector<GLuint> fk_RectTexture::_s_faceIndex = {0, 1, 3, 1, 2, 3};
GLuint fk_RectTexture::_s_faceIBO = 0;
bool fk_RectTexture::_s_faceIndexFlg = false;
fk_RectTexture::Member::Mem... | 7,749 | 3,965 |
#include <NMEAGPS.h>
#include <GPSport.h>
#include <Streamers.h>
static NMEAGPS gps;
static gps_fix fix;
void setup(){
Serial.begin(115200);
Serial3.begin(9600);
}
void loop(){
while (gps.available(Serial3)) {
fix = gps.read();
Serial.print(fix.satellites);
Serial.print("--");
Serial.print(fi... | 433 | 179 |
//////////////////////////////////////////////////////////////
// ____ //
// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
// |... | 14,922 | 5,579 |
// -*- C++ -*-
//
// ----------------------------------------------------------------------
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University of Chicago
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://... | 7,980 | 3,034 |
#include <iostream>
#include <string.h>
using namespace std;
int main() {
// your code goes here
string text;
string result="";
cin>>text;
int textLength=text.length();
for(int i=0;i<textLength;++i){
char temp=text[i];
if(temp<97) temp+=32;
if(temp=='a'|| temp=='e'|| temp=='i'|| t... | 463 | 186 |
/*=========================================================================
Program: ALBA (Agile Library for Biomedical Applications)
Module: albaASCIIImporterUtilityTest
Authors: Alberto Losi
Copyright (c) BIC
All rights reserved. See Copyright.txt or
This software is distributed WITHOUT ANY WARRANTY; witho... | 6,611 | 2,271 |
#include <iostream>
unsigned long left(unsigned long num, unsigned int cf);
char * left(const char* str, int n = 1);
int main()
{
using namespace std;
const char * trip = "Hawaii!!";
unsigned long n = 12345678;
int i;
char * temp;
for(i=1; i < 10; i++)
{
cout << left(n, i) << en... | 1,006 | 401 |
/*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : Marc Pierrot Deseilligny
Contributors : Gregoire Maillet, ... | 17,125 | 5,670 |
/*
*
*/
#ifndef _HTML5XX_S_HXX_
#define _HTML5XX_S_HXX_
#include "Element.hxx"
#include "LineElement.hxx"
using namespace std;
namespace html
{
class S: public Element
{
public:
S():
Element(Inline, "s")
{}
S( const string& text ):
Element(Inline, "s")
{
put(new LineElement(text));
}
};
... | 408 | 179 |
#include <iostream>
#include <fstream>
#include <iomanip>
#include <math.h>
#include <vector>
#include <random>
#include <thread>
#include <boost/multi_array.hpp>
#include <boost/python.hpp>
#include <boost/python/numpy.hpp>
using namespace std;
namespace p = boost::python;
namespace np = boost::python::numpy;
#i... | 9,870 | 4,456 |
/******************************************************************************
* Copyright (C) 2006-2019 by the resistivity.net development team *
* Carsten Rücker carsten@resistivity.net *
* *
... | 13,726 | 4,929 |
/*=========================================================================
Program: ParaView
Module: vtkSMCinemaVolumetricImageExtractWriterProxy.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is di... | 18,611 | 6,073 |
/*
* Based on public domain code available at: http://cr.yp.to/snuffle.html
*
* Modifications and C-native SSE macro based SSE implementation by
* Adam Ierymenko <adam.ierymenko@zerotier.com>.
*
* Since the original was public domain, this is too.
*/
#include "Constants.hpp"
#include "Salsa20.hpp"
#define ROTA... | 55,374 | 36,818 |
#include "header.hpp"
using namespace std;
void sudSort(int arr[9]){
for(int i = 0; i < 9; i++){
for(int j = 0; j < 9 - i; ++j){
if(arr[j] > arr[j+1]){
int temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
... | 326 | 128 |
//======================================================================================
//Source code for dynamic object
//
//(c) Patrick Dickinson, University of Lincoln, School of Computer Science, 2020
//======================================================================================
#include "dynamic.h"... | 2,814 | 807 |
// Copyright (c) 2012 The Chromium OS 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 <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include "installer/chromeos_install_config.h"
#include "installer/c... | 2,703 | 940 |
/*!
@file
Defines `boost::hana::adjust_if`.
@copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_ADJUST_IF_HPP
#define BOOST_HANA_ADJUST_IF_HPP
#include <boost/han... | 2,593 | 921 |
#pragma once
#include <vector>
using std::vector;
class Solution {
public:
vector<vector<int>> generate(int nR) {
unsigned long numRows{static_cast<unsigned long>(nR)};
vector<vector<int>> final;
if (numRows >= 1) {
final.push_back(vector<int>{1});
}
for (unsigned long i = 1; i < numRows; ++i) {
... | 518 | 236 |
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <vector>
#include <map>
#include <ctime>
#include <algorithm>
#define private public
#include "Splitting.hh"
#undef private
using namespace std;
void
_assert_same(Splitting& s1,
Splitting& s2)
{
BOOST_CHECK_EQUAL(s1.m_num_classes, s2.m_num... | 3,980 | 1,748 |
#include "Dialog/DialogNodes/DialogNode.h"
#include "Dialog/DialogProcessor.h"
#include "Dialog/DialogNodes/DialogPhraseNode.h"
void UDialogNode::Invoke(UDialogProcessor* processor)
{
check(processor);
for (auto child : Childs)
{
if (child->Check(processor))
{
processor->SetCurrentNode(child);
return;
... | 699 | 251 |
///////////////////////////////////////////////////////////////////////////////
// Name: notebook.cpp
// Purpose: implementation of wxNotebook
// Author: David Webster
// Modified by:
// Created: 10/12/99
// RCS-ID: $Id: notebook.cpp,v 1.23.2.1 2006/01/03 17:02:46 SN Exp $
// Copyright: (c) D... | 25,336 | 7,405 |
/**
* DeepDetect
* Copyright (c) 2021 Jolibrain SASU
* Author: Louis Jean <louis.jean@jolibrain.com>
*
* This file is part of deepdetect.
*
* deepdetect is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foun... | 9,485 | 2,985 |
#include "iMath.h"
#include <cmath>
float32 isin(float32 x)
{
return std::sinf(x);
}
float32 icos(float32 x)
{
return std::cosf(x);
}
float32 itan(float32 x)
{
return std::tanf(x);
} | 198 | 98 |
// Moving/rotating entity
// This example picks up where example 2 left of. I took all of the code that created the entity and its graphics and
// put it into a function called getMinitaurEntity(). We will now take this entity and make it move in response
// to the keyboard keys being pressed. We will also make the en... | 4,057 | 1,159 |
// tests/cpp/Error_macro_arglist2.hpp
// too many parameters for a macro is an error
// (C)2009 Kenneth Boyd, license: MIT.txt
#define UNWELCOME(A,B) 1
#if UNWELCOME(x,y,z)
#else
#endif
| 199 | 94 |
#include "QSR/includes/config.hpp"
Configurator::Configurator()
{
this->buildtype = EXE;
this->CPPLang = CPP17;
this->ProgrameName = "QSR";
this->Termwidth=75;
this->debug=1;
}
//#endif | 205 | 84 |
#include "FNTPage.h"
BF::FNTPage::FNTPage()
{
PageID = -1;
PageFileName[0] = 0;
CharacteListSize = 0;
CharacteList = 0;
}
BF::FNTPage::~FNTPage()
{
delete[] CharacteList;
}
| 180 | 98 |
#include "cef_widget.h"
CefWidget::CefWidget(Cef *cef, QWidget *parent) : QWidget(parent), cef_(cef) {}
CefWidget::~CefWidget() {
if (browser_) {
browser_->GetHost()->CloseBrowser(true);
}
}
void CefWidget::LoadUrl(const QString &url) {
if (browser_) {
browser_->GetMainFrame()->LoadURL(CefString(url.to... | 489 | 188 |
auto SMP::serialize(serializer& s) -> void {
SPC700::serialize(s);
Thread::serialize(s);
s.integer(io.clockCounter);
s.integer(io.dspCounter);
s.integer(io.apu0);
s.integer(io.apu1);
s.integer(io.apu2);
s.integer(io.apu3);
s.integer(io.timersDisable);
s.integer(io.ramWritable);
s.integer(io.ram... | 1,210 | 533 |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/animation/SVGLengthInterpolationType.h"
#include "core/animation/InterpolationEnvironment.h"
#include "core/animation/StringKeyframe.h"
#i... | 6,411 | 1,950 |
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 4,786 | 2,104 |