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 |
|---|---|---|---|---|---|---|---|---|
9ecbed178d1829f29769499738c15e20368d288d | 8da149067ee37f60d5ba19632e4a36994c7e2881 | enricopuppo/openGL-template | /Template-project/apps/project/ShaderProgram.hpp | C++ | hpp | 1,132 | no_license | #ifndef SHADERPROGRAM_H
#define SHADERPROGRAM_H
#include <string>
#include <glad/glad.h>
#include "./glm/glm.hpp"
// general class for a shader program. Each program has to be defined as an instance
// of a sub-class that implements the bindAttribute and bindAttributes methods, defining all the needed attributes
clas... |
e2fb97be48385f9e37acd8b80e60045995b20b43 | 46caac5415de1109eadf0babaa60e4e8f683d58f | cricketgeek/OpenGL3DCone | /OpenGL3DBookChp1/IRenderingEngine.hpp | C++ | hpp | 880 | no_license | //
// IRenderingEngine.hpp
// OpenGL3DBookChp1
//
// Created by Mark Jones on 1/31/13.
// Copyright (c) 2013 Mark Jones. All rights reserved.
//
#ifndef OpenGL3DBookChp1_IRenderingEngine_hpp
#define OpenGL3DBookChp1_IRenderingEngine_hpp
enum DeviceOrientation {
DeviceOrientationUnknown,
DeviceOrientationP... |
f83afc4373caa7c3a68773be792a49b71bd6beea | f141abcabda646a54c53a01420f079b86c6da896 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14051/function14051_schedule_27/function14051_schedule_27.cpp | C++ | cpp | 866 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14051_schedule_27");
constant c0("c0", 4096), c1("c1", 64), c2("c2", 128);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"), ... |
7eb91a1b534a1d80d1bec2e3c7522ec1d8aefbe2 | 8169bd98a06099916ec7742f402e060ee8cd2063 | beryu98/-1 | /11_3.cpp | C++ | cpp | 2,704 | no_license | #include <stdio.h>
#include <stdlib.h>
//2017111866 황지욱
//본인은 이 소스파일을 다른 사람의 소스를 복사하지 않고 직접 작성하였습니다.
typedef struct node* nodePointer;
typedef struct node {
nodePointer llink;
int data;
nodePointer rlink;
} node;
nodePointer header = NULL;
nodePointer empty;
#define MALLOC(p,s) \
if(!((p) = (nodePointer) mallo... |
14d21dc7b9eb0186eb549da7f4a655e10e04d142 | 7b1ada40e20fb4004d879dcc215c16bf08d45a2f | lbguilherme/duvidovc-app | /java/include/com.google.android.gms.R.hpp | C++ | hpp | 1,519 | no_license | #pragma once
#include "../src/java-core.hpp"
#include <jni.h>
#include <cstdint>
#include <memory>
#include <vector>
#include "java.lang.Object.hpp"
namespace com {
namespace google {
namespace android {
namespace gms {
class R : public virtual ::java::lang::Object {
public:
static jclass _class;
... |
47439f84143ccdf3d39e71fcf0161c1010d4088e | bc0b1990d77b4792cf8ed7770afc5dc8fcdc227e | TencentCloud/tencentcloud-sdk-cpp | /sqlserver/src/v20180328/model/Backup.cpp | C++ | cpp | 18,814 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
0ab14acc6479880d1f67c73561c5c24e1025af5d | 4b1e2d68a4004e8b9709ecb798db3806ad3bbc47 | xyangui/GStation | /GStation/surfaceseries.cpp | C++ | cpp | 8,372 | no_license | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "surfaceseries.h"
// Dispatch interfaces referen... |
755f45f53f6eb32c5d518fc7b9b4fbae582b72a3 | 0b2be09c77d663007e599bc75c1834e811762b7e | Samsung/Castanets | /remoting/host/host_window.cc | C++ | cc | 338 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/host/host_window.h"
namespace remoting {
HostWindow::~HostWindow() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
} // n... |
74e5442b23fc6db55afcf5d56ca13d2916905386 | c95f9d2b9f7d0a18d2f7bd948505b38d65d10b15 | masumr/problem_solve | /code/light_oj_1053.cpp | C++ | cpp | 424 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
ll a[4],b,c,s;
int i,t;
cin>>t;
for(i=1;i<=t;i++)
{
for(int j=0;j<3;j++)
cin>>a[j];
sort(a,a+3);
s=sqrt((a[0]*a[0])+(a[1]*a[1]));
printf("Case %d: ",i);
... |
0eb60bcf89ed83a52d6ff2205de66eeaa06214f3 | faabb0da03b299ccfc68025e9ea741f12efaec46 | zxh1987/UbuntuTouchAddFile | /hardware/imx/mx6/power/power.cpp | C++ | cpp | 4,633 | no_license | /*
* Copyright (C) 2012 The Android Open Source Project
* Copyright (C) 2012 Freescale Semiconductor, 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.o... |
7895a453ec16b8c40bf4d711bcb176fb77f23be8 | 9c03ef71437eda12d73d1ee8cc3aad5e149f3aa2 | yoya/misc | /c++/npy/npywrite.cpp | C++ | cpp | 2,332 | no_license | /*
* Copyright 2019/11/20- yoya@awm.jp
*/
#include <fstream>
#include <string>
#include <map>
#include <vector>
#include <sstream>
#include <utility>
#include <numeric>
#include <functional>
#include "npy.hpp"
void writeNPYheader(std::ofstream &fout,
const struct NPYheader_t &nh) {
std::strin... |
2bcbee8dcce59017248d6b179d7a2693daf65716 | 6d3497e1f53d22e4f7bb5b11f0a6a7b51159c29e | MartinSchouwenburg/ilwisobjects | /baseoperations/source/data/serviceobject.cpp | C++ | cpp | 4,876 | no_license | /*IlwisObjects is a framework for analysis, processing and visualization of remote sensing and gis data
Copyright (C) 2018 52n North
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 versi... |
686cfd1c1c8385a69ab987ae42b4891d767d36d1 | de5bba1d11896bc88e0f1c52732bb3bfea1f6590 | Q10Viking/ACM_ICPC | /Online_judge/HDU/hdoj_4490.cpp | C++ | cpp | 2,971 | no_license | #include <iostream>
#include <cstdio>
#include <ctime>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef unsigned long long LL;
const int N = 50;
int vis[N][N][N] , pre[N][N][N];
int X , Y , Z , a[3][3];
struct Node {
i... |
7031adaaf0edf0bccf71f95d89ead23d70e6d554 | 481176e4ce403b0fd270aaa4be0e7e4df1c7708f | AnthonyUdovichenko/VM_Placement | /algorithms.hpp | C++ | hpp | 2,838 | no_license | #pragma once
#include <iostream>
#include <vector>
#include "mishra_sahoo_method.hpp"
class Algorithms {
public:
static int FirstFit(const std::vector<std::vector<long double>>& servers, const std::vector<long double>& vm) {
for (int i = 0; i < servers.size(); ++i) {
if (Fits(servers[i], vm))... |
473be34d8d8f932aa23064e1a2c566cc477ed36a | 32a57d38adabc3a22bfb981b2fca649826bd5a22 | CarlosRodriguezRamirez/reshade | /source/ini_file.cpp | C++ | cpp | 2,585 | permissive | /**
* Copyright (C) 2014 Patrick Mours. All rights reserved.
* License: https://github.com/crosire/reshade#license
*/
#include "ini_file.hpp"
#include <fstream>
namespace reshade
{
static inline void trim(std::string &str, const char *chars = " \t")
{
str.erase(0, str.find_first_not_of(chars));
str.erase(str... |
b9b8ee7687afbf686b146a9fe22e2137fc56ced1 | 2baac41fb4806ed36ad34f3004998e9a03446d89 | pventuzelo/SSVM | /lib/executor/executor.cpp | C++ | cpp | 4,178 | permissive | // SPDX-License-Identifier: Apache-2.0
#include "executor/executor.h"
#include "ast/module.h"
#include "ast/section.h"
#include "executor/instance/module.h"
#include <iostream>
namespace SSVM {
namespace Executor {
/// Set and instantiate host function. See "include/executor/executor.h".
ErrCode Executor::setHostFun... |
88c9437774a9d0f1801501cd8bdb90d7cc91950e | e697ee1b37b8bcc2b3b34a258937b22400ec2ede | maidoufu/Coursera | /Structure/week8_2.cpp | C++ | cpp | 1,287 | no_license | //
// week8_2.cpp
// Structure
//
// Created by Song on 1/19/16.
// Copyright © 2016 Song. All rights reserved.
//
#include <stdio.h>
#include <iostream>
#include <cstring>
#include <vector>
#include <queue>
using namespace std;
int num_v;
int num_e;
struct compare
{
bool operator()(const int&l, const int &r) ... |
302622f5cc8968f23cec771b188aaf475acefdf1 | 60d245f83ee9c6bede9d8800fe1757ab454feabf | dekamps/miind | /libs/GeomLib/GeomInputConvertor.hpp | C++ | hpp | 5,174 | permissive | // Copyright (c) 2005 - 2014 Marc de Kamps
// 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 condition... |
dd1f5845a2d7b6986502ba830d327910fe59db0d | 6a9b3022e60bbb05d5919cbf67f794252a6bd88a | DLHell/CST-136 | /Lab 6/PsuedoCode.cpp | C++ | cpp | 3,641 | no_license | /****** Pseudo Code thought process so far: ******
WINNER WINNER CHICKEN DINNER, LET'S GO
Entire thing under a do while loop?
Give player option to leave, so 2 part menu - 1. play, 2. exit
Place the bets. (Make sure player can't bet over their bankroll or in decimals)
Player starts off with a cool grand.
deck.Shuff... |
62be2528c951544224dcefc73f72c5eed40b4d43 | 7ae568c5ae53a3db3edd9c9bf77d00a0839de19c | google/swiftshader | /third_party/llvm-16.0/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp | C++ | cpp | 2,087 | permissive | //===- DXILPrettyPrinter.cpp - DXIL Resource helper objects ---------------===//
//
// 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
//
//===---------------------------... |
8035918921346fabb1054a87474a2492438b6436 | 9874248275b6e96dd3f1f7399a06d822ae2e79c7 | ksatyendra/REF | /C++ REF/sortstr.cpp | C++ | cpp | 1,522 | no_license | // sortstr.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "sortstr.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// The one and o... |
bc9701a6a3be6e5270e8ca0231a41c1e7d941555 | 3a03b683153ee63e5e41325f01db9e872b4679ab | sdlyyxy/oi_code | /uva/uva10881.cpp | C++ | cpp | 1,229 | no_license | #include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string>
#include<cstring>
#include<cctype>
#include<vector>
#include<cstdlib>
#include<ctime>
using namespace std;
#define REP(i,begin,end) for(int (i)=(begin);(i)<(end);i++)
const int maxn=10000+5;
const char dirName[][10]={"L","Turning",... |
330bce57a82e97279c70f8cf93f47d67fdbc0337 | 54e52bc30084ffa03aa5bad4765ac8cd228996d5 | violarulan/PUBG-SDK | /SDK/PUBG_P_Environment_Bird_02_BP_parameters.hpp | C++ | hpp | 526 | no_license | #pragma once
// PLAYERUNKNOWN'S BATTLEGROUNDS (2.5.26) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Parameters
//--------------------------------------------------------------------------... |
9973a85e9e1476293d90db157b0971258eb3a713 | 3a1f77c9724df00b8186f11e4ced008acfcfe37f | nathanjahnke/norichan | /norichan/deinterlacer.cpp | C++ | cpp | 14,025 | permissive | #include "deinterlacer.h"
Deinterlacer::Deinterlacer(QObject *parent) : QObject(parent)
,width(0)
,height(0)
,linewidth(0)
,mfd_prevFrame(0)
,mfd_moving(0)
,mfd_fmoving(0)
,mfd_threshold(15)
,bDenoise(false)
,bMotionOnly(false)
{
}
Deinterlacer::~Deinterlacer() ... |
f3fa58274efe0f80246c5a50cb2557bbe7be7169 | 1c274c9697d97b86c5009027a88c5311f1dd638e | anuushka/Algorithms-Semester2 | /12/12A.cpp | C++ | cpp | 1,740 | no_license | #include <fstream>
#include <vector>
#include <queue>
using namespace std;
vector <vector <int>> graph;
int u, v;
queue<int> q;
vector<bool> visited;
vector <int> parent;
bool BFS(int s, int t)
{
visited.assign(graph.size(), false);
q.push(s);
visited[s] = true;
while (!q.empty())... |
89216cddbc4971afe80974d04c97edb5353f82f6 | 11403d10ddaa27b648ddfd14228dd0e2f7325d3c | timkrentz/SunTracker | /IMU/VTK-6.2.0/Parallel/Core/vtkMultiProcessController.cxx | C++ | cxx | 25,307 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkMultiProcessController.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
... |
9b29e8dc7ca1a693a6d1a73b85f15552a0ec562f | 1cd54bb760dc8f8486589fb428a83f3deb0e5d43 | ryaminal/watchman | /watchman/query/glob.cpp | C++ | cpp | 7,354 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <folly/ScopeGuard.h>
#include <memory>
#include "watchman/CommandRegistry.h"
#include "watchman/Errors.h"
#include "watchm... |
501b4969c75897db849f35d6b170dd3096ee7bc5 | 5a4d4bea89cbafd04d274392a62b562270b53f13 | lpanian/lptoolkit | /tests/unit/quaternion_test.cpp | C++ | cpp | 7,807 | no_license | #include "toolkit/quaternion.hh"
#include <gtest/gtest.h>
using namespace lptk;
TEST(QuaternionTest, Ctor)
{
const quatf basic(1.f, 2.f, 3.f, 4.f);
EXPECT_EQ(basic.a, 1.f);
EXPECT_EQ(basic.b, 2.f);
EXPECT_EQ(basic.c, 3.f);
EXPECT_EQ(basic.r, 4.f);
const quatf basic2(v3f(1.f, 2.f, 3.f), 4.f);
... |
3c85899a6dc3352548d03eb321155672789f98a7 | 0ed26293bfb3e12ffa41f9eb1845efc3af0df5d4 | 4lhc/drake | /solvers/constraint.cc | C++ | cc | 18,866 | permissive | #include "drake/solvers/constraint.h"
#include <cmath>
#include <limits>
#include <set>
#include <unordered_map>
#include <fmt/format.h>
#include "drake/common/symbolic_decompose.h"
#include "drake/math/autodiff_gradient.h"
#include "drake/math/matrix_util.h"
using std::abs;
namespace drake {
namespace solvers {
... |
f13f1ffccd8dc54b652914a3bcef0b09e4cbe82a | 5011501cf98a6ffac28e2a11b7f7219e0a7ec20f | howardroark2018/chromium | /ppapi/proxy/nacl_message_scanner.cc | C++ | cc | 20,555 | permissive | // Copyright 2013 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 "ppapi/proxy/nacl_message_scanner.h"
#include <stddef.h>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "build/build_con... |
4045e0e9768cd520c8681ca25fdfffbe3dd6922b | b154586d17e29027f748350ba07f75acb35702d1 | FireFox2000000/GbaGameEngine | /GbaGameEngine/src/engine/gba/graphics/GBAGraphics_DrawTilemap.cpp | C++ | cpp | 17,033 | no_license | #include "GBAGraphics.h"
#include "engine/gba/registers/display/GBADisplayControl.h"
#include "engine/gba/graphics/tilemap/GBATilemap.h"
#include "engine/gba/registers/clock/GBATimer.h"
#include "engine/math/Vector2.h"
#include "engine/base/core/stl/FixedPoint.h"
#include "engine/screen/Screen.h"
#include "engin... |
ffe833621b87001c87d704825e95dbcf8ca7c463 | 4f2fec8b949ca632deaf848241400b469b3c4845 | rranjik/ideal-octo-barnacle | /5-LongestPalindromicSubstring.cpp | C++ | cpp | 794 | no_license | class Solution {
public:
string longestPalindrome(string s) {
if(s.length()==0||s.length()==1)
return s;
vector<vector<bool>> isPal = vector<vector<bool>>(s.length(), vector<bool>(s.length(), false));
int l = 0;
int r = 0;
for(int j = 1; j<s.length(); j++... |
c8e663a0141916cb3d8df93505d3b4c404da6607 | 5913b2b3bb4491455c58b1c55ec43dbf14b0b80b | BackupTheBerlios/fluxbox-svn | /tags/Release-0_9_3/src/Keys.cc | C++ | cc | 22,225 | permissive | // Keys.cc for Fluxbox - an X11 Window manager
// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen(at)users.sourceforge.net)
//
// 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 re... |
71418f61eb268176065e63e2c9f921b0b73f0d6a | 5aaf078c9370bfca7b1f86638106763dd1ce9a2f | will-crawford/HackerRank | /Algorithms/Game Theory/nimble-game-1.cxx | C++ | cxx | 593 | permissive | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int T; cin >> T; while ( --T >= 0 ) {
int n, ci, xs = 0;
cin >> n;
//cerr << dec << n << endl;
for ( int i = 0; i < n; ++i ) {
cin >> ci;
... |
c7504266466c202789c8f7af3a86a1d57f6f4256 | 499e74243cc05262f75675037c949b16e4c625fe | inzamamtoha/ProblemSolving_Algorithms | /Number Theory and Sort/1088.cpp | C++ | cpp | 1,331 | no_license | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int n;
int lower(int a[],int x)
{
int high,mid,low,i,j,k,index;
index=-1;
low=0;
high=n-1;
while(low<=high)
{
mid=(low+high)/2;
if(x==a[mid])
{
index=mid;
... |
77f872982126956d0372c675087429fcb2a5c870 | 20abdb04bf70f561a24c058548d40e47b875b50e | hesam4g/iust-data-structure | /Practice/Huffman/Huffman/hoffman.cpp | C++ | cpp | 1,220 | no_license | #include "hoffman.h"
#include <iostream>
using namespace std;
Hoffman::Hoffman(){
MinHeap heap(50);
char sign;
int freq;
cout<<"Please enter your desired charecter and its frequency respectively: ";
cin>>sign>>freq;
while(sign != '&'){
Node* temp = new Node(freq,sign,0,0);
... |
e1710d0ea9990627fee2c8b7915eba8e817f02c9 | 512dd7f91bbbfb8a6e606406180205098f33fb4d | zxker/CCF-CSP | /最优配餐.cpp | C++ | cpp | 1,061 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX_N=1005;
ll ans[MAX_N][MAX_N];
int cg[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
bool vst[MAX_N][MAX_N],a[MAX_N][MAX_N];
struct po{
int x,y;
ll num;
po(int xx,int yy,ll ff){
x=xx;
y=yy;
num=ff;
}
};
int n,m,k,d;
vector<p... |
ba38faa6554b2b85e0797f35315e308e8c5a9813 | 46355c574fdf72087616f4e989a6877b40812ce9 | NewtonVan/DataBackup | /src/header.cpp | C++ | cpp | 5,590 | no_license | #include "header.h"
int Header::Serialize(int backup_fd) const
{
if(backup_fd<0) {
return -1;
}
if(
write(backup_fd, &file_path_len_, sizeof(file_path_len_)) != sizeof(file_path_len_) ||
write(backup_fd, &ln_path_len_, sizeof(ln_path_len_)) != sizeof(ln_path_len_) ||
writ... |
87bc3c911dda6ebdea5a4fade0e21d5396794380 | 82efebe70698f24dbeffb48fee618dc4392255b0 | Giova262/Taller-de-Programacion-I | /ContraRemake/Utils/ServerParser.cpp | C++ | cpp | 7,491 | no_license | /*
* ServerParser.cpp
* Author: synergy
*/
#include "ServerParser.hh"
namespace std {
ServerParser::ServerParser() {
this->maximumquantityclients = 0;
this->port = 0;
this->fileConfigLoaded = false;
this->defaultfileConfigLoaded = false;
this->tiXmlFileConfig = NULL;
this->tiXmlDefaultFileConfig = NULL... |
c30d6b5571a1e80593d053b55bd4c0660d3795af | c87d24b040b2227355bc9909c92e91edd56805e6 | alibaba/heterogeneity-aware-lowering-and-optimization | /tests/unittests/lit_cases/test_popart/test_bitshift_left_uint16_popart.cc | C++ | cc | 2,048 | permissive | //===-test_bitshift_left_uint16_popart.cc-----------------------------------------------------------===//
//
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obta... |
97ccad68ef50a39d3f5b77186b8707e498fe4c9c | df620fd89f4e548b085719bdf11c9deed97c982b | CrackerCat/xstd | /includes/xstd/transform.hpp | C++ | hpp | 3,472 | permissive | // Copyright (c) 2020, Can Boluk
// 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 conditions... |
f8bfa6f581233550ec3ac6093db99b0c2501acf8 | 7d57a65783d6ab21c706355314ab910a36e8799e | gustav0leal/OBI | /contest4/B.cpp | C++ | cpp | 478 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=110;
const ll mod=998244353LL;
int vet[N];
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int n,c,m;
cin>>n>>c>>m;
int resp=c;
for (int i = 0; i < c; ++i)
{
int x;
cin>>x;
vet[x]=1;
... |
4f767c48c0ee5cb5fe88609dfea19f9c147a1c0c | 18b9e7b849117273cb736c44a9149079eaac8da8 | antonidass/BaumanStudy | /sem4/OOP/lab_01/lab_01/utils.cpp | C++ | cpp | 221 | no_license | #include "utils.h"
#include "constants.h"
#include "math.h"
double getCosAngle(const double &angle) {
return cos(angle * PI / 180);
}
double getSinAngle(const double &angle) {
return sin(angle * PI / 180);
}
|
71425c15b46461de5b42959dd166862dcfa7b9c5 | eeae1f311832a15e2cc218e282dc70737864727e | steps3d/graphics-book | /Code/Chapter-4/raytri.cpp | C++ | cpp | 942 | permissive | #define GLM_FORCE_RADIANS
#define GLM_SWIZZLE
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/geometric.hpp>
#include "ray.h"
#define EPS 0.0001f
bool rayTriangleIntersect ( const ray& ray,
const glm::v... |
51e54441dfa2e78f96a51abea484db983c5932c9 | 2e615543b9fa61f33dcbcd60d374cbad4c9f86bc | GitYuanZi/Coherent_wind | /main.cpp | C++ | cpp | 285 | no_license | #include "mainwindow.h"
#include <QApplication>
#include <QtCore>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setWindowIcon(QIcon(":/images/Convert"));
QFont font("Microsoft YaHei UI");
app.setFont(font);
MainWindow w;
w.show();
return app.exec();
}
|
03a76e3cbf92647f7e083b42313e0ad7eee79b64 | 7028259f2149b8ba0ecbf5ec3ede88edcfe2d8a8 | childmodel/child | /Child/Releases/r081211/Code/tMesh/TipperTriangulatorError.cpp | C++ | cpp | 488 | permissive | /***************************************************************************/
/**
** @file
** @brief Error handler for Tipper triangulator
*/
/***************************************************************************/
#include "TipperTriangulator.h"
#if defined(TIPPER_TEST)
# include <stdlib.h>
#else
# include ".... |
7db4848c88fac99e196cc93ec13d00e6fa0f0f09 | b4ce8d4413bf738187cacbbe5ee6ff5002ff1ae6 | luisfmiranda/ProgrammingQuestions | /stacksAndQueues/redundantBraces.cpp | C++ | cpp | 830 | no_license | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
/*
* - Problem:
* Redundant Braces
*
* - Problem description:
* Write a program to validate if the input string has redundant braces.
*/
int redundantBraces(string exp) {
int count = 0; // acts as a stack
vector<char> ops = {'+... |
9f9a8810018d27f067e0d007eecabf8def1b1f52 | 9ebd95d9cdaa428e5eabf92e14c6f339a8ccea77 | MarkGHX/webnn-native | /src/tests/end2end/DeviceSelectionTests.cpp | C++ | cpp | 11,479 | permissive | // Copyright 2021 The WebNN-native 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 ... |
e20cc735f16aef559bdd1094b0a77110f431a3ca | 0b802392d6a4a426ce8802d605f2a1a61546bf0e | iniyannatarajan/pyimager-olegs-mods | /MAC/APL/PIC/RSP_Driver/src/TDSStatusWrite.cc | C++ | cc | 3,676 | no_license | //# TDSStatusWrite.cc: implementation of the TDSStatusWrite class
//#
//# Copyright (C) 2002-2004
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under... |
bafe9627603b10624c6421b6961b0b8d99c90ac7 | 589da02728e2379d857da53a9ce9f91991f4abab | MJforever01246/aquarium | /lt3d/ConsoleApplication8/ConsoleApplication8/Plant.cpp | C++ | cpp | 594 | no_license | #include<stdlib.h>
#include<vector>
class Plant {
public:
int count = 0;
std::vector<float> X;
std::vector<float> Y;
std::vector<float> Z;
int range = 50;
void show(int count) {
for (int i = 0; i < count; i++)
add();
}
void add()
{
int x = (rand() % (range / 2))*(rand() % 2 ? 1 : -1);
int z = (rand()... |
e09bd2d2a30c09b31030952d2df620f711e43aff | 30d775b951a46544a62bbcc1197d6da40ffa8b0f | deekthesqueak/higan | /gb/cartridge/cartridge.cpp | C++ | cpp | 4,667 | no_license | #include <gb/gb.hpp>
#define CARTRIDGE_CPP
namespace GameBoy {
#include "mbc0/mbc0.cpp"
#include "mbc1/mbc1.cpp"
#include "mbc2/mbc2.cpp"
#include "mbc3/mbc3.cpp"
#include "mbc5/mbc5.cpp"
#include "mmm01/mmm01.cpp"
#include "huc1/huc1.cpp"
#include "huc3/huc3.cpp"
#include "serialization.cpp"
Cartridge cartridge;
st... |
38c688e86b6b8d1b535cd855e84619a9b3d0775c | fda45a749b7e4625f4730902bf536ad9935a24dd | owlsn/leetcode | /25.reverseKGroup/reverseKGroup.cc | C++ | cc | 1,660 | no_license | // 给你一个链表,每 k 个节点一组进行翻转,请你返回翻转后的链表。
// k 是一个正整数,它的值小于或等于链表的长度。
// 如果节点总数不是 k 的整数倍,那么请将最后剩余的节点保持原有顺序。
// 示例 :
// 给定这个链表:1->2->3->4->5
// 当 k = 2 时,应当返回: 2->1->4->3->5
// 当 k = 3 时,应当返回: 3->2->1->4->5
// 说明 :
// 你的算法只能使用常数的额外空间。
// 你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。
// 采用O(1)空间的方式,就是只对指针进行操作
// 所以每k个元素取下来,然后将之反转,然后接在原始的位... |
d017b7aca5fdd7bce47a3258b4ca986436a22248 | 3b4c4dbd58d90d0c73ab12faf5a6fb8da4b74fbe | JPETTomography/j-pet-framework-examples | /LargeBarrelAnalysis/HitFinderTools.cpp | C++ | cpp | 12,404 | permissive | /**
* @copyright Copyright 2020 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable la... |
0f225de06c9578d1691dc69cd25b6f4262c4817b | 28738cc330631be7a15dc3809015fedc3240b81f | trondrex/hamming- | /dec_hamming/Clasehamm.cpp | C++ | cpp | 1,783 | no_license | #include "Clasehamm.h"
Clasehamm::Clasehamm()
{
}
void Clasehamm::dec_error(unsigned int conta)
{
error=0;
unsigned int comparador;
int sum=0;
for(conta; conta < 9; conta<<=1)
{
i=0;
aux=0;
for(comparador=1;comparador<=12;comparador++)
{
if(conta & comparador)
{
... |
e5c23a216e7eed1cae4ca8625dfbb1a0dc58aee6 | a2c4f9fce0944806efee0f345f993f4f750d90ec | dimrirahul/programming | /codeforces/panagram/panagram.cc | C++ | cc | 1,121 | no_license | #include<bits/stdc++.h>
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define REP(I,N) FOR(I,0,N)
#define ALL(A) (A).begin(), (A).end()
using namespace std;
typedef pair <int, int> PI;
typedef vector <int> VI;
typedef vector <string> VS;
typedef long long LL;
const int SZ = 26;
class panagram {
public:
... |
a3a36d955026dc3e601628930863a330adff7440 | 0a194588b0c8d77a908f807995572bd8c2aad85d | JayXon/Leanify | /formats/gft.cpp | C++ | cpp | 676 | permissive | #include "gft.h"
#include <cstdint>
#include <iostream>
#include "../leanify.h"
const uint8_t Gft::header_magic[] = { 0x54, 0x47, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00 };
size_t Gft::Leanify(size_t size_leanified /*= 0*/) {
// header
uint32_t header_size;
if (size_ < 0x14 || size_ <= (header_size = *(uint32_t*)(... |
95f02c7c71054d07985c0f2229998c2a36fc9ba0 | 7aba4f12c9b7608f10ed9e539700513f8bf89071 | ANUJ581/competitive-programming-1 | /src/contest/coci/COCI_2015_RELATIVNOST.cc | C++ | cc | 1,811 | permissive | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define INF 1 << 30
#define MOD 10007
#define rint(x) scanf("%d", &(x))
#define rlong(x) scanf("%lld", &(x))
#define MAX_N 100000
#define MAX_C 20
#define l(x) x << 1
#define r(x) x << 1 | 1
#define m(x, y) (x + y) / 2
using namespace std;
typedef lo... |
38a029c286c5999b163b864506cf14466e08e112 | c9ed6e2c7a194176a111666702741508a9a2f90e | curiumofficial/curium | /src/timedata.cpp | C++ | cpp | 3,568 | permissive | // Copyright (c) 2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "timedata.h"
#include "netbase.h"
#include "sync.h"
#include "ui_interface.h"
#include "util.h"
#include "utilstrencodings.h"... |
4882dffeb41e0ca0bccc69448cdc0711e85835ce | b8cfc8841c4aee35d4178039f656348a80b1baf8 | KazuCocoa/profilo | /cpp/writer/StackTraceInvertingVisitor.cpp | C++ | cpp | 1,837 | permissive | /**
* Copyright 2004-present, 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 ... |
49149567ea0a758647827e8cc6acae09702203f5 | 785eeff91d6ec2c3d5839e8cb200eee4d7b2d967 | StarmanUltra/ECE4180_FINAL | /true-range-multilateration/multilat.cpp | C++ | cpp | 324 | no_license | typedef struct PointLatLon
{
float lat;
int lon;
};
typedef void (*functiontype)();
class Multilat
{
public:
int number_of_stations;
PointLatLon station_locations[number_of_stations];
PointLatLon x0 = {0, 0};
float tol = 1E-6;
int max_itter = 1000;
PointLatLon locate_strike(void);... |
f9c9c4547adc12cc54f928cbd3fdc6396cb67a9d | 29a46d925c36a070508826cb8485fa05c1222a8b | bitcointwo/bitcointwo | /src/qt/signverifymessagedialog.cpp | C++ | cpp | 8,797 | no_license | #include "signverifymessagedialog.h"
#include "ui_signverifymessagedialog.h"
#include "addressbookpage.h"
#include "base58.h"
#include "guiutil.h"
#include "init.h"
#include "main.h"
#include "optionsmodel.h"
#include "walletmodel.h"
#include "wallet.h"
#include <QClipboard>
#include <string>
#include <vector>
Sign... |
82001988e59a55270dc3b9792bf57feffb7212ac | b5125cfe734faeccd67ee57df04cee18e9045d10 | cdacamar/game_assets | /entity_handlers/entity_manager.hpp | C++ | hpp | 2,830 | no_license | #pragma once
#include <algorithm>
#include <vector>
#include <tuple>
#include <mpl/has_member.hpp>
#include <mpl/tuple_utilities.hpp>
GENERATE_HAS_MEMBER_FN(update)
GENERATE_HAS_MEMBER_FN(is_alive)
GENERATE_HAS_MEMBER_FN(draw)
namespace game_utils
{
template <typename... EntityTypes>
class entity_manager {
public:... |
b9ab3e0148354b16518edb6e959b7e472d37c196 | cf27a410e4295be308327be55c12f6df45537418 | SCell555/swarm-sdk-template | /src/game/missionchooser/asw_npcs.cpp | C++ | cpp | 9,154 | no_license | //============ Copyright (c) Valve Corporation, All rights reserved. ============
//
//
//
//===============================================================================
#include "asw_npcs.h"
#include "asw_mission_chooser.h"
#include "TileSource/MapLayout.h"
#include "TileSource/Room.h"
#include "TileSou... |
509fc71bb8a791c6ca7e26801d5fc9df838d4fb1 | 70e72a82190c7dabafd8dcb7690178d85cba5215 | divyachn/CS360Project | /shader_utils.cpp | C++ | cpp | 5,403 | no_license | /**
* From the OpenGL Programming wikibook: http://en.wikibooks.org/wiki/OpenGL_Programming
* This file is in the public domain.
* Contributors: Sylvain Beucler
*/
#include <stdio.h>
#include <stdlib.h>
#include <GL/glew.h>
/* Store all the file's contents in memory, useful to pass shaders source code to OpenGL *... |
f59ce9c49a5cbe14a7f83e602fec108c9cb96151 | 9e04fe259cd1d222701300ccf3ac89d8f2125681 | TheSkyFucker/acm-icpc | /template/math/lucas.cpp | C++ | cpp | 582 | no_license | // description : cal C(a, b) % MOD
// cal-time : O( log_{mod}^{n} )
// pre-time : O( MOD )
// inv[i] : inv(i)
// ijc[i] : inv(jc[i])
// !!!! : MOD should be a prime
int jc[MOD], ijc[MOD], inv[MOD];
int C(int a, int b) { return a < b ? 0 : mul(jc[a], mul(ijc[b], ijc[a - b])); }
int lucas(ll a, ll b) { return ! b ? 1 : m... |
febf67133f54aef64b7f47f88d6f1b1bc845974b | 22f018e6c522e26f2cdb0a7a535329ded4aa4dcd | vindru/algorithm-library | /Miscellaneous/Inverse Modulo 1 to N (Linear).cpp | C++ | cpp | 848 | no_license | int fact[MAX], inv[MAX];
int expo(int a, int b){
int res = 1;
while (b){
if (b & 1) res = (long long)res * a % MOD;
a = (long long)a * a % MOD;
b >>= 1;
}
return res;
}
void Generate(){
int i, x;
for (fact[0] = 1, i = 1; i < MAX; i++) fact[i] = ((long long)i * fact[i - 1... |
46d81917cb067ded3cd659a0f741f40b43dbf61a | b7bd70fa741595a7a03aded72bd52801cad56537 | suniljalandhra/450-DSA-Questions-and-Solution | /LinkedList/Reverse a linked list.cpp | C++ | cpp | 1,431 | no_license | // { Driver Code Starts
//Initial Template for C
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node *next;
}*start;
void insert();
void display(struct Node *head);
// } Driver Code Ends
//User function Template for C
struct Node* reverseList(struct Node *head)
{
if(he... |
f339e704b23f64be35a019839fc7bb8169b6d331 | b50b3a1d57ed49bce50eaa38ed8073a0a0568d34 | montreal91/workshop | /tutorials/airstrike-sfml/Sources/Application.hpp | C++ | hpp | 1,317 | no_license |
#pragma once
#include <string>
#include <SFML/System/Time.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Text.hpp>
#include "GameOverState.hpp"
#include "GameState.hpp"
#include "MenuState.hpp"
#include "MultiplayerGameState.hpp"
#include "MusicPlayer.hpp"
#include "KeyBinding.hpp"
#include ... |
d58ce1b1d0fdea8004f1b35c34f4c88e575ad893 | 6631bfb0df28c1311523153fa06eaadf32b87775 | triSYCL/clang | /lib/CodeGen/CGBlocks.cpp | C++ | cpp | 116,043 | permissive | //===--- CGBlocks.cpp - Emit LLVM Code for declarations ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
8933f5eb38a66da8191a1c83bbd65c446b0933c1 | ff14fa2dd14de0dd8186262f958e8cad123738b9 | MelvinV19/p3Semana6 | /Personaje.cpp | C++ | cpp | 1,358 | permissive | //Metodo sets ade gets
#include "Personaje.h"
#include "Normal.h"
#include "Especial.h"
#include "Ataque.h"
#include <iostream>
#include <string>
using namespace std;
//Cosntructor 1
Personaje::Personaje(string nombre,int HP,Normal ataqueNormal,Especial ataqueEspecial,int defensa){
this->nombre=nombre;
this-... |
f61e4bb42054d7ab22859df552693a174e62f9cd | a49c77af70215fb8046324a1cc1f06f153e22ede | SaschaMester/delicium | /content/browser/service_worker/service_worker_url_request_job.cc | C++ | cc | 27,131 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/service_worker/service_worker_url_request_job.h"
#include <map>
#include <string>
#include <vector>
#include "base/bind.h"
#in... |
10ea694ac8877357d098a6db6aff951a9f4e930f | 05ac9092f219a3218d0cedddc7dab4dd71696fd4 | Sambit0510/DSA_ASG1 | /asg1_1.cpp | C++ | cpp | 248 | no_license | #include<stdio.h>
#include<string.h>
#define int long long
const int MOD=1e9+7;
int main (){
char s[100];
gets(s);
if (s[0]=='.' || s[s.length()-1]=='.')
print("Invalid");
else
print("Valid");
return 0;
}
|
fe01ca075b4b82ce4054beaa501b47d300013696 | 9af9f896923f98f6a498376241388426fd2e8836 | EXPRESSCLUSTER/CreateCluster | /clpconf/src/clpconf.cpp | C++ | cpp | 13,587 | no_license | /**
* external functions
*/
#define _WIN32_DCOM
#include <stdio.h>
#include <Windows.h>
#include <MsXml2.h>
#include <comdef.h>
#include <stdlib.h>
#include <shlwapi.h>
#include <errno.h>
#include "clpconf.h"
#include "clpconfin.h"
/* macro */
#define RELEASE(obj) if ((obj) != NULL) { obj->Release(); (obj) = NULL;... |
404feb7d1a887c993731a775b756e18295c24542 | 01ca025e6335e01170fb50c3de3259504b2ece69 | kunalbag7/programming | /C++/Sorting.cpp | C++ | cpp | 910 | no_license | #include<bits/stdc++.h>
using namespace std;
void swap(int* xp, int* yp)
{
int temp = *xp;
*xp = *yp;
*yp = temp;
}
// Function to perform Selection Sort
void selectionSort(int arr[], int n)
{
int i, j, min_idx;
// One by one move boundary of unsorted subarray
for (i = 0; i < n - 1; i++) {
// Find the minim... |
4f2b35d7c15c70236356eef7e7a2e465cdf5ace4 | 6d4a100dfdbaba513585b0256d207e110d80ba1c | teotikalki/bitmonero | /tests/unit_tests/hardfork.cpp | C++ | cpp | 22,157 | permissive | // Copyright (c) 2014-2016, The Monero Project
//
// 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... |
d93c68945e653ee37893be652ae416371a6213ea | ce9b88fb0d8a5a90b64b96697fb32f26f6b7e21e | Mattadore/particle_filter | /src/gaussian_sensormodel.cpp | C++ | cpp | 3,821 | no_license | #include "particle_filter/gaussian_sensormodel.h"
#include "particle_filter/random.h"
#include "particle_filter/rigid_model.h"
#include "particle_filter/prismatic_model.h"
#include "particle_filter/rotational_model.h"
template <class StateType, class ZType> GaussianSensorModel<StateType, ZType>::GaussianSensorModel()
... |
457bc63a6882ec643ecc8f43b60c96dc16be2aec | c6125cdf964b6a85d728debd0d1f083ec4ce9857 | duxins/leetcode | /100-same-tree.cpp | C++ | cpp | 2,205 | no_license | // 100. Same Tree
//
// Given two binary trees, write a function to check if they are equal or not.
// Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
//
// Tags: Tree, Depth-first Search
//
// https://leetcode.com/problems/same-tree/
#include <i... |
e975c2a5f0260fced12e72125f70ffe9d138d3cf | c760d26e938b913ba690790f2f6fc777aba42803 | YanfeiORNL/EnergyPlusJason | /src/EnergyPlus/CostEstimateManager.hh | C++ | hh | 10,763 | permissive | // EnergyPlus, Copyright (c) 1996-2021, The Board of Trustees of the University of Illinois,
// 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), Oak Ridge
// National Laboratory, managed by UT-Batt... |
40d28e8ca7737f1e47559b731be6aedf479c18c3 | b164ce19553815b78d19baca910e6affa43d2e00 | Gerst20051/Languages | /cpp/AutoHotKey/source/dllmain.cpp | C++ | cpp | 35,830 | no_license | /*
AutoHotkey
Copyright 2003-2009 Chris Mallett (support@autohotkey.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.
This... |
e337d1cd4ba050cd2b86c8d25dda703dd050c4db | 8e66e72c334609201fbbde8359825d785306da94 | misletoe/ccr_examples | /Compilers/LLVM/tools/opt/BreakpointPrinter.cpp | C++ | cpp | 2,105 | no_license | //===- BreakpointPrinter.cpp - Breakpoint location printer ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------------... |
0e49b6ac2e90379aa4911043a3bc7c915bc958d7 | da8b72cf11f0559b55c4349108c947dbf84c618b | EoinDavey/Competitive | /AIPO/C++/2016-Prelim-p6.cpp | C++ | cpp | 685 | no_license | #include <iostream>
#include <stdio.h>
#include <math.h>
#include <string>
using namespace std;
unsigned long long int modPow = pow(10,9) + 7;
unsigned long long int fac(int n){
unsigned long long int res = 1;
for(int i = 2; i <= n; i++){
res=(i * res);
}
return res;
}
void solve(int n, int k){
unsigned long... |
c9db38bdc40ae4528b8b802d9ab093697aaec41f | e5d439094dae79d1bc6f67b1b0c2d8faebe74d53 | rgoomes/Launcher | /qt/stylesheet.cpp | C++ | cpp | 1,779 | no_license | #include "stylesheet.h"
#include "utils.h"
Style::~Style(){}
Style::Style(std::string obj, std::string path){ this->obj = obj; this->load_styles(path); }
void Style::set_style(QString key, QString value){ styles[key] = value; }
QString Style::get_style(QString key){ return styles[key]; }
QString Style::get_objname(){... |
933b6eb7dcceaf88145a428c37b3e17509e559e3 | 0c8fd76e35bf646cdfc39b48315f89dd2723c7ef | zergnick/peanoclaw | /src/peanoclaw/parallel/MasterWorkerAndForkJoinCommunicator.cpp | C++ | cpp | 9,490 | permissive | /*
* MasterWorkerAndForkJoinCommunicator.cpp
*
* Created on: Mar 19, 2013
* Author: kristof
*/
#include "MasterWorkerAndForkJoinCommunicator.h"
#include "peanoclaw/Cell.h"
#include "peanoclaw/Heap.h"
#include "peanoclaw/Patch.h"
#include "peanoclaw/ParallelSubgrid.h"
#include "peanoclaw/records/CellDescript... |
d31d40e51fcdbda884f0fcc41402a358c1e942d1 | 1e15f1d04905f4747a042db0349e2bd17eafd745 | ghjang/stepped_calc | /stepped_calc/test/OperatorPrecedenceTest.cpp | C++ | cpp | 2,293 | no_license | #include "catch.hpp"
#include "../OperatorPrecedence.h"
TEST_CASE("unary operator precedence", "[stepped_calc]")
{
using boost::apply_visitor;
auto const plus = token_t{ UnaryOperator::Plus };
auto const minus = token_t{ UnaryOperator::Minus };
REQUIRE(0 == apply_visitor(CompareOperatorPrecedence()... |
5f7db5fe036f59a6d90d9582afbc115fb1b6381f | 6161fefbc35a1bf40aecfed8dfdcd65909860640 | JosephProstko/carbon-footprint | /CarbonFootprint.cpp | C++ | cpp | 419 | no_license | /*
* The CarbonFootprint() class defines an abstract method
* which returns the carbon footprint of a given thing.
* Author: Joseph Prostko
* Project: Assignent 1: CPP Programming; CarbonFootprint Class
* Version: October 2019
*/
#include "CarbonFootprint.h"
/*
* The default getCarbonFootprint() method ... |
6c21c82b3bba3dca312cb3bf1075b21ba553a6c4 | c501ff26988eae67f682382c7f5043760cc98596 | anonyhostvn/WorkSpaceCpp | /SERVER.cpp | C++ | cpp | 1,619 | no_license | #include <bits/stdc++.h>
#define forinc(i,a,b) for (int i = a ; i <= b ; i ++)
#define fordec(i,a,b) for (int i = a ; i >= b ; i --)
#define forv(j,u) for (int j = 0 ; j < u.size() ; j++)
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define mk make_pair
#define pii pair<int,int>
#define... |
d08de3566a78ad26a2d42ede9da63afd57f2eeb4 | 47f78901a733d46c81ac8eef59e9fa53e3f94852 | TencentCloud/tencentcloud-sdk-cpp | /wedata/src/v20210820/model/IntegrationNodeSchema.cpp | C++ | cpp | 8,486 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
3b40c19607d3ff02261ab0683884e037f76cb5f0 | 9bc4c23781bb0ed7a441fc1713a4a68da95485e9 | bin3/toynlp | /src/toynlp/util/trie.cpp | C++ | cpp | 984 | permissive | /*
* Copyright (c) 2013 Binson Zhang.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache Licens... |
e9ffae87da32dba6c758a25f0b65d6f3e6d46260 | 1b5b3fe8f52979a161861b85aac4808645fee74a | SignalImageCV/Apollo_learning | /Apollo_ZhongYong/CyberBridge/CyberWriterContiRadar.hpp | C++ | hpp | 466 | no_license | #pragma once
#include <memory>
#define OBJECT_MAX_SIZE 100
class Imp;
class CyberWriterContiRadar
{
public:
struct Object
{
int id;
float longitudeDist;
float lateralDist;
float longitudeVel;
float lateralVel;
float rcs;
int dynprop;
};
CyberWrite... |
676df13afefa8f62e3c041cc18dffe50a7401508 | 68be852c1ca858d893730cd014542a8ed8abcdbe | pavel-zeman/CodeChef | /SnackDown/y2016/PreEliminationA/Art.cpp | C++ | cpp | 2,650 | no_license | // It is possible, if there are 3 consecutive millimeters of the same color
// https://www.codechef.com/SNCKPA16/problems/MAKEART
#include <bits/stdc++.h>
using namespace std;
#define FOR(c, m) for(int c=0;c<(int)(m);c++)
#define FORE(c, f, t) for(int c=(f);c<(t);c++)
#define LLI long long int
#define MOD 1000000007
... |
f77846ad8ca62a54f34af4441c1dff62a352ab12 | 4dca79fd5505518f67c410404eac332f8ebe18b5 | rosoareslv/SED99 | /c++/godot/2015/12/main.cpp | C++ | cpp | 43,910 | no_license | /*************************************************************************/
/* main.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
ce75b8fa3fb6393027aa65bd753f6382693c7bcc | af283503c16d5fd2ee6f36591def16cace954717 | danyfel80/pooAvancee | /TD3/POO-TD3.1/src/IntegerStack.cpp | C++ | cpp | 1,983 | no_license | /*
* IntegerStack.cpp
*
* Created on: Oct 1, 2018
* Author: daniel
*/
#include "IntegerStack.h"
#include <sstream>
namespace poo {
IntegerStack::IntegerStack(int capacity) {
this->capacity = capacity;
this->stack = new int[capacity];
this->last = 0;
}
IntegerStack::IntegerStack(const IntegerStac... |
0e6515e82f75133f2ba6755dbcd8319b187503a2 | 00ece757453591f8e3a8f43f63a8b8e51c52548d | mashoujiang/openvino | /inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/config.cpp | C++ | cpp | 6,998 | permissive | // Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "ie_plugin_config.hpp"
#include "behavior/config.hpp"
using namespace BehaviorTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
... |
0e43b0ba102577eaf9f6777591b5658abe0ee193 | 1659a192ec155912b4352484f9e72f1d34a7dbc5 | vcappello/libCppGef | /line_edit_part.cpp | C++ | cpp | 12,840 | no_license | #include "line_edit_part.h"
#include <geometry.h>
#include <move_line_command.h>
#include <reparent_line_command.h>
#include <move_line_point_command.h>
#include <set_line_color_command.h>
#include <set_line_width_command.h>
#include <set_dash_style_command.h>
#include <delete_command.h>
#include <i_container_edit_p... |
143ffa51ed2dd431ff7b0118270f467c06d7648c | db1ece71f1450829c7e39dcacd26ebbb3236db26 | mindis/mlpack | /src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp | C++ | hpp | 17,751 | permissive | /**
* @file binary_space_tree.hpp
*
* Definition of generalized binary space partitioning tree (BinarySpaceTree).
*/
#ifndef __MLPACK_CORE_TREE_BINARY_SPACE_TREE_BINARY_SPACE_TREE_HPP
#define __MLPACK_CORE_TREE_BINARY_SPACE_TREE_BINARY_SPACE_TREE_HPP
#include <mlpack/core.hpp>
#include "mean_split.hpp"
#include "... |
44d818b94c53f506a098e0e215e5f74260293090 | 6037bdf9a09a5aa213257e3bdea991f2e197c5c9 | usmhkoy39/ACM | /动态规划/背包DP/01背包.cpp | C++ | cpp | 793 | no_license | //二维
int v[1005], w[1005];
int f[1005][1005];
void fsbag()
{
int N, T;
cin >> N >> T;
for(int i = 1;i <= N; i++)
cin >> v[i] >> w[i];
for(int i = 1;i <= N; i++)
{
for(int j = 0;j <= T; j++)
{
f[i][j] = f[i - 1][j];
if(j - v[i] >= 0)
f... |
21ac89e0e1520d88aaaabe7f2a4384ebdee84196 | 3446c49f9daf47d1228ff034b0ac2a9fa4d01754 | wichtounet/eddic | /include/ast/Integer.hpp | C++ | hpp | 692 | permissive | //=======================================================================
// Copyright Baptiste Wicht 2011-2016.
// Distributed under the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//=======================================================================
#ifndef A... |
6e0ee040ba56fed0003f2d6cfc4816eed38a7865 | 029de904e77dadd91f380b31eb2f9bf4cee68604 | inviwo/inviwo | /modules/userinterfacegl/src/glui/widgets/rangeslider.cpp | C++ | cpp | 15,048 | permissive | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2017-2023 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
0952901ddec0512431af717c71f36e1d9c01f218 | f3db665ec15c34d8fe343669f040a466ff3023d0 | shnjm/Codeforces-contests | /Good Bye 2018/B.cpp | C++ | cpp | 853 | no_license | #include<bits/stdc++.h>
using namespace std;
#define LLD long long int
//map< std::pair<int, int>, string> testMap;
//testMap[std::make_pair(1,3)] = "Hello";
int main()
{
int n;
cin>>n;
LLD obel[n+10][2],clu[n+10][2],tmp1,tmp2;
for(int i=0;i<n;i++)
{
cin>>obel[i][0]>>obel[i][1];
}
... |
38784449389b4816cc021659de12953d89e00fbb | f4f67c8e28b213e1e3f8ec6fc620e8943d19dffb | seivan/cpp_playground | /labbar/labb4/uppg1/Taxi.cpp | C++ | cpp | 901 | no_license | /*
* Taxi.cpp
*
* Created on: Dec 1, 2008
* Author: seivan
*/
#include "Taxi.h"
using namespace std;
Taxi::Taxi(const string& reg_number) : Vehicle(reg_number, "Yellow", 4), customers(false) {
}
Taxi::~Taxi() {
}
bool Taxi::has_customers() const {
return customers;
}
void Taxi::set_has_customers(const b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.