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 |
|---|---|---|---|---|---|---|---|---|
f606c0241f486d98815435e257b4751cb02e1066 | e2576798af2c34320b48dc3f9f9aa017de608762 | arcolight/ecl | /include/ecl/bit_field.hpp | C++ | hpp | 5,790 | permissive | /**
* @file
*
* @brief Bit field class.
* @details Bit field class. Endianness independent. Compiler independent.
*
* @ingroup ecl
*/
#ifndef ECL_BIT_FIELD_HPP
#define ECL_BIT_FIELD_HPP
#include <cstdint>
#include <cstdlib>
#define ECL_FIELD(TYPE, NAME, SIZE) \
ecl::field<TYPE, decltype(TYPE::NAME), &TYPE:... |
b53648852c70996e878390b55668245e409f6dd8 | cf7ae3203bfd695510891fba65b285390ec1be55 | WorldOfCode22/BuildingEscape | /BuildingEscape/Source/BuildingEscape/PostitionReport.cpp | C++ | cpp | 979 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "PostitionReport.h"
#include "GameFramework/Actor.h"
// Sets default values for this component's properties
UPostitionReport::UPostitionReport()
{
// Set this component to be initialized when the game starts, and to be ticked eve... |
158a646dd7f7535b1faff1eb61ec43baf20b7e63 | dc08ffbf18b39b32ac018e9defa26443c0546af6 | tehKaiN/node3d | /3dgui/3DGUI/src/lua_tinker.cpp | C++ | cpp | 18,371 | no_license | // lua_tinker.cpp
//
// LuaTinker - Simple and light C++ wrapper for Lua.
//
// Copyright (c) 2005-2007 Kwon-il Lee (zupet@hitel.net)
//
// please check Licence.txt file for licence and legal issues.
#include "lua_tinker.h"
/*---------------------------------------------------------------------------*... |
23ebdfc9141a88d1d7534d10f8c754f69d26c3d0 | 7f81b25b5d00a74e76b72f32ab0ab6c9d911bc93 | mkmartinw/compute-runtime | /offline_compiler/options.cpp | C++ | cpp | 649 | permissive | /*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "hw_cmds.h"
#include "runtime/helpers/options.h"
#include "runtime/helpers/array_count.h"
#include <cstddef>
namespace OCLRT {
// AUB file folder location
const char *folderAUB = "aub_out";
// Initial value for HW tag
... |
12b42e81024afbc67d8446fced182222767ea828 | 1282eed962dd1ed2dc9aa2ca02373f182a5ecfa6 | MingyuGuan/husky-sql | /husky-sql/relnode/husky_logical_calc.hpp | C++ | hpp | 1,451 | permissive | #pragma once
#include "husky-sql/relnode/abstract_rel_node.hpp"
#include "husky-sql/table/table.hpp"
#include "husky-sql/rexnode/rex_node.hpp"
#include "husky-sql/utils/row_kv.hpp"
#include <vector>
#include <string>
#include <memory>
namespace husky {
namespace sql {
class HuskyLogicalCalc: public Ab... |
159ee11277470ce110ef3db35714e73b582e6c88 | 5f69001dfaedb22b3d070e364e4cc4bfc94d787e | Rizki529/UTS-DASARPEMROGRAMAN-TI-B | /BAB VII/iki5.cpp | C++ | cpp | 1,099 | no_license | #include <iostream>
using namespace std;
int main()
{
int A[7];
int j, k, C, temp;
cout << " Masukan Nilai Pada Elemen array :" << endl;
for ( C=0; C<7; C++)
{
//menginput elemen array
cout << "A ["<< C << "] = ";
cin >> A[C];
}
cout << " \nNilai Elemen Array Sebel... |
8a76bf45eaf5f8b7445972add494b9ea6dec9984 | e35770963573fb20b3586f54003b14701d718d21 | Pavelius/xface | /evrika/view.cpp | C++ | cpp | 1,110 | no_license | #include "draw_control.h"
#include "main.h"
using namespace draw;
static struct header_control : controls::tree, controls::control::plugin {
struct element : tree::element {
unsigned rfid;
};
void before_render() {
}
control* getcontrol() override {
return this;
}
const char* getlabel(stringbuilder& sb) co... |
2d02309b8d1129e89a641aebfefbc53f697bc413 | f718bc67abaafee659ea127809188bb30b4d0cc6 | praddyum/coding | /Tree/BT_leafnodecount.cpp | C++ | cpp | 1,236 | no_license |
#include<bits/stdc++.h>
#include<queue>
using namespace std;
struct node{
int data;
node * left;
node * right;
};
node * create(int a){
node* datanode = new node;
datanode->data=a;
datanode->left=NULL;
datanode->right=NULL;
return datanode;
}
node * insert(node * root,int a){
if(... |
bbba5015fbce3f7977b384211ba857126f6edfb5 | 0a2bb1717bf8db3583e9d02ca46fa1d7cace3645 | tachyon83/code-rhino | /DAY450~499/DAY458-PROGRAMMERS-행렬 테두리 회전하기/bumjin.cpp | C++ | cpp | 1,333 | no_license | #include <string>
#include <vector>
using namespace std;
int MAP[110][110];
int Min(int A, int B) { return A < B ? A : B; }
int Turning(int x, int y, int xx, int yy)
{
int Min_Num;
int Temp = MAP[x][y];
Min_Num = Temp;
for (int i = x; i < xx; i++)
{
Min_Num = Min(Min_Num, MAP[i][y]... |
07e33c39e8a10e4d32b4eddd23a81ab5bf56794f | 6ce34555763387a49d2dbab55cb51c5582a3f3bc | jacobwi/legacy-modern-opengl | /modern/FlatChair.cpp | C++ | cpp | 10,797 | no_license | /*
* @author Jacob William
* @desc This program creates a flat chair without thickness
*
*/
#include <iostream> // C++ I/O library
#include <GL/glew.h> // Glew header
#include <GL/freeglut.h> // freeglut header
// Importing glm headers
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <gl... |
6638d2be4fb83c965583046c5c05aa9fc7a9b6bf | 631b2e299e3c07e94929e02b762d88f31d7ea78c | Ishrak-Tawsif/Accepted-Codes | /Ishrakk_Tawsif-ac/UVALive/7633/11348302_AC_0ms_0kB.cpp | C++ | cpp | 1,278 | no_license | #include<bits/stdc++.h>
using namespace std;
#define sf(nn) scanf ("%d", &nn)
#define sfll(nn) scanf ("%lld", &nn)
#define pf printf
#define casepf(nn) printf ("Case #%d: ",nn)
#define out(nn) cout <<nn <<endl
#define loop(var,start,til... |
17bee839d015351e3143df5e272e018a8f003d7b | 02644dd203860fc90459834071741fc4702c2212 | alexgalkin/fost-base | /Cpp/include/fost/test.hpp | C++ | hpp | 15,225 | permissive | /**
Copyright 2007-2020 Red Anchor Trading Co. Ltd.
Distributed under the Boost Software License, Version 1.0.
See <http://www.boost.org/LICENSE_1_0.txt>
*/
#ifndef FOST_TEST_HPP
#define FOST_TEST_HPP
#pragma once
#include <fost/pointers>
#include <fost/exception.hpp>
#include <fost/string.hpp>
#inclu... |
a9f1d40b40c871862d8451fa7ac2971abf4b7108 | 28262097347e2bb9e27a29483b8c2a2174e5aadf | iluvjava/AMATH-583 | /ps6/matvec/pmatvec.cpp | C++ | cpp | 4,004 | no_license | //
// This file is part of the course materials for AMATH483/583 at the University of Washington,
// Spring 2020
//
// Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
// https://creativecommons.org/licenses/by-nc-sa/4.0/
//
// Author: Andrew Lumsdaine
//
#include <cmath>
... |
d7db83233957cfa59fe47443660630a9f3e75363 | d849e78212a4b54df67630afe0dcbb77820e1302 | 617076674/PAT-ADVANCED | /question1029/C++/question1029.cpp | C++ | cpp | 851 | no_license | #include<iostream>
#include<vector>
#include<queue>
using namespace std;
int INF = 0x7fffffff;
int main() {
int N1, N2;
scanf("%d", &N1);
queue<int> nums1, nums2;
int num;
for(int i = 0; i < N1; i++) {
scanf("%d", &num);
nums1.push(num);
}
nums1.push(INF);
scanf("%d", &N2);
int count = 0;
for(int i = 0... |
55c876768dc0d6f11589231ca5a8044a599dfc11 | 72c77c3894812ab8b8694a0dc1432ae568bd3437 | Pandinosaurus/insight3d | /insight3d/geometry_structures.cpp | C++ | cpp | 14,695 | no_license | #include "geometry_structures.h"
DYNAMIC_STRUCTURE(Indices, Index);
DYNAMIC_STRUCTURE(Double_Indices, Double_Index);
DYNAMIC_STRUCTURE(Selected_Items, Selected_Item)
DYNAMIC_STRUCTURE(Points, Point);
DYNAMIC_STRUCTURE(Vertices, Vertex);
DYNAMIC_STRUCTURE(Vertices_Incidence, Vertex_Incidence);
DYNAMIC_STRUCTURE(Polygo... |
9d9de4258c743674fb8b3f1677db08df9a9e4c21 | 8b1f4393901de587548f9db1c9a7ef12a58d296e | mp3butcher/osg4noob | /src/output/osgParticle/customCode/osgParticle/ParticleSystemUpdater_pmoc.hpp | C++ | hpp | 805 | no_license | #ifndef osgParticle_ParticleSystemUpdater_customHPP
#define osgParticle_ParticleSystemUpdater_customHPP 1
//includes
#include <osgParticle/ParticleSystemUpdater_pmoc.hpp>
#include <QObject>
#include <osg/Node_pmoc.hpp>
#include <osgParticle/ParticleSystemUpdater>
#include <osgParticle/ParticleSystemUpdater_pmoc.hp... |
46dbdb04d57abc809ba87d7b1870e30eeaf230f2 | 428cd0c97aacff9b8a5d2979dc2ba3f0a7d268da | chengjunwen/algorithm | /analys1/assign4/countSCC.cpp | C++ | cpp | 2,943 | no_license | #include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
#include <map>
#include <stack>
#include "../cs106blib/CS106/strutils.h"
using namespace std;
#define N 875714
//vector<int> vtime;
stack<int> finishtime;
//int t=0;
vector<int> visit1,visit2;
int count=0;
vector<int> sum;
void finishTime(map... |
c1b8fb0eda62f60d51bedb5ecae8201e54e02d8f | 7adb341dfc66b7b191bce8fbec88e5851cc7cd44 | srinjayk/CS_202 | /202/satoptimized.cpp | C++ | cpp | 4,324 | no_license | //Copyright 2018 Pandey A.
//Strict dependency on g++ 2017 standard
//Heuristic driven solution to SAT solving (NP)
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<fstream>
#include<vector>
#include<cstring>
#include<ctime>
#include<thread>
#include<chrono>
#include<algorithm>
using namespace std;
//By d... |
1658d1cb5607369223ce79f96def6225f5bfd458 | a2dda147551a753936b8fbbefab7f33e07360fc3 | tmuttaqueen/MyCodes | /Online Judge Code/codeforces/Codeforces Round #405 (rated, Div. 2, based on VK Cup 2017 Round 1)/B.cpp | C++ | cpp | 1,637 | no_license | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
const double pi = 3.141592653589793;
#define xx first
#define yy second
#define mp make_pair
#define intl long long
#define filein... |
bd465098e521462b5181f0e5f1a5c286a8dceb1b | ba5c6ae577e8d3a26ee813c5afcd61fc6afcbfe1 | yunju/cvsusercode | /PhojTree/DelPanj/TreeMaker/src/PhotonFilter.cc | C++ | cc | 6,160 | no_license | // -*- C++ -*-
//
// Original Author: Anil Pratap Singh,32 2-C17,+41227676591,
// Created: Sat Sep 10 18:46:42 CEST 2011
// $Id: ZeeFilter.cc,v 1.4 2011/09/17 01:16:47 lovedeep Exp $
//
//
// system include files
#include <memory>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#... |
1e42652b99fe3cc5dc1dfd76b3b373962b0798fe | 5bdd96416b16c6da1656e9573fe2062f840cd19c | mcsyp/x100_show | /TestXpiderClient/xpiderclient.cpp | C++ | cpp | 3,257 | no_license | #include "xpiderclient.h"
#include <QHostAddress>
#include <time.h>
#include <xpider_ctl/xpider_protocol.h>
#include <xpider_ctl/xpider_info.h>
#include <stdint.h>
XpiderClient::XpiderClient(QObject *parent) : QObject(parent)
{
QHostAddress address = QHostAddress::LocalHost;
host_address_ = address.toString();
... |
cbd95b1e5511b5e9a0be9c90a053559d6ca80999 | bba63230073e38482d5c995b5f0963078c6de0f9 | adzhou/oragle | /v8/src/preparse-data.cc | C++ | cc | 7,539 | permissive | // Copyright 2010 the V8 project authors. 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 ... |
5b46e76ca112ed1860cf27eaa95c7564eda34eae | a5105b1494d1df46e28b657dff914aaef82a6a75 | azureopen/neoml | /NeoMathEngine/src/CPU/CpuMathEngineBlas.cpp | C++ | cpp | 41,402 | permissive | /* Copyright © 2017-2020 ABBYY Production LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
4965805833e2aded3f45ec57474d7e55e52a4be0 | 982a9d030d9af527472f84fea4e9f934a5dce85a | akhikolla/testpackages | /fuzzedpackages/tmg/inst/include/magnet/math/complex.hpp | C++ | hpp | 2,216 | no_license | /* dynamo:- Event driven molecular dynamics simulator
http://www.dynamomd.org
Copyright (C) 2011 Marcus N Campbell Bannerman <m.bannerman@gmail.com>
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 3 as published by... |
d18d04a6c3fd2844bba73ea5da39d094d7ac938f | a7577940a1ced2b04c0a466c24c78d3e15dfd427 | mgukowsky/MAGSNES | /MAGSNES/AudioManager.cpp | C++ | cpp | 12,207 | no_license | #include "AudioManager.h"
__FILESCOPE__{
const MAGSNES::qword REFTIMES_PER_SEC = 1000000; //100ns units
//8 step sequences for the square waves
const float squareSequenceDutyCycleHalf[8] = { -0.1, 0.1, 0.1, 0.1, 0.1, -0.1, -0.1, -0.1 },
squareSequenceDutyCycleQuarter[8] = { -0.1, 0.1, 0.1, -0.1, -0.1, -0.1... |
cde770d4052be9e9f86728ebbb8a00e23d2669f5 | a3bcc51fea36869a93cc3f5f85ab1e82585bb107 | AnnaKolla/Kolla075-sims2014 | /W05_H01_Pendulum/src/testApp.cpp | C++ | cpp | 2,627 | no_license | #include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofSetVerticalSync(true);
ofBackground(0);
ofSetCircleResolution(100);
ofSetFrameRate(60);
origin = ofPoint( 512, 300 );
pos = ofPoint( 600, 200 );
velocity = ofPoint( 1... |
ee061a87fd5254dd796e2fed09cb5bb7aeeb5dd4 | a10466555f4b7e9b7aebe643953255b79144f727 | Masternode/mastercoin | /src/sendalert.cpp | C++ | cpp | 3,695 | permissive | #include "alert.h"
#include "clientversion.h"
#include "chainparams.h"
#include "init.h"
#include "net.h"
#include "utilstrencodings.h"
#include "utiltime.h"
/*
If you need to broadcast an alert, here's what to do:
1. Modify alert parameters below, see alert.* and comments in the code
for what does what.
2. run m... |
c0abf930f0c6f68ca5ed9ac23049f11cc05c07e6 | d3c1341a8cdfbfd3946176b6c1a801b24e6fa32e | Anikcsejnu/Codebox | /C++/votka/set - 1/3.cpp | C++ | cpp | 621 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
stack<char>st;
queue<char>q;
string s;
int flag=0;
cout<<"Enter a string to see is it palindrome or not: "<<endl;
cin>>s;
for(int i=0; i<s.length() ; i++)
{
q.push(s[i]);
st.push(s[i]);
}
whi... |
f069301cd452da00ecc4d9d388909c87cee23fa7 | aa21c4e591ce7db2e6744de8a7adce7634c4018a | OpenACCUserGroup/OpenACCV-V | /Tests/serial.cpp | C++ | cpp | 2,711 | permissive | #include "acc_testsuite.h"
#ifndef T1
//T1:serial,V:2.6-2.7
int test1(){
int err = 0;
srand(SEED);
real_t* a = new real_t[1024];
real_t* b = new real_t[1024];
real_t* c = new real_t[1024];
for(int x = 0; x < 1024; ++x){
a[x] = rand() / (real_t)(RAND_MAX / 10);
b[x] = rand() / (r... |
9a383e4dd43dcc0f541854c562c68bd9c5606204 | 68a7f291a512df47b2982686aabe38d0aeb03358 | gaston11276/cstr | /src/main.cpp | C++ | cpp | 482 | no_license | #include "string.hpp"
#include "string_narrow.hpp"
#include "string_wide.hpp"
#include <iostream>
using namespace std;
int main()
{
cobra::csn narrow1 = "Narrow!";
cobra::csw wide1 = L"Wide!";
cout << "Narrow: " << narrow1.c_str() << "\n";
wcout << L"Wide: " << wide1.c_str() << "\n";
cobra::csn narrow2(12);
c... |
2f981b70d278fb59e82d20933ebbf7a5a894cfba | 282658cd74d0c2ff5a4253c0351ce836ad393ab7 | ronaksingh27/cses-solutions | /cpp/1665.cpp | C++ | cpp | 1,178 | no_license | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
const int N = 105, MX = 5000;
int n, x, t[N];
ll f[N][N][2 * MX + 5];
int main() {
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cin >> n >> x;
for (int i = 1; i <= n; ++i) {
cin >> t[i];
}
sort(t + 1, t ... |
81be21ac4f59a9f9f538dfb4318df1829ceeebac | 567d87092183806ef35ad20944546c2325dbf57e | blairdgeo/node-gdal | /src/utils/warp_options.cpp | C++ | cpp | 7,057 | permissive | #include "warp_options.hpp"
#include "../gdal_dataset.hpp"
#include "../gdal_geometry.hpp"
#include "../gdal_common.hpp"
#include <stdio.h>
namespace node_gdal {
WarpOptions::WarpOptions()
: options(NULL),
additional_options(),
src_bands("src band ids"),
dst_bands("dst band ids"),
src_nodata(NULL),
... |
fcd6a7abf0770f40ab9d6825aad4d97721ef40d3 | 0a5814d38ec252818d1cd0dcb0ec22946c25455e | maolouzhedehaozi/C-extension-example | /python/main.cc | C++ | cc | 250 | no_license | #include "operator.h"
int main(void) {
auto send_cb = [](void *ptr, size_t size) {
LOG(INFO) << "finish send content in addr " << ptr << ", send size "
<< size;
};
BaseOperator op(true);
op.RunSend(send_cb);
return 0;
}
|
8f4d186406cede11294d5ed57b3398b239be3983 | 322586e51f1d2db35246eca82926ab66a36f6157 | hashseed/node | /deps/v8/src/runtime/runtime-numbers.cc | C++ | cc | 6,166 | permissive | // Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/runtime/runtime-utils.h"
#include "src/arguments.h"
#include "src/base/bits.h"
#include "src/bootstrapper.h"
#include "src/isolate-inl.h"... |
23ac58330f8d9af10d59719413f79f8eca7f1dc8 | 470153de5116fbcd26846c0bf67d34f57caa3581 | kks227/BOJ | /17300/17391.cpp | C++ | cpp | 636 | no_license | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAX = 300;
const int INF = 1e9;
int R, C, map[MAX][MAX], dp[MAX][MAX];
int booster(int r, int c){
int &ret = dp[r][c];
if(ret != -1) return ret;
if(r == R-1 && c == C-1) return ret = 0;
ret = INF;
for(int k = 1; k <= map[r]... |
eef26c421876d587f6e165f0441a328755215011 | 8cb5efd055ba69703a9bc46ac854d7ad6fe219b6 | Ashkenazic/Deep-learning-math-kernel-research | /src/elx_conv_direct_lp.cpp | C++ | cpp | 27,648 | permissive | #include "el_intrin.hpp"
#include "el_stl.hpp"
#include "el_utils.hpp"
#include "el_parallel.hpp"
#include "elx_conv_direct_lp.hpp"
namespace euler {
static constexpr float INT8GEMM_TWT_QTSCALE = 127.0;
Template_elx_conv_direct_lp_t
Instance_elx_conv_direct_lp_t::elx_conv_direct_lp_t(eld_conv_t &dc)
: elx_conv_t... |
9d6c0a9de628aa422dad37a72082b5abcf1c2bfd | 0a64f8b94133ef4adfceaa467593df5faa297038 | valerioMolinari/Elite | /Valerio/C++/corso_c++_bemporad/Puntatori/esercitazione_reference_e_puntatori.cpp | C++ | cpp | 318 | no_license | #include <iostream>
using namespace std;
void swap(int *x, int& y);
int main(void) {
system("clear");
int *a = new int;
*a = 10;
int b = 20;
swap(a, b);
cout << *a << endl << b << endl;
delete a; // Cazzo l'avevo dimenticato!
return 0;
}
void swap(int *x, int& y) {
int temp = *x;
*x = y;
y = temp;
}
|
3a08c1a323ea69b650d69d4f356dee28a37e92f8 | 5a98e726a2ac0270b37400f929e1c6c5c4f5b31c | stardog-union/boost | /libs/math/test/test_erf.hpp | C++ | hpp | 8,431 | permissive | // Copyright John Maddock 2006.
// Copyright Paul A. Bristow 2007, 2009
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/concepts/real_concept.hpp>
#... |
98c5b3f0cb27dfccb61c49fb9fd64abb7b6f14e6 | 9f5a99300b6bf9601375400171a1fd9a6bdcfd0c | atubo/online-judge | /luogu/P1943.cpp | C++ | cpp | 452 | no_license | // https://www.luogu.org/problemnew/show/P1943
// LocalMaxima_NOI导刊2009提高(1)
#include <bits/stdc++.h>
using namespace std;
double harmonics(int n) {
double ans = 0;
if (n < 1e7) {
for (int i = 1; i <= n; i++) {
ans += 1.0/i;
}
} else {
ans = 0.5772156649 + log(n+0.5);
... |
d63a018f757656bd7216c124a4bf9f0d72dec27f | 0c7d5e0a8f44e1ab5dd4c90f2417126583345783 | uditshaw/HackerRank-practice | /Algorithms/Greedy/Marccupcake.cpp | C++ | cpp | 249 | no_license | #include <bits/stdc++.h>
using namespace std;
long int miles;
int n;
int main()
{
cin >> n;
int c[n],i;
for(i=0;i<n;i++)
cin>>c[i];
sort(c,c+n,greater<int>());
for(i=0;i<n;i++)
miles+=pow(2,i)*c[i];
cout << miles;
} |
7c125ce989691072024e567c6e2537fe1a4367c6 | 2e6e42d881cf93c95e841046caa40a62abaa371e | Drizshko/openvino | /ngraph/test/type_prop/reorg_yolo.cpp | C++ | cpp | 3,529 | permissive | //*****************************************************************************
// Copyright 2017-2021 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
5667bf956a778942a11097c747d9ad0301aab04a | d2fc6a26eac52ef6d37b11dffb7d6787ff9fdedf | darbyjohnston/DJV | /lib/djvUI/CheckBox.cpp | C++ | cpp | 10,680 | permissive | // SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2004-2020 Darby Johnston
// All rights reserved.
#include <djvUI/CheckBox.h>
#include <djvUI/Action.h>
#include <djvUI/DrawUtil.h>
#include <djvUI/Label.h>
#include <djvUI/Style.h>
#include <djvRender2D/Render.h>
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw... |
fc1408dda8d0cfb4f8df74c79893f34cb82ff491 | e9fb1313159f60fb7dc95d5c0188dd67fa597baf | ldionne/d2 | /test/unit/test_thread_function.cpp | C++ | cpp | 1,070 | permissive | /*!
* @file
* This file contains unit tests for the `d2::thread_function` class.
*/
#include <d2/detail/thread_lifetime.hpp>
#include <d2/thread_function.hpp>
namespace {
template <typename F>
struct instantiate_thread_function {
typedef d2::thread_function<F> ThreadFunction;
d2::detail::thread_lifetime l... |
a0f45040976903c2774f9f1bb997e14cd8fc88b2 | 4ec48522d8c01e0ab2557381672ced810e780e2a | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/MP+dmb.stll+dmb.stap.c.cbmc_out.cpp | C++ | cpp | 29,890 | no_license | // Global variabls:
// 0:vars:2
// 2:atom_1_X0_1:1
// 3:atom_1_X2_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
#define ADDRSIZE 4
#define LOCALADDRSIZE 2
#define NTHREAD 3
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b... |
5170b75395a938a38a0f4ac9a07f26881a8a5826 | 6bdb612d2daf52976e8bda6126200d4f22232831 | mathias234/serenity | /Kernel/Net/RTL8139NetworkAdapter.cpp | C++ | cpp | 13,482 | permissive | /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* 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 noti... |
4e37bc34e14a776712f5d1cd5eda05c3d3f1bf4e | 1f91fe32363c53e4e2d39b6a8f251b783b5db6d0 | EpitechTeam/R-Type | /src/client/source/lib/utils.cpp | C++ | cpp | 981 | permissive | //
// Created by cherkaoui on 10/11/18.
//
#include "Client.hpp"
#include <cctype>
sf::Sprite createSprite(const std::string path)
{
sf::Texture texture;
texture.loadFromFile(path);
return sf::Sprite(texture);
}
void print(std::string string){
std::cout << string << std::endl;
};
int roll(int min,... |
523f71ee453d0b423d1cfe159d893dfe3e723a0e | d96b83b0dec8ccaa51c3ef2f75f250737b4f727b | VojtechMyslivec/PAP-NCG | /02_openMP/floydWarshall.hpp | C++ | hpp | 2,371 | no_license | /** floydWarshall.hpp
*
* Autori: Vojtech Myslivec <vojtech.myslivec@fit.cvut.cz>, FIT CVUT v Praze
* Zdenek Novy <novyzde3@fit.cvut.cz>, FIT CVUT v Praze
*
* Datum: unor-brezen 2015
*
* Popis: Semestralni prace z predmetu MI-PAP:
* Hledani... |
697e1a20e30b0353613d136951b06ee25ba411a8 | 7871589d59aeaf96f6b53d396bd0d6719e7d8fb8 | kyx0r/FA_Patcher | /boost_lib/boost/detail/identifier.hpp | C++ | hpp | 2,935 | permissive | // boost/identifier.hpp ----------------------------------------------------//
// Copyright Beman Dawes 2006
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See documentation at http://www.boost.org/libs... |
602673a4870c211a83290ebdac5972fcf0e06d48 | 9cb9e03c42c5d31fcea9d8fd380de2835103d4a6 | mclauchlinc/analysis_clas6 | /analysis_2/src/event_class.hpp | C++ | hpp | 2,740 | no_license | #ifndef EVENT_H_GUARD
#define EVENT_H_GUARD
#include "TLorentzVector.h"
#include <iostream>
#include "histogram.hpp"
#include "constants.hpp"
#include "branches.hpp"
#include "eid.hpp"//Electron ID Cuts
#include "cuts.hpp"
//#include "particle.hpp"
//#include "hid.hpp"//Hadron ID Cuts
//#include "ntuple.hpp"
/*
clas... |
843d545d6263238760f810cb9ba595a326f12d7f | e3edd40d287b77c43ac7b822c93d84e43229fd0c | MehradShm/AlgorithmCodes | /SomeProblems/borj.cpp | C++ | cpp | 1,699 | no_license | #include<iostream>
#include <vector>
#include <queue>
using namespace std;
int n , e , s;
int d[1000] , yal[1000][1000] , tb[1000];
bool myali[1000][1000] , mark[1000];
vector<int>c[1000];
vector<pair<int,int> > y;
queue<int> bq;
void DFS(int x)
{
for(int i=0;i<c[x].size();i++)
if(mark[c[x][i]]==0 and ... |
681ef59f936d5cadfff86f70fc39695f4a1c1ed2 | 456c5e064ad237623edfc3b983a769fa0a6e4705 | tankche1/ACM-NOI | /tc++/rush/bzoj1716.cpp | C++ | cpp | 1,613 | no_license | # include<stdio.h>
# include<string.h>
# include<algorithm>
using namespace std;
const int maxn=10000+120*120+10;
const int INF=~0U>>1;
int n,m;
int v[110],c[110],t;
int f1[maxn],f2[maxn];
struct que{
int v,cnt;
};
que q[10010];
int main(){
m=0;
scanf("%d%d",&n,&t);
for(int i=1;i<=n;i++)
scan... |
13c0d6621f5c2ef0b1eba99b97bca2beb304db2a | fb17acdb795757b3deade7a7f1523e4871f1ec32 | XuTangle/characterization_s5p6818 | /ASB64/src/mpegts/NXP_MP2TSCaptureMgr.cpp | C++ | cpp | 34,989 | no_license | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h> // _IOW
#include <fcntl.h> // open
#include <unistd.h> // close
#include "NXP_MP2TSCaptureMgr.h"
#include "DbgMsg.h"
#define CFG_LGDT3305 (1)
#define CFG_SMS3230 (0)
#define CFG_BYPASS_DUMP ... |
41762a338f93dcfc94b5138878214e17155a72a3 | 87ee907a76049296cca04e1395787d56074197ba | iridium-browser/iridium-browser | /third_party/pdfium/xfa/fxfa/parser/cxfa_variables.cpp | C++ | cpp | 1,375 | permissive | // Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fxfa/parser/cxfa_variables.h"
#include "fxjs/xfa/cjx_container.h"
#include "xfa/f... |
6c5329bb84ffdd3a8ef598ba3a419efc3748be51 | 221aa9d77182ce2cf490cd74dbb2b3ac78e88bd4 | rtorfeh/Gridcoin-master | /src/qt/bitcoin.cpp | C++ | cpp | 11,034 | permissive | /*
* W.J. van der Laan 2011-2012
*/
#include <QApplication>
#include "bitcoingui.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#include "guiutil.h"
#include "guiconstants.h"
#include "init.h"
#include "util.h"
#include "ui_interface.h"
#include "paymentserver.h"
#include "splashscre... |
fe260980450d1db2241d3235a24a02cb56181ebc | 4b0ff8b059bf19e1c078d0d998c996dba31ae90b | ahmedtahami/OOPF20 | /Lab4/Q2/Employee.cpp | C++ | cpp | 950 | no_license | #include "Employee.h"
#include <sstream>
Employee::Employee() {
Code = 0;
Name = nullptr;
DOB = "\0";
JoiningDate = "\0";
}
Employee::Employee(int code, char* name, std::string dob, std::string joiningDate) : Employee() {
Code = code;
Name = name;
DOB = dob;
JoiningDate = joiningDate;
}
void Employee::setCode(i... |
7438ec94c8c6708609430e8e12737625645b8969 | 8628a3d628b8abee49b2be47ea5b85c7d69ace64 | DaniGodin/LeafModeling | /Cpp/src/Texturing/Rasterize/Draw.hh | C++ | hh | 1,615 | no_license | //
// Created by revetoon on 5/12/19.
//
#ifndef OBJPARSER_DRAW_HH
#define OBJPARSER_DRAW_HH
#include <cstdint>
#include <vector>
#include "Edge.hh"
#include "../Texture.hh"
#include "RasterPoint.hh"
class Draw {
public:
static uint8_t *drawTriangle(uint8_t *pxls,
double x1, dou... |
8ef72cdcdad71869ec2dc673a11a8067fa5529cd | 64e7f349b11370456b72e4578eb4dda5e229e4c0 | ddosakura/pet-shop | /llvm-testing/n3/see4/main.cpp | C++ | cpp | 519 | permissive | #include<cstdio>
struct Ctx {
long long a1;
long long a2;
};
long long bar(Ctx *a, long long b1, long long b2) {
printf("%lld %lld %lld %lld\n", a->a1, a->a2, b1, b2);
return (a->a1+b1)*(a->a2+b2);
}
auto foo(long long a1, long long a2) {
Ctx c;
c.a1 = a1;
c.a2 = a2;
// warning: addre... |
749c0ffb6cacf9d5d408ba4436f707f75ef5c9bc | 995518d0bf48d67cf07e5925310880ed504d1913 | acr-official/acreage-master | /src/qt/paymentserver.cpp | C++ | cpp | 24,985 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Acr developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.p... |
d060313d29d2ba53355351db2873c783f260d3cd | 547d6fe1948863e8125e71f03507ad7d4ccdfada | Mishrasubha/napari-toolbox | /napari_gateway/cpp/sci_pyTrace.cpp | C++ | cpp | 987 | no_license | /*
* scipython ( http://forge.scilab.org/index.php/p/pims ) - This file is part of scipython
* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as pa... |
cec43846f039af7c59ab55e3f3d63865f179ab1a | 38c09c1fdc8c8bf567feadda99730f0530c8db14 | Shrey19702/Student_dEV | /DSA general Q/DP/maximum_subarray_sum.cpp | C++ | cpp | 576 | no_license | #include<bits/stdc++.h>
using namespace std;
int maxSubArray(vector<int>& nums) {
int max_so_far=nums[0];
int max_now=nums[0];
for( int x=1;x<nums.size();x++){
max_now=max(max_now+nums[x],nums[x]);
max_so_far=max(max_so_far,max_now);
}
return max_so_far;
}
... |
6bbf7ee5a5e69aa117d7d9bf35cf964e724da573 | 8a3b22dac54a0a5b30e7508cf0d13f713b4cc804 | daniel-be/delaunay-rnd | /delaunay_rnd/geometry_utils.hpp | C++ | hpp | 350 | no_license | #pragma once
#include <memory>
#include "edge.hpp"
#include "geometry.hpp"
double ccw(const Point& a, const Point& b, const Point& c);
bool right_of(const Point& p, Edge* edg);
bool left_of(const Point& p, Edge* edg);
double coplanar(const Point& p, const Plane& pla);
bool in_circle(const Point& a, const Point& b, con... |
49a98b9cd2a22bd55e1238f819f9ceea2726239d | 5bf6de900cc31da1aa92c1c78e56b570d71b911e | marcuserronius/webkit | /Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp | C++ | cpp | 58,656 | no_license | /*
* Copyright (C) 2010, 2011, 2012 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of ... |
6acf9882e470352307e5a33c63e6c5a35f4511e7 | eb5e88d37a095efd56849cc4dd0a372adc7d5045 | bearwithdog/rocThrust | /test/test_device_ptr.cpp | C++ | cpp | 4,626 | permissive | /*
* Copyright 2008-2013 NVIDIA Corporation
* Modifications Copyright© 2019 Advanced Micro Devices, 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
*
* ... |
0bfca7c5cde683b12f7828409c752aae0818fc72 | 5a388ac479d36bd99ed5bf9637c0bf78205b5b84 | gitter-badger/azerothcore | /src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp | C++ | cpp | 6,722 | no_license | /*
REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "naxxramas.h"
#include "Player.h"
enum Says
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_TAUNT = 2,
SAY_DEATH = 3
};
enum Sp... |
ced5a0055c07a80935f0a6ce8e53b416db78aac9 | a2517db922b74131772f75c8186c8496c375459a | nk0leg/sdl_core_winport | /src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc | C++ | cc | 5,884 | no_license | /*
* Copyright (c) 2013, Ford Motor Company
* 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 condit... |
138fcbad17125821a0204327ab2f0fa53fd34417 | 1cef82cbe3fe6717d661096acf16a033b885437e | kornwilliams/linux_server | /lht/shopping_cart_proxy/base_request.cc | C++ | cc | 1,396 | no_license | #include <sstream>
#include "base_request.h"
#include "base/logging.h"
#include "rapidjson/prettywriter.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/document.h"
using namespace rapidjson;
using namespace std;
namespace lht {
namespace fcgi {
bool BaseRequest::Response() {
if (!fcgi_out_) {
LOG_WA... |
433b4eb3662c6659f6531b9eed6f145afc1c9db2 | 3791db7dc4efc95593594f45365fd705ac6715a3 | diorahman/folly | /folly/io/async/AsyncSSLSocket.cpp | C++ | cpp | 62,969 | permissive | /*
* Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
e85f49bf058f2968d503280ca5b5e351508df8d4 | 7b3040deeceabb61102bc6b1cae154f21c92cc19 | liq07lzucn/murphs-code-repository | /G4/SecElectronDistribution/src/AnalysisMessenger.cc | C++ | cc | 952 | no_license | #include "AnalysisMessenger.hh"
#include "Analysis.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
AnalysisMessenger::AnalysisMessenger(){
/* Command Directory */
AnalysisDir = new G4UIdirectory("/Analysis/");
AnalysisDir->SetGuidance("Analysis Commands"... |
8940cb9bc355ca7e3c7e381c63bf3f025e165b03 | 4512d3ae3eaa756f6ea6d6e668cb3541b825ecc0 | novaParaboy/STL-Codes | /array.cpp | C++ | cpp | 550 | no_license | #include <iostream>
#include <array>
#include <algorithm>
using namespace std;
void display(array<int, 5> &a)
{
for (auto it = a.begin(); it != a.end(); it++)
{
cout << *it << " ";
}
}
int main()
{
array<int, 5> arr;
for (int i = 0; i < 5; i++)
{
cin >> arr[i];
}
dis... |
5fc4fef3f2a482366b750f2ad16724b102ce7886 | 6a1aea91e1239f06ec0dbbf965b5dde6f60aeb8b | vslavik/poedit | /deps/boost/libs/filesystem/bug/bug.cpp | C++ | cpp | 580 | permissive | // filesystem/bug/bug.cpp
#include <boost/detail/lightweight_test_report.hpp>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
int test_main(int, char*[]) // note name
{
BOOST_TEST(2 + 2 == 5); // one convertible-to-bool argument
BOOST_TEST_EQ(4 + 4, 9); // two EqualityComparible... |
6a7db166fd79959b82f744495564db26ec4b2f9e | 1b6262919fc81f06415ac011bc05b03efe97e039 | prestocore/browser | /modules/display/webfont_manager.cpp | C++ | cpp | 28,439 | no_license | /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2005-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#include "core/pch.h"
#include "modules/display/webfont_manager.... |
57c14b5038b4e63c8f446243829c3721c53c7d75 | 959b2210a4a43c96d40db95f03d0dcf090a42a6a | NolaDonato/GearVRf | /GVRf/Framework/framework/src/main/jni/objects/textures/bitmap_image.cpp | C++ | cpp | 5,464 | permissive | /* Copyright 2015 Samsung Electronics Co., LTD
*
* 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... |
f3e74085d88b2dab2b706c216c7e64746ef63a22 | 27a29facf6a9bbc35dfce9bfd43956288e2f850b | bsnton/TON-Compiler | /llvm/projects/ton-compiler/cpp-sdk/tvm/schema/make_parser.hpp | C++ | hpp | 8,347 | permissive | #pragma once
#include <tvm/error_code.hpp>
#include <tvm/parser.hpp>
#include <tvm/schema/basics.hpp>
#include <tvm/schema/message.hpp>
#include <tvm/schema/parser/struct_parser.hpp>
#include <tvm/schema/parser/variant_parser.hpp>
#include <tvm/schema/parser/dynamic_field_parser.hpp>
namespace tvm { inline namespace ... |
2077fc83a15711afc0a6de709e58ddd92d42a497 | 0b5b0c14d662d800cc4ebd992a4e9e748e74a45c | hao5119266/PAT- | /B1011 A+B 和 C.cpp | C++ | cpp | 960 | no_license | /*
给定区间 [−2
31
,2
31
] 内的 3 个整数 A、B 和 C,请判断 A+B 是否大于 C。
输入格式:
输入第 1 行给出正整数 T (≤10),是测试用例的个数。随后给出 T 组测试用例,每组占一行,顺序给出 A、B 和 C。整数间以空格分隔。
输出格式:
对每组测试用例,在一行中输出 Case #X: true 如果 A+B>C,否则输出 Case #X: false,其中 X 是测试用例的编号(从 1 开始)。
输入样例:
4
1 2 3
2 3 4
2147483647 0 2147483646
0 -2147483648 -2147483647
输出样例:
Case #1: fal... |
5f2db52d0e07838f60da3b56be7f19addb0fa504 | 07b63bf4bd1924eaaf7d19a07965676faeda6c13 | benmarder/CourseBid | /CourseBid/FileStorageLib/Student.cpp | C++ | cpp | 1,080 | no_license | #include "Student.h"
Student::Student(){}
Student::~Student(){}
Student::Student(string idVal, int pointsVal, string nameVal, vector<string> courses, map<string, int> pointsPerCourseVal) :id(idVal), points(pointsVal),
name(nameVal), completedCourses(courses), pointsPerCourse(pointsPerCourseVal) {}
string Student::... |
d56dfc3b9aa0b6be26c8b0644f24a4adab13d651 | 17c9c7286f54b2a2c4613d526c3d4fd4ed60cb4b | vladutmargineanu/Airplane-Engine-Graphics | /Source/Laboratoare/Tema2/Tema2.cpp | C++ | cpp | 16,348 | permissive | #include "Tema2.h"
#include <vector>
#include <string>
#include <iostream>
#include <Core/Engine.h>
using namespace std;
namespace pool {
Tema2::Tema2()
{
}
Tema2::~Tema2()
{
}
void Tema2::Init()
{
{
camera_ = new pool::Camera(window->props.aspectRatio);
}
{
vector<Ver... |
9a9af5e23234e9a2aaa453655560df0efb287e84 | 011e7d7d0aeaab71db13bf56fa688b5abf27ed95 | niuxu18/logTracker-old | /second/download/git/gumtree/git_repos_function_467_git-2.6.5.cpp | C++ | cpp | 497 | no_license | static int cmp_ref_sorting(struct ref_sorting *s, struct ref_array_item *a, struct ref_array_item *b)
{
struct atom_value *va, *vb;
int cmp;
cmp_type cmp_type = used_atom_type[s->atom];
get_ref_atom_value(a, s->atom, &va);
get_ref_atom_value(b, s->atom, &vb);
switch (cmp_type) {
case FIELD_STR:
cmp = strcmp(v... |
92327264881692f087eba81f360c3c5b4f8bc6b1 | 94e7524f921743fec550b45fe1932041908756cd | MaxLiu129/ECE39595 | /HW/HW8Assigned/liu2244/Person.cpp | C++ | cpp | 415 | no_license | #include <iostream>
#include "Person.h"
Person::Person(long _SSN, long _phone) /* need to add initializer and constructor calls here */ {
SSN = _SSN;
phone = _phone;
std::cout << "Person" << std::endl;
}
long Person::getSSN( ) {
return SSN;
}
void Person::setSSN(long _SSN) {
SSN = _SSN;
}
long Perso... |
f2bf5208f2bf25bb0c1951691607fd3fd2d9526c | c34248486fa3b040aa5dd5f508ccbf5df9d64f4d | bino7/chromium | /third_party/WebKit/Source/web/WebUserGestureIndicator.cpp | C++ | cpp | 2,117 | permissive | /*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
02e7fa241642bafb7643015bdbfaba3ad45acf3a | f68371a534a669f02776b3085d99b6e380c4f4cb | lspgw/Kirikiroid2 | /src/core/visual/LoadBPG.cpp | C++ | cpp | 2,422 | permissive | #include "tjsCommHead.h"
#include "GraphicsLoaderIntf.h"
#include "MsgIntf.h"
#include "tjsDictionary.h"
#include <memory>
extern "C" {
#include "libbpg/libbpg.h"
}
extern void TVPInitLibAVCodec();
struct CBPGDecoderContext {
BPGDecoderContext *ctx;
CBPGDecoderContext() {
TVPInitLibAVCodec();
ctx = bpg_decoder... |
734603b1d8c34b41606f25852db3711aed89a48f | ed92dca332c05393bd789a205da55269c42cd52b | sujaelee7940/cpp | /day2/ch02_04.cpp | C++ | cpp | 686 | no_license | //============================================================================
// Name : ch02_04.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <... |
63b595f259f808683114a5ac1e48843b5ad582bf | 3890a21be5d23ed0638e76d4cfdbd714f27d5e11 | RyodoTanaka/Klampt | /Examples/contactplan.cpp | C++ | cpp | 11,871 | permissive | #include "Planning/StanceCSpace.h"
#include <KrisLibrary/planning/AnyMotionPlanner.h>
#include <KrisLibrary/utils/ioutils.h>
#include <KrisLibrary/utils/stringutils.h>
#include "Modeling/Paths.h"
#include "Modeling/MultiPath.h"
#include "IO/XmlWorld.h"
#include <time.h>
#include <KrisLibrary/Timer.h>
#include <string.h... |
494402c286bc0fe33a4f97d47c9ed2caafe0a088 | dcedd0239744f820b1683d422ec0a032eff6bff0 | jhonsu01/opentoonz | /toonz/sources/toonzlib/tstageobject.cpp | C++ | cpp | 67,805 | permissive |
#include "toonz/tstageobject.h"
// TnzLib includes
#include "toonz/tstageobjecttree.h"
#include "toonz/tstageobjectspline.h"
#include "toonz/txsheet.h"
#include "toonz/observer.h"
#include "toonz/txshlevelcolumn.h"
#include "toonz/txshcell.h"
#include "toonz/stage.h"
#include "toonz/tcamera.h"
#include "toonz/double... |
0b5cb5bcb92d655951b1e344ec35f867860def4f | a5e164ae8a12f0a907b2f8b348d8a77a9165fac6 | elemisek/AGH-OOP | /4th-term/Lab7-G2/main.cpp | C++ | cpp | 1,830 | no_license | #include "HarmonicMean.h"
#include "ArithmeticMean.h"
#include <iostream>
void calcAverage(Mean & m)
{
std::cout << "Mean type: " << m << std::endl;
m << 2.0 << 1.2 << -3 << 5.0;
std::cout << "Results: " << m.result() << std::endl;
}
int main()
{
{
std::cout << "=====-===== 1 =====-=====" << std::endl;
Harmo... |
03f27e01d6dfcf485cbbab752b2fb4617ba2f519 | 01896357aa22e969dd06da88982d722527c619b5 | AbdoMahfoz/bully-election | /unit/unit.cpp | C++ | cpp | 891 | no_license | #include "unit.h"
std::map<unitData, std::thread*> unit::others;
std::string unit::acceptPort, unit::discoverPort, unit::myId;
int unit::coordId;
tcpSocket unit::acceptSocket;
std::thread *unit::acceptThread, *unit::offerThread, *unit::electionsThread;
std::mutex unit::othersMutex, unit::coordMutex;
bool unit:... |
16d0e47ee307997a66cd3bcfb1226898d7baec35 | 3fdd0c289b937d0c74dabb5b4164a385f1905a9c | winksaville/fuchsia | /src/ledger/bin/encryption/fake/fake_encryption_service_factory.cc | C++ | cc | 751 | permissive | // Copyright 2018 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 "src/ledger/bin/encryption/fake/fake_encryption_service_factory.h"
#include "src/ledger/bin/encryption/fake/fake_encryption_service.h"
namespace... |
7a1addd32dd10d796450503b3e10cafa237607d2 | 7504930e64640897508762e1a4823a4d8afd9a0c | MaxiGundan/TestGameNendIconAd | /Classes/AppDelegate.cpp | C++ | cpp | 3,022 | no_license | #include "AppDelegate.h"
//#include "HelloWorldScene.h"
#include "TitleScene.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "IconAdManagerC.h"
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "IconAdNative.h"
#endif
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
bo... |
c722da7f5fe0066392d5f2bf4b9f902f9b3b4c78 | 80248c013642efdf9b1a7eacea5d026a09c0911b | seokid/FineMine | /Source/FindMine/Effect/WraithMissile.cpp | C++ | cpp | 1,600 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "WraithMissile.h"
AWraithMissile::AWraithMissile()
{
PrimaryActorTick.bCanEverTick = true;
static ConstructorHelpers::FObjectFinder<UParticleSystem> Asset(TEXT("ParticleSystem'/Game/InfinityBladeEffects/Effects/FX_Ambient/Fire... |
38110d84c5191059911c6581828ed07b37eb9479 | 58b148dce01837ca705ced0c934aecd657e0eb06 | Unix4ever/engine | /PlugIns/ImGUI/src/ogre/ImguiOgreWrapper.cpp | C++ | cpp | 20,195 | permissive | /*
-----------------------------------------------------------------------------
This file is a part of Gsage engine
Copyright (c) 2014-2017 Artem Chernyshev
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 th... |
3d59961ffb1f65ffabc28ba0c4708c8898d1e479 | 9da788b8d46e299de0c0418685b8cee655847feb | WhiZTiM/coliru | /Archive2/86/6c263e7b23be5b/main.cpp | C++ | cpp | 629 | no_license | #include <iostream>
#include <vector>
int main()
{
try {
std::cout << "Throwing an integer exception...\n";
throw int(42);
} catch( int i ) {
std::cout << " the integer exception was caught, with value: " << i << '\n';
}
try {
std::cout << "Creating a vector of size 5... |
3032498e4f312832291a3b0dfd77cd773c932b88 | 780f9f35afc7a35c92b2636017acd7ca87874f1a | vxl/vxl | /core/vgui/tests/test_pixels.cxx | C++ | cxx | 3,526 | no_license | // \author fsm
#include <iostream>
#ifdef _MSC_VER
# include "vcl_msvc_warnings.h"
#endif
#include "vul/vul_sprintf.h"
#include "vgui/vgui_gl.h"
#include "vgui/vgui_pixel.h"
#include "testlib/testlib_test.h"
#if 0 // two unused "static" functions
static
void print_byte(GLubyte w)
{
for (int i=7; i>=0; --i)
i... |
3c05d496a6a4f143ce740009b75b8318a649bf44 | 4c6dd2ebdd12090e4841b9a28db3747ef37f4143 | tienit150198/ACM | /Contest/ContestO8_Advance2/ACM02_P04_1/main.cpp | C++ | cpp | 698 | no_license | #include <bits/stdc++.h>
#define ll long long int
#define Max 100011
using namespace std;
ll n, k;
double res = 0;
double a[Max];
bool isCheck(double m){
ll t = 0;
for(ll i = 0 ; i < n; i++)
t += a[i]/m;
if(t >= k){
res = m;
return true;
}
return false;
}
int main()
{
... |
612dda894e63872665628215e2b445b946feb973 | 5243a8aa3ed908d70a22df7a5c6f314645277f3b | nponcian/LibroDeConocimiento | /References/SameSumSubMatrices/src/MagicSquareFinder.hpp | C++ | hpp | 329 | no_license | #ifndef SRC_MAGICSQUAREFINDER_HPP
#define SRC_MAGICSQUAREFINDER_HPP
#include <map>
#include <vector>
#include "MatrixData.hpp"
namespace src::magicsquare
{
src::data::SubMatrices getAllMagicSquaresSubMatrices(const std::vector<std::vector<int>>& matrix);
} // namespace src::magicsquare
#endif // SRC_MAGICSQUAREFI... |
5b5a9732161e58153ee060443fb0253a308f33c5 | ced97d52bf99e5317fbe0cf26a66006a811abdde | jayant246/Questions | /binary search/search_circularArray_BinarySearch.cpp | C++ | cpp | 911 | no_license | #include<iostream>
using namespace std;
int pivot(int arr[], int n, int x) {
int low = 0;
int high = n -1;
while(low <= high) {
int mid = (high + low)/2;
if(arr[mid] == x)
return mid;
else if(arr[mid] <= arr[high]) {
if(x > arr[mid] && x <= arr[high])
... |
3fab4e9bb8c50d78694c8570d048b5776ef5d571 | 509881454504759bb4e90cf707125a53dfa81cb8 | wangyanadam/CppDataStructure | /red-black-tree/RB_Tree.cpp | C++ | cpp | 9,257 | no_license | #ifndef _RB_CPP_
#define _RB_CPP_
#include "RB_Tree.hpp"
using namespace std;
RB_Tree::RB_Tree() {
root = NULL;
num_node = 0;
Copy = NULL;
Key = NULL;
Print = NULL;
}
RB_Tree::~RB_Tree() {
if (root != NULL) {
DeleteSubtree(root);
root = NULL;
}
}
Tree_Node::Tree_Node(void *elem) {
element = elem;
co... |
07d2334db2a44f4f812e3e44a1c184c9282507bd | 1cc9a2ac50611f4aa6b70f8263e6dcdd13f56351 | atrivedi397/Data-Structure-Programs-Using-C- | /Assignment 2/linked_list_1.cpp | C++ | cpp | 4,654 | no_license | #include<iostream>
using namespace std;
struct Node
{
//node definition
int data;
Node* next;
};
class Objects
{
//pointers to point head and tail
Node* head = nullptr;
Node* tail = nullptr;
public:
//function for operations
void create_node(int);
void delete_node(int);
Node*... |
498f9cfcd9dee67a3986944ce321ccc2a2364114 | e4e1f92af3c1f7fad7511934b8e813f65c0cf2f4 | ZhuLingfeng1993/netease_c_plus_plus_homework | /hw05-1/MyRectangle.cpp | C++ | cpp | 831 | no_license | #include <iostream>
#include "Screen.h"
#include "MyRectangle.h"
MyRectangle::MyRectangle(int x1, int y1,
int x2, int y2)
: x1_(x1), y1_(y1), x2_(x2), y2_(y2),
r_(255), g_(255), b_(255) {
std::cout << "myRectangle\n";
}
MyRectangle::MyRectangle() {
*this = MyRectangle(10, 10, 100,... |
1b6e97bf909f71a42eb41966d2d497a617bf125b | c97a51f42f96fbd3587a7301efa85b2155293531 | fangzhouzhang/LeetCodeCpp | /_1365HowManyNumbersAreSmallerThantheCurrentNumber.cpp | C++ | cpp | 465 | no_license | //
// Created by Fangzhou Zhang on 2020/3/1.
//
class Solution {
public:
vector<int> smallerNumbersThanCurrent(vector<int>& nums) {
vector<int> res(nums.size(), 0);
for (int i = 0; i < nums.size(); i++) {
int sum = 0;
for (int j = 0; j < nums.size(); j++) {
if... |
5a87cf6a48175f67c75099749e08880e5cd0735f | eca37ba8d41796bd345ebf3f38b591c604f2b12b | mwicat/BigRedRecorder | /Source/PluginProcessor.cpp | C++ | cpp | 8,737 | permissive | /*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin processor.
==============================================================================
*/
#include "PluginProcessor.h"
#inc... |
da63621d13b692cf88803e32c87bdbb151095de1 | 626d28674e86f6f832959693e97a2bf5814356d7 | ckchessmaster/TopDownShooter | /Source/JanuaryGame/Enemy_Character.cpp | C++ | cpp | 3,830 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "JanuaryGame.h"
#include "Enemy_Character.h"
#include "WeaponModifiers.h"
#include "Player_Character.h"
#include "Trap_Actor.h"
// Sets default values
AEnemy_Character::AEnemy_Character()
{
// Set this character to call Tick() ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.