text string | size int64 | token_count int64 |
|---|---|---|
// -*- C++ -*-
//=============================================================================
/**
* @file Storable_Factory.cpp
*
* $Id: Storable_Factory.cpp 96760 2013-02-05 21:11:03Z stanleyk $
*
* @author Byron Harris <harrisb@ociweb.com>
*/
//=================================================================... | 543 | 207 |
#include <iostream>
#include <vector>
#include <fstream>
using namespace std;
vector<vector<pair<int, int>>> ss;
vector<long long> a;
vector<long long> b;
vector<long long> c;
void discrete_finger_simulation(int i, int from) {
for (pair<int, int> p : ss[i]) {
if (p.first == from)
continue;
... | 1,042 | 426 |
#include <jni.h>
#include <string.h>
#include <stdio.h>
typedef int (*strlen_fun)(const char *);
strlen_fun global_strlen1 = (strlen_fun)strlen;
strlen_fun global_strlen2 = (strlen_fun)strlen;
#define SHOW(x) printf("%s is %d", #x, x)
jint Java_com_example_allhookinone_HookUtils_elfhook(JNIEnv* env,jobject... | 819 | 359 |
/*
Copyright (c) 2005, Brad Kratochvil, Toby Collett, Brian Gerkey, Andrew Howard, ...
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyrigh... | 6,944 | 2,614 |
/***
*dbgnew.cpp - defines C++ scalar delete routine, debug version
*
* Copyright (c) 1995-2001, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines C++ scalar delete() routine.
*
*Revision History:
* 12-28-95 JWM Split from dbgnew.cpp for granularity.
* 05-22-98 JWM... | 1,943 | 682 |
// This file is part of Asteria.
// Copyleft 2018, LH_Mouse. All wrongs reserved.
#ifndef ASTERIA_REFERENCE_HPP_
#define ASTERIA_REFERENCE_HPP_
#include "fwd.hpp"
#include "reference_root.hpp"
#include "reference_modifier.hpp"
namespace Asteria {
class Reference
{
private:
Reference_root m_root;
Vector<... | 1,771 | 573 |
// searches an element in an array which is sorted and then rotated
#include <iostream>
using namespace std;
int binary_search(int* arr, int l, int r, int key)
{
int m;
while(l != r)
{
m = (l + r) / 2;
if(arr[m] == key)
return m;
else if(arr[m] > key)
r = m - 1;
else
l = m + 1... | 1,160 | 518 |
#include <mm/vmm.hpp>
#include <mm/pmm.hpp>
#include <mm/slab.hpp>
#include <int/idt.hpp>
#include <int/gdt.hpp>
#include <int/apic.hpp>
#include <fs/dev.hpp>
#include <fs/vfs.hpp>
#include <fs/fd.hpp>
#include <drivers/hpet.hpp>
#include <drivers/tty.hpp>
#include <drivers/pci.hpp>
#include <sched/smp.hpp>
#includ... | 2,516 | 1,183 |
const char * Function()
{
// .obj file will contain filename, surrounded by these tokens
return "FILE_MACRO_START(" __FILE__ ")FILE_MACRO_END";
}
| 154 | 49 |
/*
* Copyright (c) 2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
* 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 ... | 4,588 | 1,471 |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
smileys.load("images/face_tiny.png");
smileysIcon.load("images/smileys_q.png");
smileysIcon.setImageType(OF_IMAGE_GRAYSCALE);
}
//--------------------------------------------------------------
vo... | 2,498 | 711 |
#include <bits/stdc++.h>
using namespace std;
struct Frac {
long long u, d;
bool operator<(const Frac& x) const {
return u * x.d < d * x.u;
}
};
int main() {
cin.tie(0)->sync_with_stdio(0);
int n;
cin >> n;
vector<pair<Frac, bool>> segs;
segs.reserve(n * 2);
for (int i = 0; i... | 798 | 311 |
#include "Enclave_t.h"
#include <cstdint>
#include <cassert>
#include "Aggregate.h"
#include "Crypto.h"
#include "Filter.h"
#include "Join.h"
#include "Project.h"
#include "Sort.h"
#include "isv_enclave.h"
void ecall_encrypt(uint8_t *plaintext, uint32_t plaintext_length,
uint8_t *ciphertext, uint3... | 6,465 | 2,177 |
#include <animation_widget.hpp>
#include <plotwidget.hpp>
#include <iostream>
#include <QElapsedTimer>
#include <QTimer>
namespace pcpp {
AnimationWidget::AnimationWidget(
int rows, int cols,
QWidget* parent)
: _plot{rows, cols, parent}, _actions{},
_continue{true}, _qtime{new QElapsedTimer}
{
... | 2,247 | 666 |
/**
* Licensed to Green Energy Corp (www.greenenergycorp.com) under one or
* more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
* Green Energy Corp licenses this file to you under the Apache License,
* Version 2.0 (the "Li... | 7,963 | 2,836 |
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré 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 Found... | 6,086 | 2,205 |
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include "T... | 19,627 | 6,427 |
#include "../../template.hpp"
ostream& operator<<(ostream& os, Node* root) { print_inorder(root); return os; }
void preorder(Node* root, map<int, vi>& tab, int diagonal) {
if (not root) return;
tab[diagonal].push_back(root->value);
preorder(root->left, tab, diagonal + 1);
preorder(root->right, tab, di... | 929 | 352 |
/* -------------------------------------------------------------------------- */
/* ------------- RonClient --- Oficial client for RonOTS servers ------------ */
/* -------------------------------------------------------------------------- */
#include "status.h"
#include "allocator.h"
#include "icons.h"
#include "win... | 2,186 | 780 |
//*********************************************************
// Route_Stop_Data.hpp - transit route stop data classes
//*********************************************************
#ifndef ROUTE_STOP_DATA_HPP
#define ROUTE_STOP_DATA_HPP
#include "Data_Array.hpp"
//--------------------------------------------------------... | 1,664 | 491 |
$TEMPLATE[stev.real.min_size_work.args]
N
$TEMPLATE[stev.real.min_size_work]
return std::max< $INTEGER_TYPE >( 1, 2*n-2 );
$TEMPLATE[end]
| 138 | 74 |
#include <TofiConfig.h>
#include "tofi.h"
#include "modes/dmenu.h"
#ifdef GIOMM_FOUND
#include "modes/drun.h"
#endif
#ifdef I3IPC_FOUND
#include "modes/i3wm.h"
#endif
#ifdef GTKMM_FOUND
#include "modes/recent.h"
#endif
#include "modes/run.h"
#include "modes/script.h"
#include <getopt.h>
#include <ftxui/component/s... | 4,518 | 1,942 |
#include "StdAfx.h"
#include "SSProfileStatics.h"
#include <iostream>
#include <fstream>
#include "SSWorkThreadMgr.h"
#include <iomanip>
namespace SceneServer{
CSSProfileStatics::CSSProfileStatics(void):m_LastMsgShow(0)
{
}
CSSProfileStatics::~CSSProfileStatics(void)
{
}
void CSSProfileStatics::Begin(StaticsType ... | 3,147 | 1,245 |
//author : Avishkar A. Hande
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxS = 1e5+10;
vector<pair<ll, ll>> adj[maxS]; // represents adjacency list to store weight and destination node as a pair
vector<ll> dist(maxS, 1e9); // distance array initialised assuming 1e9 as infinity
void ... | 1,108 | 453 |
#include "io.h"
#include <fstream>
#include "stdfilesystem.h" //replace this with <filesystem> when MSVC stops
//being awful or if you don't care about compiling
//this using MSVC
#include <ios>
#include <iostream>
#include <string>
using std::string;
using std::f... | 1,166 | 363 |
#include "ros/ros.h"
#include "tf/message_filter.h"
#include "message_filters/subscriber.h"
#include <ar_track_alvar_msgs/AlvarMarkers.h>
tf::TransformListener *listener_ptr;
int object_id = 1;
ros::Publisher object_pub;
ros::Publisher object_pub1;
void obj_msgCallback(const boost::shared_ptr<const geometry_msgs:... | 2,788 | 1,043 |
//
// Forest_Steiner.hpp
// Steiner_Tree
//
// Created by sergio junior on 12/11/19.
// Copyright © 2019 sergio junior. All rights reserved.
//
#ifndef Read_Instance_hpp
#define Read_Instance_hpp
#include<iostream>
#include <list>
#include <limits.h>
#include <fstream>
#include <cstdlib>
#include <vector>
#include... | 4,291 | 1,254 |
/**
* @file link.cc
*/
#include "common/phy_layer/phy.h"
#include "pan/link_layer/link.h"
#include <stdio.h>
#include "common/log/log.h"
/*! bit mask of data transfer from coordinator to end device */
#define LINK_COORD_TO_ED 0x20
/*! bit mask of data transfer from end device to coordinator */
#define LINK_ED_TO_... | 29,791 | 13,593 |
// Copyright (C) 2007 Id Software, Inc.
//
#include "../precompiled.h"
#pragma hdrstop
#if defined( _DEBUG ) && !defined( ID_REDIRECT_NEWDELETE )
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "../../framework/BuildVersion.h"
#include "../../framework/BuildDef... | 77,473 | 34,801 |
#include "stdafx.h"
using std::string;
#define ITEM_SEAL_PRICE 1000000
enum
{
SEAL_TYPE_SEAL = 1,
SEAL_TYPE_UNSEAL = 2,
SEAL_TYPE_KROWAZ = 3
};
enum SealErrorCodes
{
SealErrorNone = 0, // no error, success!
SealErrorFailed = 2, // "Seal Failed."
SealErrorNeedCoins = 3, // "Not enough coins."
SealErrorI... | 4,986 | 2,146 |
/****************************************************************************
** Meta object code from reading C++ file 'FullScreenWidget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.1)
**
** WARNING! All changes made in this file will be lost!
***************************************************... | 13,771 | 5,743 |
#ifndef MATH_MAT2_HPP
#define MATH_MAT2_HPP
#include "math/genmat.hpp"
namespace math {
using mat2_t = genmat<real, 2>;
constexpr mat2_t
mat2()
{
return mat2_t::identity();
}
constexpr mat2_t
mat2(real x)
{
return mat2_t::fill(x);
}
template<typename T>
constexpr mat2_t
mat2(const genmat<T, 2> &A)
{
r... | 752 | 364 |
// AssocTabConstInterface
template< class K, class V > V AssocTabConstInterface< std::map< K,V > >::operator[]( K arg ) const
{
koalaAssert( !Privates::ZeroAssocKey<K>::isZero(arg),ContExcOutpass );
typename std::map< K,V >::const_iterator i;
i = cont.find( arg );
if (i == cont.end()) return V();
else return i->... | 43,237 | 17,017 |
//=============================================================================
// This file is part of VTKEdge. See vtkedge.org for more information.
//
// Copyright (c) 2010 Kitware, Inc.
//
// VTKEdge may be used under the terms of the BSD License
// Please see the file Copyright.txt in the root directory of... | 8,821 | 3,188 |
//
// Copyright (c) 2015, Deutsches Forschungszentrum für Künstliche Intelligenz GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the ab... | 4,365 | 1,316 |
/* hier_label_func.cpp
* This plugin heirachically segments the input neuron tree and label the nodes as features in eswc file.
* 2012-05-04 : by Yinan Wan
*/
#include <v3d_interface.h>
#include "v3d_message.h"
#include "hier_label_func.h"
#include "hierachical_labeling.h"
#include "customary_structs/vaa3d_neuronto... | 3,817 | 1,556 |
#include "dx/dxgi/DXGI11GraphicsDisplay.hpp"
#ifdef _WIN32
NullableRef<DXGI11GraphicsDisplay> DXGI11GraphicsDisplay::build(IDXGIOutput* const dxgiOutput) noexcept
{
UINT numDisplayModes;
HRESULT res = dxgiOutput->GetDisplayModeList(DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_INTERLACED, &numDisplayModes,... | 1,061 | 426 |
#ifndef CAFFE_GRAPHCUT_LAYER_HPP_
#define CAFFE_GRAPHCUT_LAYER_HPP_
#include <vector>
#include "caffe/blob.hpp"
#include "caffe/layer.hpp"
#include "caffe/proto/caffe.pb.h"
#include "caffe/filterrgbxy.hpp"
#include "gco-v3.0/GCoptimization.h"
#include <cstddef>
namespace caffe{
template <typename Dtype>
class Gr... | 1,419 | 546 |
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2002 Xodnizel
*
* 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, o... | 6,729 | 2,807 |
//===================================================================================================================
//
// instrument.cc -- Bochs instrumentation for CenuryOS
//
/////////////////////////////////////////////////////////////////////////
// $Id: instrument.cc 12655 2015-02-19 20:23:08Z sshwarts $
//////... | 8,639 | 3,456 |
#include "Buffer.h"
#include "Command.h"
#include "Context.h"
#include "DeviceMemory.h"
using namespace RTIDPRR::Graphics;
Buffer::Buffer(const vk::DeviceSize& size, const vk::BufferUsageFlags& usage,
const vk::MemoryPropertyFlags& memoryProperties)
: mSize(size) {
const Device& device = Contex... | 3,792 | 1,255 |
#include<iostream>
#include<queue>
#include<vector>
#include<algorithm>
#include<fstream>
#include<climits>
#include<math.h>
using namespace std;
typedef long long ll ;
void solve(){
ll n ;
cin>>n;
ll *roses = new ll[n];
for(int i =0;i<n;i++){
cin>>roses[i];
}
ll happiness = -1;
for(int i =0;i<n;i++)... | 513 | 226 |
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2022 RDK Management
*
* 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 cop... | 18,237 | 6,161 |
void bar(int b) {}
void foo(int a) { // clang-format off
bar(a);
} // clang-format on
int main() {
int i;
foo(2);
return 0;
}
| 136 | 63 |
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or mod... | 5,030 | 1,808 |
/**
* Copyright (C) 2014 David Wolf <d.wolf@live.at>
*
* This file is part of Lupus.
* 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 th... | 4,551 | 1,364 |
#include "AddCircAction.h"
#include "..\Figures\CCircle.h"
#include "..\ApplicationManager.h"
#include "..\GUI\input.h"
#include "..\GUI\Output.h"
AddCircAction::AddCircAction(ApplicationManager * pApp):Action(pApp)
{}
void AddCircAction::ReadActionParameters()
{
//Get a Pointer to the Input / Output Interfaces
... | 2,811 | 1,045 |
////////////////////////////////////////////////////////////////////////////////////////////////
// Our main ARVRInterface code for our Oculus GDNative module
// Note, even though this is pure C code, we're using the C++ compiler as
// Microsoft never updated their C compiler to understand more modern dialects
// and ... | 26,425 | 10,804 |
// Copyright (c) 2012, Yahoo! Inc. All rights reserved.
// Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
#include <tap/trivial.h>
#include <gearbox/core/ConfigFile.h>
using namespace Gearbox;
int main() {
chdir(TESTDIR);
TEST_START(5);
ConfigFile cfg("cfg/2... | 517 | 207 |
//Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved.
//For the list of developers, see <http://www.MercuryDPM.org/Team>.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions are met:
// * Redistributions ... | 3,944 | 1,476 |
#define CATCH_CONFIG_MAIN
#include "mapping/Map2D.h"
#include <iostream>
#include <cmath>
#include <chrono>
#include <ctime>
#include <thread>
constexpr int test_iterations = 100;
constexpr int vertex_count = 1000;
constexpr int sparsity_factor = 2;
#include <catch2/catch.hpp>
namespace Mapping
{
... | 3,105 | 1,102 |
#include "sslPublic.h"
#include "../attacker.h"
#include "../FileOper.h"
#include <vector>
#include <iostream>
#include <string>
using namespace std;
WORKERCONTROL gWorkControl;
vector <string> gHostAttackList;
char G_USERNAME[64];
SSLPublic::SSLPublic(vector<string>list) {
if (mInstance)
{
return;
}
mInst... | 1,520 | 634 |
/*
* IModel.cpp
*
* Created on: 29.06.2014
* Author: oliver
*/
#include "IModel.h"
IModel::~IModel(){
}
| 119 | 61 |
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: ldpdoc.cpp
//
//--------------------------------------------------------------------------
/****************************************... | 203,441 | 65,341 |
#include "DataIO.h"
#ifdef RUN_STANDALONE
#include <ff.h>
#endif
Cifar10TestInputs::Cifar10TestInputs(const std::string & filename, unsigned n)
: m_size(n*CHANNELS*ROWS*COLS)
{
#ifdef RUN_STANDALONE
data = new float[m_size];
DB_PRINT(2, "Opening data file %s\n", filename.c_str());
FIL File;
if (f_open(&Fil... | 2,258 | 959 |
//*********************************************************************************************************************
// Author: Karel Hala, hala.karel@gmail.com
// Copyright: (c) 2021-2022 Karel Hala
// License: MIT
//***********************************************************************************************... | 1,273 | 469 |
#include "gamelib/utils/LifetimeTracker.hpp"
namespace gamelib
{
SlotMapShort<void*> LifetimeTrackerManager::_data;
LifetimeTrackerManager::LifetimeTrackerManager()
{ }
auto LifetimeTrackerManager::add(void* ptr) -> LifetimeHandle
{
auto h = _data.acquire();
_data[h] = ptr;
... | 796 | 268 |
// VoDTCPServerView.cpp : implementation of the CVoDTCPServerView class
//
#include "stdafx.h"
#include "VoDTCPServer.h"
#include "VoDTCPServerDoc.h"
#include "VoDTCPServerView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#define WSA_VERSION MAKEWORD(2,0)
extern TCHAR ServerPathName[];
extern TCHAR ServerPath[];... | 2,410 | 967 |
/*
* Copyright (C) 2016 "IoT.bzh"
* Author Romain Forlot <romain.forlot@iot.bzh>
*
* 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
*
*... | 2,492 | 946 |
/*
L298.cpp - Library to control the L298 motor driver (c).
*/
#include "L298.h"
L298::L298(uint8_t IN1,uint8_t IN2,uint8_t EN1){
_IN1 = IN1;
_IN2 = IN2;
_EN1 = EN1;
pinMode(_IN1, OUTPUT);
pinMode(_IN2, OUTPUT);
pinMode(_EN1, OUTPUT);
}
void L298::Forward(uint8_t pwm){
digitalWrite(_I... | 650 | 321 |
#include <stdio.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <unistd.h>
#include <iostream>
void print_cpu_time()
{
struct rusage usage;
getrusage (RUSAGE_SELF, &usage);
printf ("CPU time: %ld.%06ld sec user, %ld.%06ld sec system\n",
usage.ru_utime.tv_sec, usage.ru_utime.tv_usec,
... | 2,190 | 876 |
#include <iostream>
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/cudaimgproc.hpp"
using namespace cv;
using namespace std;
using namespace cv::cuda;
void colorLabels(const Mat1i& labels, Mat3b& colors) {
colo... | 1,583 | 578 |
#include <world/health.hpp>
const ComponentType Health::component_type;
Health::Health(const Quantity::type max):
Quantity(max)
{
}
void Health::tick(Entity*, World*)
{
}
| 176 | 64 |
#include <stdio.h>
#include "digits.hpp"
int main() {
init_digits();
printf("values: \n");
for (int i=0; i < VALUES_COUNT; i++) {
if (values[i] == UNUSED) continue;
printf("%c -> %lld\n", (char)i, values[i]);
}
printf("digits: ");
for (int i=0; i < DIGITS_COUNT; i++) {
p... | 372 | 148 |
//
// WindowsCPUUsage.hpp
// Kuplung
//
// Created by Sergey Petrov on 12/16/15.
// Copyright © 2015 supudo.net. All rights reserved.
//
#ifndef WindowsCPUUsage_hpp
#define WindowsCPUUsage_hpp
namespace KuplungApp { namespace Utilities { namespace Consumption {
#include <windows.h>
class WindowsCPUUsage {
publi... | 814 | 314 |
/* Name:- Aditya Kumar Gupta
Roll No.:- 1706291
Sec:- B-19
Ques No.:-32 */
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
char str[100],pat[20],new_str[100],rep_pat[50];
int i=0,j=0,k,n=0,copy_loop=0, rep_index=0;
cout<<"Enter the string:\n";
gets(str);
cout<<"\nEnter the pattern: ";
... | 787 | 371 |
/* -------------------------------------------------------------------
* @doc
* @notice Template file wizards/projects/plaincpp/main.cpp
*
* @copyright Arboreus (http://arboreus.systems)
* @author Alexandr Kirilov (http://alexandr.kirilov.me)
* @created 19/07/2020 at 13:12:12
* */// ------------------------... | 2,035 | 865 |
//===-- ValueEnumerator.cpp - Number values and types for bitcode writer --===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 11,674 | 3,725 |
// BAFO
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, t_beto=0, t_aldo=0, x, y, counter=1;
string result;
cin >> n;
if(n == 0)
return 0;
while(n != 0) {
for (int i = 0; i < n; i++) {
cin >> x >> y;
t_aldo += x;
t_beto += y;
}
if (t_ald... | 533 | 239 |
//
//
//
#include "SerialCommand.h"
SerialCommand::SerialCommand(int type, float value) {
Type = type;
Value = value;
if (Type != NULL) {
notEmpty = true;
}
}
//SerialCommandClass SerialCommand;
| 209 | 80 |
/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: Max Kellermann <mk@cm4all.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the abo... | 3,898 | 1,420 |
#ifndef QRW_GAMEOBJECT_HPP
#define QRW_GAMEOBJECT_HPP
#include <map>
#include <typeinfo>
#include <typeindex>
#include <cassert>
#include <functional>
#include <foundation/gamecomponent.hpp>
#include "meta/reflectable.hpp"
namespace qrw
{
class GameComponent;
class GameObject : public Reflectable
{
public:
GameO... | 1,632 | 500 |
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void)
{
char str[500],str1[500];
int i = 0;
gets(str);
for(int j = 0;j<strlen(str);i++,j = j + 2 )
str1[i] = str[j];
str1[i] = '\0';
sort(str1,str1+strlen(str1));
for(int j... | 421 | 203 |
#include "purescript.h"
// Tested with package v4.0.0
FOREIGN_BEGIN( Unsafe_Coerce )
exports["unsafeCoerce"] = [](const boxed& x) -> boxed {
return x;
};
FOREIGN_END
| 174 | 77 |
// Copyright (c) 2009-2015, NVIDIA CORPORATION. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of con... | 6,374 | 2,161 |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/lite_video/lite_video_navigation_metrics.h"
namespace lite_video {
LiteVideoNavigationMetrics::LiteVideoNavigationMetrics(
... | 834 | 275 |
/*
MIT License
Copyright (c) 2019-2021 Sven Lukas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | 1,701 | 582 |
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... | 3,873 | 1,337 |
#include "../../quick/store/CCStorePaymentTransactionWrapper.h"
// #import <StoreKit/StoreKit.h>
NS_CC_H_BEGIN
CCStorePaymentTransactionWrapper* CCStorePaymentTransactionWrapper::createWithTransaction(void* transactionObj)
{
// CCStorePaymentTransactionWrapper* transaction = new CCStorePaymentTransactionWrapper(... | 631 | 177 |
#include "software/simulation/physics/simulation_contact_listener.h"
void SimulationContactListener::BeginContact(b2Contact *contact)
{
if (contact->IsTouching())
{
auto fixture_a = contact->GetFixtureA();
auto fixture_b = contact->GetFixtureB();
PhysicsObjectUserData *user_data_a =
... | 7,300 | 2,258 |
#include <iostream>
/*
Modify PrintFace() to have three parameters: char eyeChar, char noseChar, char mouthChar. Call the function with arguments 'o', '*', and '#', which should draw this face:
*/
using namespace std;
void PrintFace(char eye, char nose, char mouth) { // FIXME: Support 3 parameters
cout << " " <... | 582 | 184 |
//This file is part of "GZE - GroundZero Engine"
//The permisive licence allow to use GZE for free or commercial project (Apache License, Version 2.0).
//For conditions of distribution and use, see copyright notice in Licence.txt, this license must be included with any distribution of the code.
//Though not required... | 15,550 | 7,215 |
//--------------------------------------------------------------------------------------
// File: SkinnedEffect.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkID=615561
//---------------------------------------------------... | 23,151 | 7,805 |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance w... | 4,788 | 1,543 |
#include <iostream>
#include <mpi.h>
#include "utilities.hpp"
#define PRINTVALS true
namespace
{
bool compareChar( char const & c1, char const & c2 )
{
if( c1 == c2 )
{
return true;
}
else if( std::toupper( c1 ) == std::toupper( c2 ) )
{
return true;
}
return false;
}
void mpi_print( char con... | 3,155 | 1,324 |
/*
===========================================================================
Doom 3 GPL Source Code
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
Doom 3 Source Code is free software: you can redistribute it and/or modify... | 24,309 | 9,317 |
/*-
* Copyright (c) 2005-2007, Kohsuke Ohtani
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list o... | 6,621 | 2,577 |
/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: Max Kellermann <mk@cm4all.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the abo... | 3,803 | 1,394 |
#include <SampleGamePluginPCH.h>
#include <Core/WorldSerializer/WorldReader.h>
#include <Core/WorldSerializer/WorldWriter.h>
#include <SampleGamePlugin/Components/RedursiveGrowthComponent.h>
// clang-format off
EZ_BEGIN_COMPONENT_TYPE(RecursiveGrowthComponent, 2, ezComponentMode::Static)
{
EZ_BEGIN_PROPERTIES
{
... | 2,703 | 982 |
// license:BSD-3-Clause
// copyright-holders:Miodrag Milanovic
/***************************************************************************
AC1 video driver by Miodrag Milanovic
15/01/2009 Preliminary driver.
****************************************************************************/
#include "emu... | 1,581 | 728 |
#include "Direction.hpp"
#include <string> // for string class
#include <unordered_map>
using namespace std;
namespace ariel{
class Notebook {
unordered_map<string, array<char,100>> map;
public:
void write( int page,int row, int column, Direction dir, string str);
string ... | 506 | 152 |
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "il2cpp-class-internals.h"
#include "codegen/il2cpp-codegen.h"
#include "i... | 460,760 | 205,999 |
#include "base.h"
/*
Station::Station(void) { _setup(); }
Station::Station(stationConfig conf) {
_config = conf;
_setup();
}
*/
RPKeyboard::RPKeyboard() {
Serial.begin(115200);
// while (!Serial) { delay(10); } // wait till serial port is opened
delay(100); // RP2040 delay is not a bad idea
Serial.p... | 666 | 258 |
#include "CoffeePCH.h" | 22 | 12 |
#include "RandNano.hh"
#include <cstdlib>
#include <ctime>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#ifdef _WIN32
#include <Windows.h>
#endif
#ifdef __MACH__
#include <mach/clock.h>
#include <mach/mach.h>
#endif
RandNano::RandNano()
{
this->setRandInNano();
}
RandNano::~RandNano()
{
}
void RandNan... | 897 | 422 |
#ifndef CIRCULAR_QUEUE_HPP
#define CIRCULAR_QUEUE_HPP
/*
https://leetcode.com/problems/design-circular-queue/description/
Design your implementation of the circular queue. The circular queue is
a linear data structure in which the operations are performed based on
FIFO (First In First Out) principle and the last posit... | 3,882 | 1,203 |
#include <inttypes.h>
#include <stdlib.h>
#include <phosg/Encoding.hh>
#include <phosg/Filesystem.hh>
#include <phosg/Image.hh>
#include <phosg/Strings.hh>
#include <stdexcept>
#include <vector>
#include "IndexFormats/Formats.hh"
#include "ResourceFile.hh"
using namespace std;
struct MonkeyShinesRoom {
struct E... | 16,526 | 6,356 |
#ifndef BACKGROUND_PARTICLES_HPP
#define BACKGROUND_PARTICLES_HPP
#include <SFML/Graphics.hpp>
#include <array>
class BackgroundParticles {
public:
BackgroundParticles(int n);
void animateParticlesIdle();
void animateParticlesMovement();
std::array<sf::CircleShape, 50> backgroundParticles;
... | 396 | 155 |
/* !!!! GENERATED FILE - DO NOT EDIT !!!!
* --------------------------------------
*
* This file is part of liblcf. Copyright (c) 2017 liblcf authors.
* https://github.com/EasyRPG/liblcf - https://easyrpg.org
*
* liblcf is Free/Libre Open Source Software, released under the MIT License.
* For the full copyright ... | 1,489 | 530 |
/*
Copyright (c) 2018-2019 Oleg Linkin <maledictusdemagog@gmail.com>
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, modi... | 6,620 | 2,243 |