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 |
|---|---|---|---|---|---|---|---|---|
d5079fc952b7560031f079491df7aad151fcea48 | f467ea27be50f3fd9acbea310bfc5c6410f9994e | kctoombs/CS32 | /lab02/Student.cpp | C++ | cpp | 1,460 | no_license | #include "Student.h"
#include <sstream>
#include <string>
Student::Student(int perm1,
std::string lastName1,
std::string firstAndMiddleNames1) {
perm = perm1;
lastName = lastName1;
firstAndMiddleNames = firstAndMiddleNames1;
}
// construct a Student object from a single line of
// comma separated text... |
f75ae1f15a59039f1002622e199d5586393e0d52 | 9c65c8d772a0ca25c26da8ed78e9594e53fa2f2d | abagali1/intro-to-cpp | /people.cpp | C++ | cpp | 630 | no_license | #include "people.h"
Teacher::Teacher()
:Human()
{
this->id = 0;
this->age = 0;
this->courses = new string[7];
}
Teacher::Teacher(int a, int i)
:Human(), age(a), id(i)
{
this->courses = new string[7];
}
Teacher::Teacher(int a, int i, string n)
: Human(n), age(a), id(i)
{
this->courses ... |
440d21c41043d6f69eefcba30a83a154abf88e84 | 1c16b424b6a22e24cfcad5deaf6f796bcd59d5d5 | Houssk/Synthese-d-images-avec-OpenGL | /Basics/01-2D-1_pink_triangle/C++/Triangle.cpp | C++ | cpp | 2,003 | no_license | // Définition de la classe Triangle
#include <iostream>
#include <GL/glew.h>
#include <GL/gl.h>
#include <math.h>
#include <utils.h>
#include <Triangle.h>
/** constructeur */
Triangle::Triangle() throw (std::string)
{
/// Shader
const char* srcVertexShader =
"#version 300 es\n"
"in vec2 g... |
0797f6f9b7f320afe5f250e4f970889465a1cce9 | 8edbdabe1a2ec3e2afc821fdb063e870d6af403e | Balhau/arduinoradiation | /src/ticks.hpp | C++ | hpp | 219 | no_license | #ifndef Arduino
#include <Arduino.h>
#endif
static volatile long TICKS_COUNTER = 0;
static volatile int TICKS_STATE = LOW;
static void ticks_counter() {
TICKS_COUNTER += 1;
TICKS_STATE = !TICKS_STATE;
}
|
66e2d5108a06db2f3221c6679b04dde4d90eb0a2 | 782cdc2e718df8017e19eebf60019c040ede60a2 | zH4x/SpellBreak-FULL-SDK | /SDK/SB_BP_Item_Belt_Regeneration_functions.cpp | C++ | cpp | 2,066 | no_license | // SpellBreak By Respecter (0.15.340) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SB_BP_Item_Belt_Regeneration_parameters.hpp"
namespace SpellSDK
{
//---------------------------------------------------------------------------
//Functions
//-----------------------------------------------------------... |
4d3c07b838ba83e65f275d1dbba2f2a9f50ff6b0 | 632af4c137c5160ef9536f967f2969a7eaf0da1a | james093131/metaheuristic | /normal/normal.cpp | C++ | cpp | 1,177 | no_license | #include "normal.hpp"
void create(char *arr,int size)
{
for(int i=0;i<size;i++)
{
int a=rand()%2;
char c =a+'0';
arr[i]=c;
}
}
void Print(char *arr,int size){
for(int i=0;i<size;i++)
{
cout<<arr[i]<<' ';
}
cout<<endl;
}
int Evaluate(char *arr,int size)
{
int optimal=0;
for... |
85e972df4876e928c9f097aa328d67c854b39f56 | 8ec6a252c982016738c98feb62d3b14e832c553f | odanado/Procon | /AtCoder/CodeFestival/2014/thanksA/E.cpp | C++ | cpp | 1,789 | no_license | #include <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cl... |
184436e6135cff1a1d0eb63baca9fc0558d65016 | 99cf8b989fc59caa3d0898bbb39a80518f6535ad | lzhou835/leetcode | /249.Group_Shifted_Strings.cpp | C++ | cpp | 500 | no_license | class Solution {
public:
vector<vector<string>> groupStrings(vector<string>& strings) {
vector<vector<string>> res;
unordered_map<string, multiset<string>> m;
for(auto a:strings){
string t="";
for(auto c:a){
t+=to_string((c+26-a[0])%26)+",";
... |
f4cf27b1e5a4937bc2ac484f2060e3ecf9c4d75e | d68f7868b7ef009d05ae73c8bb1319d54e4dc8de | bw98/leetcode | /DivideAndConquer/53.cpp | C++ | cpp | 1,816 | no_license | #include <iostream>
#include <limits.h>
#include <vector>
using namespace std;
class Solution {
public:
int maxSubArray(vector<int>& nums) {
int res = findMaxSubarray (nums, 0, nums.size()-1);
nums.clear();
vector<int>().swap(nums);
return res;
}
private:
int findMaxSubarray... |
e5c43877e0bf1a4d48c913a82f6a419df463d531 | ca7c5231a6b1254da0bfdedd73b8112ff317a239 | TaoSama/ICPC-Code-Library | /2016 Training/11.19/D.cpp | C++ | cpp | 1,154 | no_license | //
// Created by TaoSama on 2016-11-19
// Copyright (c) 2016 TaoSama. All rights reserved.
//
#pragma comment(linker, "/STACK:102400000,102400000")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#i... |
fc63bdf9b620f82817088391e5466efcb121541f | 6b64ace9b890c882a645ec752b9d5415eb1b6ce0 | lambdalisue/Shooting | /Classes/AppDelegate.cpp | C++ | cpp | 2,173 | no_license | #include "AppDelegate.h"
#include "TitleScene.h"
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
//if you want a different context,just modify the value of glContextAttrs
//it will takes effect on all platforms
void AppDelegate::initGLContextAttrs()
{
//set OpenGL context attribut... |
a614df9be05715bd376c91b4aad713a5e4c061a8 | 722284de1765a8126d8b05e07ac1d1453dee77a5 | raulastu/Algorithm-Competitions-EWS | /TCProject/src/tc_template/tc_template.cpp | C++ | cpp | 3,690 | no_license | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define... |
e4f39c0a8bff4e3f584fd7de731e9976e8ada78c | f918d026b451bf0393e25f7689e5cf0b8eaf5c5d | william-dawson/NTPoly | /Source/CPlusPlus/MatrixMapper.cc | C++ | cc | 2,537 | permissive | #include "MatrixMapper.h"
#include "PSMatrix.h"
#include "Triplet.h"
#include "TripletList.h"
#include "Wrapper.h"
////////////////////////////////////////////////////////////////////////////////
extern "C" {
#include "PSMatrix_c.h"
#include "ProcessGrid_c.h"
}
using std::complex;
////////////////////////////////////... |
26a36cd5cbd251d0b46e47765adc636833d4b6d5 | 41572a06f7e81b32f3d252d7a792b6e4d166a33f | godspeed1989/pcl_samples | /cluster_extraction.cpp | C++ | cpp | 4,134 | no_license | #include <pcl/ModelCoefficients.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/features/normal_3d.h>
#include <pcl/kdtree/kdtree.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_t... |
d0eb9aa6a968b9ba1ffa2e371836ac3b7eb11643 | 7ef38889c2aebb2057a51487d503fa53702d38e3 | Michanne/AutoInclude | /FileWatcherBase_DefinedCommon.cpp | C++ | cpp | 964 | permissive | #include "FileWatcherBase.h"
void FileWatcherBase::removeEvent(WatchEventHandle handle)
{
allocEvent.remove(handle);
}
WatchInstanceHandle WatchHandleAllocator::getHandle()
{
if(freeIndices.size() > 0)
{
WatchInstanceHandle k = freeIndices.front();
usedIndices[k] = true;
freeIndi... |
a4a40086a9b3c5bb98f7fd1987e6604066849d9f | 9e6de6e393c529f3368bba56d61b27e75ae55f3e | fawkesrobotics/fawkes | /src/libs/utils/time/wait.cpp | C++ | cpp | 4,773 | no_license |
/***************************************************************************
* wait.cpp - TimeWait tool
*
* Created: Thu Nov 29 17:30:37 2007
* Copyright 2007 Tim Niemueller [www.niemueller.de]
*
****************************************************************************/
/* This program is free software... |
fef32af14112a7c7428fa51af546ec56b43c533b | 05f1d8471de5c478abe8f82489a639f0395a0e11 | zidane501/Uni-Course-in-C- | /Submissions/handin4/LogisticRegression.hpp | C++ | hpp | 550 | no_license | /*
#include "armadillo.hpp"
#include "ReadFile.hpp"
class LogisticRegression: ReadFile
{
private:
arma::colvec y(double);
arma::colvec wT = arma::zeros<arma::colvec>(34);
arma::mat x;
arma::mat f(double);
public:
LogisticRegression(arma::mat x, arma::colvec y, arma::rowvec wT){
y = y;
... |
540a4b3c0a24e34947e287649648aa5068ed7e51 | 912e0ac346916cf305db8c6472b6b2c328a1dfd3 | emilio/chromium | /chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc | C++ | cc | 176,942 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Disable everything on windows only. http://crbug.com/306144
#ifndef OS_WIN
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include... |
e9b27ce0d427201a8339f25ebee972a01b8f8d42 | 6ce0edcf226ac25329f365785b61ff082eee6793 | GameFramework/frameworks | /cocos2d-x/cocos/base/CCDirector.cpp | C++ | cpp | 38,031 | permissive | /****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2010-2013 cocos2d-x.org
Copyright (c) 2011 Zynga Inc.
Copyright (c) 2013-2015 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to an... |
a53ebbd719142b090ebbfe062b163cb0dabddf89 | 67b40e3e7d45314b21db7956e32d2f48e030a998 | Jean-Hsudasu/CPE_1_Star | /Code/10242_Fourth Point !!.cpp | C++ | cpp | 1,262 | no_license | #include<stdio.h>
#include<stdlib.h>
/*
這是一題複雜的邏輯題目,與平行四邊形有關,題目會給你4個點座標(x,y),但其中會有兩個點是一樣的,找出一樣的點後,依照不同case求出第四個點
要解出這題,你必須要知道:
1.平行四邊形的中點公式(求第四個點會用到)兩"對頂點"相加除二會等於另兩"對頂點"相加除二
2.題目依序會給四個點,但須要符合(1、2兩點同邊,3、4兩點同邊),意思就是不會出現1、2同點,3、4同點的情況發生(重要!!)
3.可能的同點case有:(1、3)、(1、4)、(2、3)、(2、4)
*/
int main()
{
float ans_x,ans_y;... |
d867aa2add14e85bd481bcb6c280f253db80e66a | ea31051042a3c883cfef05998b8700653e45215f | JakubSokolowski/gcc-vec | /src/auto-vectorize-example/main.cpp | C++ | cpp | 3,141 | no_license | #include <math.h>
#include <string>
#include <iostream>
#include <array>
#include <vector>
#include <algorithm>
#include <random>
#include "../benchmarks/Timer.h"
const int SIZE = 10000;
const double LOWER_BOUND = 0.0;
const double UPPPER_BOUND = 1000.0;
double Multiply(const double &a, const double &b, const doubl... |
f7ee2afa75ca086ddcda92a35f0ec52e559bf6ec | 5f4523e624531da55199bc77aa222e2ec71098ab | cantren/tarantool | /src/iobuf.cc | C++ | cc | 4,532 | permissive | /*
* Copyright 2010-2016, Tarantool AUTHORS, please see AUTHORS file.
*
* 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 lis... |
6d0d3a3d0e05e5b445bbb3ce32e62e87b97af022 | d96d836e629973f83c38b2a301ace144564bb58f | don-yi/Networking-web-real-time-replication | /src/game/CS261_Assignment4_Client/CS261_Assignment4_Client.cpp | C++ | cpp | 2,179 | no_license | //---------------------------------------------------------
// file: CS261_Assignment4_Client.cpp
// author: Matthew Picioccio
// email: matthew.picioccio@digipen.edu
//
// brief: Entry point
//
// C-Processing documentation link:
// https://inside.digipen.edu/main/GSDP:GAM100/CProcessing
//
// Copyright © 2021 DigiPen... |
c22b31789939d1123a19cfb2605d209aabee54f2 | 59593fd0d45599043876614998c84d0d5587f69e | mzahng160/Algorithm | /tree/TreeReverse.cc | C++ | cc | 9,679 | no_license | #include <iostream>
#include <stdlib.h>
#include <stack>
#include <queue>
using namespace std;
typedef int ElemType;
typedef struct _BiTNode
{
ElemType data;
struct _BiTNode *lchild, *rchild;
~_BiTNode()
{
cout << "~_BiTNode() "<< endl;
}
}BiTNode, *BiTree;
typedef struct _Node
{
BiTr... |
279c267cf74e4250e4a9383bf2c90196be894556 | 72d7bbaee2606baa54968b77c0216a632a83cc35 | eguskov/daScript | /src/builtin/module_builtin_dasbind.cpp | C++ | cpp | 17,171 | permissive | #include "daScript/misc/platform.h"
#include "daScript/misc/performance_time.h"
#include "daScript/ast/ast.h"
#include "daScript/ast/ast_handle.h"
#include "daScript/simulate/simulate_visit_op.h"
#include "daScript/simulate/aot_builtin_dasbind.h"
#include "daScript/misc/sysos.h"
#include <mutex>
namespace das {
#... |
1e4e25404c7051240b1bcc87aa4b752a32843e85 | 78040502fa248e0b2bc78bc45495a6731d6ce17a | janhybs/flow123d | /src/fields/fe_value_handler.hh | C++ | hh | 5,867 | no_license | /*!
*
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
*
* 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 the
* Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)... |
4b08df3f4fd45d16fb6ac90d81761f8f4108ec6a | 3a18699c8704605c6f1f949fdcefff64ac9e8e33 | zxok365/melody-of-canon | /training/2015.7.13/B.cpp | C++ | cpp | 1,162 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
const int Mn = 70000 + 10;
string s[Mn],t[Mn];
long long f[10],c[10][10];
int n;
int main() {
c[1][0] = c[2][0] = c[3][0] = c[4][0] = 1;
c[2][1] = 2;
c[3][1] = c[3][2] = 3;
c[4][... |
a2dff83cf3adec8a963764df5a8f45fc07e4f3c8 | aec186652accb106cc1543fe597449cab14da13c | PPC64/hhvm | /hphp/hhbbc/test/type-system.cpp | C++ | cpp | 77,287 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
4957f83bae43e9010ef9e3159e57bfc42ca5ad69 | e982582851ecc747b433b7c2c2f4424eb529fb89 | limberc/mindspore | /mindspore/lite/src/runtime/kernel/arm/fp16/split_fp16.cc | C++ | cc | 3,107 | permissive | /**
* Copyright 2020 Huawei Technologies 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... |
4c2d7909a4b7d5ade9ada4e4957a730ec74c5d9b | a69ca78f218d6509bee425573fb12fdf94683d99 | terencejia/demo-test | /src/img_process/sl_picture.cpp | C++ | cpp | 5,358 | no_license | #include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <png.h>
#include <string>
#include <fstream>
#include "fsconf.h"
#include "img_process.hpp"
namespace img_process {
void save_pgm(const std::string & path, const gray_img & src)
{
save_pgm(path.c_str(), src);
}
void save_pgm(const char * path,... |
93d4ff58d785362929cf45ebafde6ee97fce4020 | 04003599e029abf6c23653e36a776d6406e87efe | sungpyo9053/C-Project | /algolab/outputZigZag.cpp | C++ | cpp | 770 | no_license | #include <iostream>
using namespace std;
void outputZigZag(int n, int k);
int main(void)
{
int t;
int n,k;
cin>>t;
for(int i=0;i<t;i++)
{
cin>>n>>k;
outputZigZag(n,k);
}
return 0;
}
void outputZigZag(int n, int k)
{
int sp = 1;
int m = 1;
for(int i=0;i<k;i+... |
0eeadd7957dde7326f0e5b73fb8d08b02ff38be8 | cc249309c13821cdc586e8b4d603cd2dafd3e888 | cmg0523/coding | /Algorithm/KOI/KOI/박 터뜨리기.cpp | C++ | cpp | 248 | no_license | #include <stdio.h>
int main() {
int K, N, i, tot = 0;
scanf_s("%d %d", &N, &K);
for (i = 1; i <= K; i++)tot += i;
if (tot > N) {
printf("-1");
return 0;
}
if ((N - tot) % K == 0) printf("%d", K - 1);
else printf("%d", K);
return 0;
} |
83ea3d883e09c555d58ff798b05bfb786a6e57fc | 435a5c397cb9c4b765fa54547c581aaf9a1e9c6d | tilera/llvm | /lib/Target/Tile/MCTargetDesc/TileELFObjectWriter.cpp | C++ | cpp | 4,828 | permissive | //===-- TileELFObjectWriter.cpp - Tile ELF Writer -------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
a84e12cd8726044b6bce7af58520c26b6b6bd5a5 | 0063f2c7b8243f78e5e76d8228b2083d1a8d79d4 | ScottSauceda/CPlusPlus | /homework03/bookstore_ship.cpp | C++ | cpp | 8,406 | no_license | /*
Marcus Sauceda
CISC 1600-L01
Spring 2019
Homework03
2-6-19
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
/*
variable declarations: presented in alphabetical order for easier readibility
*/
char complete_order, redo_ship, ship_method, expedited_service;
... |
38a9cd83837ce14e3c95c27233551e33c8c2af22 | 9da33f2ddf2018815cd0c271ecd1f96cc80f10c6 | synesissoftware/STLSoft-1.10-delta | /test/unit/stlsoft/string/test.unit.stlsoft.string.string_lookup/implicit_link.cpp | C++ | cpp | 866 | permissive | /* /////////////////////////////////////////////////////////////////////////
* File: implicit_link.cpp
*
* Purpose: Implicit link file for the test.unit.stlsoft.string.string_lookup project.
*
* Created: 8th September 2014
* Updated: 8th September 2014
*
* Status: Wizard-generated
*
* ... |
3204d17472718e4767365b4dd05fa4d64e532160 | 06797ddca0a3259552996f567136ea60ff447a10 | teeraiser1/Practice-CPP | /DS/1/1-6-p2.cpp | C++ | cpp | 642 | no_license | #include<iostream>
#include<algorithm>
#include<iterator>
#include<unistd.h>
#define NUM 3
using namespace std;
void Print(char* a)
{
for(int i = 0; i < NUM; i++)
{
cout<<a[i]<<' ';
}
cout<<endl;
}
void permutP(char* a, const int m)
{
do{
copy(a, a+m, ostream_iterator<char>(cout," "));
usleep(1000000);
... |
4056116294a11e9e7a80bbecc931e61d02396706 | ce05a49e4504beee3c966239a999001a5a7e733b | Zach116/Year1-CS16X | /Year1_Term3/Assignments/Assignment4/driver.cpp | C++ | cpp | 761 | no_license | #include <iostream>
#include <string>
#include <vector>
#include "player.h"
#include "insect.h"
#include "ant.h"
#include "bee.h"
#include "tools.h"
using namespace std;
int main() {
Player player;
do {
player.generate_food();
cout << "BEE GENERATED!" << endl;
player.generate_bee();
player.prin... |
8b34ecf70feec72b4c70d44febac30ba5cbe1e16 | 3d0e4630383d2de112047087e61d1f8eaf926808 | sansajn/test | /agg/pipeline_2.cpp | C++ | cpp | 2,642 | no_license | // sample from http://www.antigrain.com/articles/ddj1.agdoc.html
#include <stdio.h>
#include <string.h>
#include <agg_pixfmt_rgb.h>
#include <agg_renderer_base.h>
#include <agg_renderer_scanline.h>
#include <agg_scanline_u.h>
#include <agg_rasterizer_scanline_aa.h>
#include <agg_path_storage.h>
#include <agg_conv_curve... |
8072d45e17981227b3af8dd90d7b817d854c7689 | 0340f46cc9c6cc93dde32b7841c30d8cd1ff662a | maruf-rahad/codeforces | /A - Maximum Square.cpp | C++ | cpp | 733 | no_license | #include<bits/stdc++.h>
using namespace std;
vector<int>v;
int main()
{
int n,m,i,j,t,x,y,a,b,sum;
while(scanf("%d",&t)==1)
{
while(t--)
{
v.clear();
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a);
... |
c9976abd0bc808d1d6c40445947390fc0c1c2f15 | 00f76cdf5597b90f1cc09cab35a3c5f5c9c93024 | alexandraback/datacollection | /solutions_5658282861527040_0/C++/weiszago/main.cpp | C++ | cpp | 515 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int ttt;
long long a, b, k;
int main()
{
ifstream be("B-small-attempt0.in");
FILE *out = fopen("b.out", "w");
be >> ttt;
for (int t=1;t<=ttt;t++) {
be >> a>>b>>k;
long long sum=0;
for (int i=0;i<a;i++) {... |
29b3745ed3457c2dbcf6cb2abe6f6d3be9c7db2d | 2b2b8b5f061c65931d34ec96bfb201a6731dc3c9 | Ouroboros27/reshade | /source/d3d12/render_d3d12_utils.hpp | C++ | hpp | 2,290 | permissive | /*
* Copyright (C) 2021 Patrick Mours. All rights reserved.
* License: https://github.com/crosire/reshade#license
*/
#pragma once
namespace reshade::d3d12
{
void convert_blend_op(api::blend_op value, D3D12_BLEND_OP &internal_value);
void convert_blend_factor(api::blend_factor value, D3D12_BLEND &internal_value);... |
fc34d89709ed93375bb7f54a2a67d6e70fb75a49 | eed6b5c6b18da8e9f8a20542e290b3bdc71f8f39 | onosaburo/beam | /wallet/cli.cpp | C++ | cpp | 40,424 | permissive | // Copyright 2018 The Beam Team
//
// 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 agre... |
69cd9b44dd18850892a0cc9f7bcd0a676d0e0009 | a80026168ce9cc132459665af14297b08d302e2f | Robbin1987/Visualization | /seahorn/include/seahorn/HornifyModule.hh | C++ | hh | 2,661 | permissive | #ifndef __HORNIFY_MODULE_HH_
#define __HORNIFY_MODULE_HH_
#include "llvm/Pass.h"
#include "llvm/IR/Module.h"
#include "ufo/Expr.hpp"
#include "ufo/Smt/EZ3.hh"
#include "seahorn/UfoSymExec.hh"
#include "seahorn/ClpSymExec.hh"
#include "boost/smart_ptr/scoped_ptr.hpp"
#include "seahorn/LiveSymbols.hh"
... |
2803a0c2708aa09b6b49d284dadcb2f73311235e | 97ff6993df0f7c637a1642db90aecf7384230817 | rabauke/trng4 | /trng/mt19937.cc | C++ | cc | 3,121 | permissive | // Copyright (c) 2000-2022, Heiko Bauke
// 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 ... |
d13287fdb0a93a1eb694f7ac6b8fefb496bfcae3 | a09660ca6034c004960114874ae9b3adc24c047f | codingClaire/leetcode | /totalProblem(CN)/412.fizz-buzz.cpp | C++ | cpp | 905 | no_license | /*
* @lc app=leetcode.cn id=412 lang=cpp
*
* [412] Fizz Buzz
*/
// @lc code=start
// [412] Fizz Buzz
// 100 % 78.22 %
class Solution
{
public:
string num2string(int n)
{
string str;
while (n != 0)
{
char bit = '0' + n % 10;
str.insert(0, 1, bit);
... |
37c5274b5f4b937f5999f40f66e64f59a9ee4796 | 3281a8425d00120a7a18e63260ed02b94f9baa9d | strigazi/athena | /Trigger/TrigT1/TrigT1RPChardware/src/SectorLogicReadOutStructure.cxx | C++ | cxx | 3,245 | permissive | /*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include<fstream>
#include<iostream>
#include<string>
#include "TrigT1RPChardware/SectorLogicReadOutStructure.h"
// header structure
const ubit16 SectorLogicReadOutStructure::s_headerPos[s_headerNum] ={ 12, 0};
const ubit16 SectorLogicRe... |
b5955b6252069769cecec3257f9acff13e5ad372 | 932ec14f00d47e13bc2e101a506fcb6435899bee | mori0091/cparsec2 | /test/src/test_utf8.cpp | C++ | cpp | 2,087 | permissive | /* -*- coding: utf-8-unix -*- */
#include <catch.hpp>
#include <cparsec2.hpp>
// clang-format off
#define EMOJI_SAMPLE \
u8"😀🐶🍏⚽️🚗⌚️❤️🏳️👨👩👨🏻👩🏻👨🏼👩🏼👨🏽👩🏽👨🏾👩🏾👨🏿👩🏿"
// clang-format on
SCENARIO("utf8(str)", "[cparsec2][parser][utf8]") {
cparsec2_i... |
8db461ce202d6852282883a0f34cc850f9e6c248 | 0efda41a0b3b38cb6116fdbac1201b3d1c5e761b | MasterRoman/COURSEWORK | /GOSTDiagram/DataTypes.cpp | C++ | cpp | 416 | no_license | #include "DataTypes.h"
System::String^ functionTypeToString(FunctionType v)
{
switch (v)
{
case POINTER: return "0"; break;
case LINE: return "1"; break;
case PROCESS: return "2"; break;
case DECISSION: return "3"; break;
case DATA: return "4"; break;
case TERMINATOR: return "... |
6eec25e4dc6df6b5f265d06ebef891795fedbb1d | 05d87db2a17121da336637cb3f56413f63983463 | jperkelens/mturk | /node_modules/node-expat/node-expat.cc | C++ | cc | 10,240 | permissive | #include <node.h>
#include <node_version.h>
#include <node_events.h>
#include <node_buffer.h>
extern "C" {
#include <expat.h>
}
using namespace v8;
using namespace node;
static Persistent<String> sym_startElement, sym_endElement,
sym_startCdata, sym_endCdata,
sym_text, sym_processingInstruction,
sym_comment, sy... |
178cc8efb58a9790e0c1297df62f816a6c717849 | 48350f60cd3d22a15c7d716c5155b00a48003a03 | ChristofferJon/pacmanhorror | /pPac/PrototypeScreen.cpp | C++ | cpp | 507 | no_license | #include "PrototypeScreen.h"
PrototypeScreen::PrototypeScreen(string _name, D3DManager* _D3DManager, InputManager* _inputManager)
: GameScreen(_name, _D3DManager, _inputManager)
{
}
PrototypeScreen::~PrototypeScreen()
{
}
void PrototypeScreen::Initialize()
{
}
void PrototypeScreen::CheckForInput()
{
}
void Pr... |
8229831cbef983cd110e94fd8115e79c4a4166db | 891c6df9cd06492a5d4175373a76bbdd5f7b25c9 | fredericaltorres/fArduino | /examples/TrinketLedAndSwitch/fArduino.cpp | C++ | cpp | 7,304 | no_license | ///////////////////////////////////////////////////////////////////////////////
//
// fArduino.cpp
// Reusable code for Arduino and Trinket programming, mostly to write
//
// Torres Frederic 2014
//
// MIT License
///////////////////////////////////////////////////////////////////////////////
#include "fArduino.h"
... |
655e9eb94b155d35001e3f1b141b72966f74d8ce | 6750bb3d98ff26c5ee7d54fcfd50dde0938aae04 | meenal1303/Traffic-Simulator | /Traffic Simulator/check_right_left.cpp | C++ | cpp | 2,711 | no_license | #include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <fstream>
#include "Road.h"
#include "Vechile.h"
#include "function.h"
using namespace std;
bool is_between2(int a,int b,int c){
if(a<b && a>c ){
return true;
}
return false;
}... |
0704ba41de6cc535798893d0d31dd35f161c86f4 | 71b010461bdf57ca99b92546731f37a9a141fbf3 | Handwhale/Coursera | /WhiteBelt/Week2/Task5.cpp | C++ | cpp | 2,197 | no_license | // https://www.coursera.org/learn/c-plus-plus-white/programming/XrhxI/ochieried
// Очередь
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int command_count;
string operation;
int value;
vector<bool> queue;
int total_worry_count = 0;
cin >> command_count;
for (auto... |
d0ca5d64eb8fc2e3656dfcf5fc4a35762f5a738e | 366bfb276cc68e4b0674726dc831d4ac17df3869 | elevenjiang1/ay_test | /opencv/cpp/pyr_segmentation.cpp | C++ | cpp | 1,572 | no_license | // g++ -g -Wall -O2 -o pyr_segmentation.out pyr_segmentation.cpp -lopencv_imgproc -lopencv_legacy -lopencv_core -lopencv_highgui
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/legacy/legacy.hpp> // for cvPyrSegmentation
#include <iostrea... |
9708fcf9c5c59b9d49f599c381e06c2b528f4b6b | ccfe05e3f266b94b46caba37ada0a4ac8d31c887 | wayne155/Algorithm | /templates/DFS/bag_problem.cpp | C++ | cpp | 403 | no_license | //
// Created by dell on 2021/9/10.
//
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 20;
int n;
int maxValue , maxCapacity;
void DFS(int index, int sumValue , int sumCapacity){
if(index == n){
//达到最多件数
if(sumValue >= maxValue && sumCapacity >= max... |
101f001311263ce289ceb0ea31c6d04292c3b692 | a2fa1425cf8f70f87ba1eb879da1dbc530d49511 | iamtcby5188/work | /idbbondserver-midware/MarketDataServer/sync/chinabondvaluation_sync.cpp | C++ | cpp | 13,119 | no_license | #include "chinabondvaluation_sync.h"
#include "sync/sync.h"
#include "constants.h"
#include "cache/controller/bondquote_cachecontroller.h"
#include "cache/controller/bondquoterefer_cachecontroller.h"
#include "cache/controller/bondbestquote_cachecontroller.h"
#include "cache/controller/chinabondvaluation_cachecontrolle... |
635bd03f1d72ab6ed0fe3d1a986e77d204edbff9 | 713203462f74e486fa1706a1129d574afb4f7e78 | VSFe/Algorithm | /CPP/etc/Platinum V/6543.cpp | C++ | cpp | 2,499 | no_license | /*
Problem: 그래프의 싱크 (6543)
Tier: Platinum 5
Detail: 방향 그래프 G = (V, E)가 주여져 있다. 임의의 노드 u, v ∈ V에 대해서 u에서 v로 E에 포함된 간선만을 이용해 갈 수 있는 경로가 있으면 u→v로 표현한다.
만약 어떤 노드 v ∈ V가 자신으로부터 도달할 수 있는 모든 노드로부터 돌아오는 경로가 있다면, 즉 다음 조건을 만족한다면 노드 v ∈ V를 싱크라고 부른다.
조건: ∀w ∈ V, (v→w) ⇒ (w→v)
또한, 그래프 G의 싱크를 모아놓은 집합을 bottom(G)로 표현한다.
bottom... |
327147a2e2d495384104cee325f77b9d62e954d6 | bafb4e3120c8f3587f342bec039572f664cafcd6 | Loki-Astari/ThorsSerializer | /src/Serialize/JsonParser.cpp | C++ | cpp | 8,691 | permissive | #include "JsonParser.h"
#include "JsonLexemes.h"
#include "UnicodeIterator.h"
#include "ThorsIOUtil/Utility.h"
#include "ThorsLogging/ThorsLogging.h"
#include <map>
#include <cstdlib>
#include <cstring>
// enum class ParserToken {Error, MapStart, MapEnd, ArrayStart, ArrayEnd, Key, Value};
using namespace ThorsAnvil::S... |
8eac3fe40be61fd9a7e28343cbe2a8249b301694 | 5681d94936b3949170414908c357cbbff0d5c32a | PriyankaChopra/contrail-controller | /src/vnsw/agent/services/services_sandesh.cc | C++ | cc | 33,618 | permissive | /*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include <boost/assign/list_of.hpp>
#include <pkt/pkt_handler.h>
#include <oper/mirror_table.h>
#include <pkt/pkt_init.h>
#include <services/services_init.h>
#include <services/dhcp_proto.h>
#include <services/arp_proto.h>
#include <services/dns_... |
1f4fa993a1235c5e6e532afbf17ea5190bde5932 | 14610116baa5a4e53d097749dd3a6be730e8ea08 | mudlord/demos | /dsr_fuhai/src/sys/_windows/main_deb.cpp | C++ | cpp | 12,404 | permissive | //--------------------------------------------------------------------------//
// iq . 2003/2008 . code for 64 kb intros by RGBA //
//--------------------------------------------------------------------------//
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#include <windows.h>
#inclu... |
68d6e0ea15b6c2d2d5633366a7e57e1d0060eeb1 | c7c4aa10f657bfdc95bfd91fdf72debe5a0c1ede | moevm/oop | /8304/Ptuhov_Denis/Lab2/Code/NtrkObj.cpp | C++ | cpp | 578 | no_license | #include "NtrkObj.h"
std::vector<char> HillingWaterFall::who()
{
return { 'S', 'W', 'M', 'X', 'A', 'R' };
}
NtrlObjEffect HillingWaterFall::get()
{
return stg.effect(20);
}
std::vector<char> Trap::who()
{
return { 'S', 'W', 'M', 'X', 'A', 'R' };
}
NtrlObjEffect Trap::get()
{
return stg.effect(-20);
}
std::vect... |
ecc2e5075b901d38538ec484032a8bfd9877e5ca | df474d6834a30ba6f649b78e216429222528b52f | Bjohh/SuperPlay | /Examples/Mosaic/GameHeader.cpp | C++ | cpp | 1,016 | permissive | // This code is part of the Super Play Library (http://www.superplay.info),
// and may only be used under the terms contained in the LICENSE file,
// included with the Super Play Library.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING B... |
d1b68e04d50c28782e3840627924b3a3fd05b053 | 593fc854005d49b1e918e0602e69005914f4baaf | zH4x/SoT-Insider-SDK | /Cpp/Internal/SDK/RemoteActorDestruction_functions.cpp | C++ | cpp | 1,943 | no_license | // Name: SoT-Insider, Version: 1.102.2382.0
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------... |
2247ced702855f0b82df503b0435e4cc7bedbf88 | 322c99f74e29be3c4402fe1b4aff42fbc0dea9b9 | w5762847/Learn | /OrginalServerCode/OrginalCode/shushanchuangqi/sscq2/Sample/DBServer/DBTable/DBGuildTable/DBGuildTableBase.cpp | C++ | cpp | 2,463 | no_license | #include "DBGuildTableBase.h"
#include "DBGuildBaseInfoTable.h"
#include "DBGuildUserTable.h"
#include "DBGuildListInfoTable.h"
#include "DBGuildApplyTable.h"
#include "DBGuildAuthorityTable.h"
#include "DBGuildBuildingTable.h"
#include "DBGuildStatueTable.h"
#include "DBGuildLogTable.h"
#include "DBLingShanShopBuyLog... |
10af3635ec12aebf146e0fbe9fa8e3fc2cacfa31 | 0ceff595889224f3fd7ee563de1f9298b95f1265 | yarba/G4ValHAD | /test23/shared/g4app/include/Beam.hh | C++ | hh | 5,282 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
23b9c2bf7bd28f481b7f9c772137e97b3d4e7b49 | b1ecc6393704145f50428a16a946ffecde76fe89 | jianping724/LeetCode | /leetcode/42.接雨水.cpp | C++ | cpp | 956 | permissive | /*
* @lc app=leetcode.cn id=42 lang=cpp
*
* [42] 接雨水
*/
// @lc code=start
class Solution {
public:
int trap(vector<int>& height) {
int ans = 0;
int left = 0, right = height.size() - 1;
int leftMax = 0, rightMax = 0;
while (left < right) {
leftMax = max(leftMax, heigh... |
85ae930263e872a03cf0481a4bff02261021ac16 | c9bb569171c767aebee3924b02b6503e31583329 | jufenghua596/book | /dp/HeadFirstDesignPatterns/c_plusplus/Silver/Compound/Observer/DuckSimulator/Quackable.hpp | C++ | hpp | 484 | no_license | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_QUACKABLE_HPP_
#define _HFDP_CPP_COMPOUND_OBSERVER_QUACKABLE_HPP_
#include "DuckSimulator.hpp"
namespace HeadFirstDesignPatterns {
namespace Compound {
namespace Observer {
class Quackable : public QuackObservable {
public: virtual ~Quackable() = 0 {
}
public: virtual void qua... |
be732ba1b8139c9bbd29d399700b85b2236a0c9a | 03653b19141180dd6c7cfca962d75617c7b4e5e4 | hieudovan/MAVSDK | /example/mavshell/mavshell.cpp | C++ | cpp | 3,138 | permissive | #include <future>
#include <mavsdk/mavsdk.h>
#include <mavsdk/plugins/shell/shell.h>
#include <iostream>
using namespace mavsdk;
#define ERROR_CONSOLE_TEXT "\033[31m" // Turn text on console red
#define TELEMETRY_CONSOLE_TEXT "\033[34m" // Turn text on console blue
#define NORMAL_CONSOLE_TEXT "\033[0m" // Restore nor... |
efd378dd832fbbd222a1c6d680d2311368f0af76 | da1af9fcee0db7fff8f2bd335ebc63b04b115f2f | archendian/ngensdk | /develop/now/Ngen.Reflection/include/Ngen.Reflection.EParameterTrait.hpp | C++ | hpp | 2,564 | permissive | /* _______ ________
\ \ / _____/ ____ ___
/ | \/ \ ____/ __ \ / \
/ | \ \_\ \ ___/| | \
\____|__ /\______ /\___ >___| /
\/ \/ \/ \/
The MIT License (MIT)
COPYRIGHT (C) 2016 FIXCOM, LLC
Permission is hereby granted, free of charge, to any pe... |
21c4fe6453bd719000c7cf46d6fb12802ad66d37 | c93262680b86f4a14946d1821a28fd5685d06ae4 | benjaminhuanghuang/ben-leetcode | /1526_Minimum_Number_of_Increments_on_Subarrays_to_Form_a_Target_Array/solution.cpp | C++ | cpp | 817 | no_license | /*
1526. Minimum Number of Increments on Subarrays to Form a Target Array
Level: Hard
https://leetcode.com/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array
*/
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered... |
9f3b78454692da10565826062e2753467ee082f0 | 34185bc06f6a028315d38ae8461d372fcee54d17 | mfkiwl/Beamfomer-on-GPUs | /Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.cc | C++ | cc | 2,584 | no_license | //# BeamFormerPipeline.cc
//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy)
//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
//#
//# This file is part of the LOFAR software suite.
//# The LOFAR software suite is free software: you can redistribute it and/or
//# modify it under the terms ... |
63c4889bdb09c07eab856009c16d1dd4db813582 | d6a9896c99931b7dbde1d2f6a97177aa15bdbd52 | six-beauty/six_beauty | /代码/socket_client/socket_client/socket.cpp | C++ | cpp | 2,969 | no_license | #include<iostream>
#include<WinSock2.h>
#include<string>
#include<time.h>
using namespace std;
#pragma comment(lib,"ws2_32.lib")
const USHORT PORT = 12345;
const std::string ipaddr= "192.168.123.1";
int main()
{
WSADATA wsaData;
int nResult;
nResult = WSAStartup(MAKEWORD(2,2), &wsaData);
sockaddr_in serverAddr;
... |
f0bb9f12ffc8282f711b3cbaa9c022339e4da458 | d9646c480a92c2924287c00c55bb177c2f74d0f3 | Ist163353/coolfluid3 | /plugins/UFEM/src/UFEM/ns_implementation/NavierStokesExplicitQuadsPressureGradient.cpp | C++ | cpp | 1,680 | no_license | // Copyright (C) 2010-2011 von Karman Institute for Fluid Dynamics, Belgium
//
// This software is distributed under the terms of the
// GNU Lesser General Public License version 3 (LGPLv3).
// See doc/lgpl.txt and doc/gpl.txt for the license text.
#include <coolfluid-ufem-config.hpp>
#include "../NavierStokesExplici... |
33b192d5dd92515c518c270595e37ecc8bec5e84 | f3a1936b54c6582ebd4ca840f43a612379fe3827 | Farbod909/GroundStation | /GS/tablemodel.cpp | C++ | cpp | 5,383 | no_license | #include "tablemodel.h"
TableModel::TableModel(QObject *parent)
: QAbstractTableModel(parent)
{
columns.push_back("Action");
columns.push_back("Longitude (X)");
columns.push_back("E/W");
columns.push_back("Latitude (Y)");
columns.push_back("N/S");
columns.push_back("Behavior");
}
TableMod... |
f660780130fc27053dff24ed755082e01e7ef74e | dd0903b0b890d12b714ee0b652a5020aeefa6809 | willamm/commie-protocol | /QtTerminal/QtTerminal/main.cpp | C++ | cpp | 1,252 | no_license | /*------------------------------------------------------------------------------------------------------------------
-- SOURCE FILE: main.cpp - The entry point to the program.
--
-- PROGRAM: Power to the Protocolteriat Terminal
--
-- FUNCTIONS:
-- int main(int argc, char *argv[]))
--
--
-- DATE December, 4, 2017
--
--... |
0400a75f7a4bbddf5e5c263a875321c911810880 | 78a45bafe8a55d018198f16eaf5d65d985dc54ac | elenoa429/openGLNetWorkGame | /Source/MV_menuBar.cpp | C++ | cpp | 8,296 | no_license | //==============================================================================
// タイトル : モデルビューアー用メニューバー
// ファイル名 : MV_menuBar.cpp
// 作成者 : AT13B284 21 数藤凌哉
// 作成日 : 2016/07/01
//==============================================================================
//===============================... |
0c3440621ae040b6ce32bb550e686f75fddae7b3 | a658e66636be43f0216b6ad03c7c7403ca992b41 | lifuxianoa/Mystudy | /acm/HDU/1030.cpp | C++ | cpp | 2,054 | no_license | #include <iostream.h>
#include <math.h>
//经典母函数算法
//using namespace std;
typedef unsigned long long ULL;
ULL getvalue(ULL row, ULL line)
{
return (row - 1) * (row - 1) + line;
}
void getpos(ULL value, ULL &row, ULL &line)
{
row = (ULL) ceil(sqrt(value));
line = value - (row - 1) * (row - 1);
}
ULL distance(ULL ... |
ecd04da086d7864541bf0cd3df4949d2ecac93f4 | f6b7a6b5c1ed9d6186a7bf4b2da2709d36da0f15 | marco-c/gecko-dev-wordified | /third_party/libwebrtc/third_party/abseil-cpp/absl/flags/internal/path_util_test.cc | C++ | cc | 2,052 | permissive | /
/
/
/
Copyright
2019
The
Abseil
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
/
/
/
/
https
:
/
/
www
.
apache
.
org
/
licenses
/
LICENSE
-
2
.
0
/
/
/
/
Unless
r... |
63d3b5a496da454af2bfc45f544137ac9f4ef75c | e93a0dd192cd80dc842291cd7a0c753dbf927001 | miquelramirez/gecode-homebrew | /gecode/int/nvalues/int-eq.hpp | C++ | hpp | 4,678 | permissive | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2011
*
* Last modified:
* $Date: 2016-04-19 17:19:45 +0200 (Tue, 19 Apr 2016) $ by $Author: schulte $
* $Revision: 14967 $
*
* ... |
32fbb063790c5255c12516328c5be9961e57f1ed | a4143c8266fff1337d2f2dfa8a0ecb30bf354fa6 | Tom-Deuschle/yacx | /src/jni/KernelArgJNI.hpp | C++ | hpp | 471 | no_license | #pragma once
#include "../../include/yacx/JNIHandle.hpp"
#include "../../include/yacx/KernelArgs.hpp"
namespace jni {
class KernelArgJNI : yacx::JNIHandle {
void *_hdata;
yacx::KernelArg *kernelArg;
public:
KernelArgJNI(void *data, size_t size, bool download = false, bool copy = true,
bool uplo... |
5ef4aa7228136f2287d37e6b7b7fa4864c23d553 | 060ea5041504195535d4003190f14985108045e8 | pvresky/clcalc | /clcalc.cpp | C++ | cpp | 2,276 | permissive | #include <iostream>
#include <string>
#include <sstream>
using namespace std;
enum Token_value {
START, END, NUMBER,
PLUS = '+', MINUS = '-',
MUL = '*', DIV = '/',
LP = '(', RP = ')'
};
bool isNumber(char ch);
Token_value get_token();
double expr(bool get);
double term(bool get);
double prim(bool get);
string s... |
50d697f1ce038585b969387b2ec3c3d36f14695a | 669f14988db6e6439b4734b2a0641e2e2bd81ed3 | diamond-lizard/common-music-3-9-0 | /src/Audio.cpp | C++ | cpp | 7,844 | no_license | /*
==============================================================================
Copyright 1999-2013 Rick Taube. All rights reserved.
Licensed under the "Attribution-NonCommercial-ShareAlike" Vizsage
Public License, which says that non-commercial users may share and
modify this code but must give credit a... |
26e95c2bcd91ce339af2532b0fabd662904c725b | aa85c49e8c482066f256e1ecdaca3b8ae58bd541 | RocKIn0X/probSolve2016 | /ioi/subset.cpp | C++ | cpp | 330 | no_license | #include <cstdio>
#include <math.h>
using namespace std;
int main() {
char c;
int count = 0;
scanf("%c", &c);
scanf("%c", &c);
if (c != '}') {
count = 1;
while (c != '}') {
scanf("%c", &c);
if (c == ',') {
count++;
}
}
}
printf("%d\n", (int)pow(2, count));
re... |
38aacb48afcead3badff2bac6ce24c11d0ad48ad | 9bf544e58b77e5001df4f7376c9fa2ed423bf4a0 | mauro-belgiovine/belgiovi-clmagma | /src/dormtr.cpp | C++ | cpp | 6,735 | permissive | /*
-- clMAGMA (version 1.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
September 2012
@author Stan Tomov
@author Raffaele Solca
@generated d Wed Oct 24 00:32:52 2012
*/
#include <stdio.h>
#include "common_magma.h"
e... |
4b73d376ed826513124d694817822ef9bfe780e2 | 0cf3004cff077d2d0d0dd18bcfabf23c32959bb6 | p-ameline/Episodus | /ns_ob1/Agent.cpp | C++ | cpp | 2,636 | no_license | /*
** Copyright Nautilus, (10/9/2004)
** david.giocanti@nautilus-info.com
** Ce logiciel est un programme informatique servant à [rappeler les
** caractéristiques techniques de votre logiciel].
** Ce logiciel est régi par la licence CeCILL soumise au droit français et
** respectant les principes de diffusion des logi... |
e80cd1ac567f533fdcb6e564dbc5edb2a824e515 | 7480a25b4bc07cc1a3f81e0877559b849ea28015 | wilseypa/llamaOS | /src/apps/net/shmem.cpp | C++ | cpp | 2,270 | permissive | /*
Copyright (c) 2014, William Magato
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 and the f... |
87710e0a4c8eb650b52b5b2c7549ec6a05b5ede9 | 9c79b9c6cc172765189c60af5477e9c53cdf220b | kai66673/QWorkNew | /libs/utils/fancylineedit.cpp | C++ | cpp | 17,183 | no_license | /****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may us... |
7d04fb507072cb7c3667659e2a2e8b9f97be2626 | 419edc568763258603c40b79a84675b0cc72b05c | tifui-alexandru/OOP_Chess_Project | /src/GameMenu.cpp | C++ | cpp | 3,550 | no_license | #include <SFML/Graphics.hpp>
#include "../include/GameMenu.h"
menuMode::menuMode()
{
terminate = false;
Game1v1Go = false;
Game1vPcGo = false;
menuGameGo = false;
if (!tusu1.loadFromFile("../images/menu_modes.jpg")) throw Exception("Failed to load image");
susu1.setTexture(tusu1);
if (... |
6f941b9cbfddeb72e2fa8c8db09314287c5d003e | 8f23e64939cd786ff2bd0444642b772c6e08f048 | hychyc07/contrib_bk | /src/eMorph/src/eventSniffer/src/eventBottleHandler.cpp | C++ | cpp | 12,158 | no_license | // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/*
* Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
* Authors: Rea Francesco, Charles Clercq
* email: francesco.rea@iit.it, charles.clercq@iit.it
* website: www.robotcub.org
* Permission is granted to ... |
f8ef5fc10ebf3aa5149d322a10a1b81235c6f464 | abfb2d2f0c05728f7aa40195f047d27aaec64b59 | masudursourav/Codeforces-Slove | /A. Print from 1 to N.cpp | C++ | cpp | 223 | no_license | #include <bits/stdc++.h>
using namespace std;
void printnum(int n,int c){
if(n>=c){
cout<<c<<"\n";
++c;
printnum(n,c);
}
else
return;
}
int main()
{
int n,c=1;
cin>>n;
printnum(n,c);
return 0;
}
|
dbd898b721ff2b3fcc1f82a362488e85379d1996 | 88ce239cb22d97240286141e43a154f26618d79d | niuxu18/logTracker-old | /second/download/squid/gumtree/squid_repos_function_5538_squid-3.4.14.cpp | C++ | cpp | 235 | no_license | void
Log::TcpLogger::disconnect()
{
if (conn != NULL) {
if (closer != NULL) {
comm_remove_close_handler(conn->fd, closer);
closer = NULL;
}
conn->close();
conn = NULL;
}
} |
264fa8feb48eb7b9d6b59d2e83454d64bc928257 | c926042431226aa102375a790c60d8043519e19b | AnshKetchum/programming-for-glory | /CodeForces/Random Problems/Effective Approach/approach.cpp | C++ | cpp | 568 | no_license | #include <bits/stdc++.h>
using namespace std;
#define MAXN 110000
int a[MAXN], b[MAXN], c[MAXN], n, q;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> a[i];
b[a[i]] = ( (!i || !b[a[i]] ) ? i : b[a... |
6616a8d35e0daabf3d3b64ecfddfd39f04701840 | 6c3861932c6e2e29a5d85fae7d7faf1c33284664 | ponspack9/TENGAI-Project1 | /TENGAI/ModuleSceneSea.cpp | C++ | cpp | 14,708 | permissive | #include "Globals.h"
#include "Application.h"
#include "ModuleSceneIntro.h"
#include "ModuleRender.h"
#include "ModuleTextures.h"
#include "ModuleMiko.h"
#include "ModuleInput.h"
#include "ModuleFadeToBlack.h"
#include "ModuleSceneForest.h"
#include "ModuleParticles.h"
#include "ModuleAudio.h"
#include "ModuleSceneOutr... |
f367935f6a5ba5d79044c07d0df5a4cf82b3a374 | 78e3ae3c30d1f4c662c1713b95577adc6200fbdc | amanjoshi668/Progrmming | /codeforces/508-2/A.cpp | C++ | cpp | 3,536 | no_license | #include <bits/stdc++.h>
#include<unistd.h>
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp> // Including seg_tree_order_statistics_node_update
#include <stdio.h>
#include <cassert>
using namespace std;
//using namespace __gnu_pbds;
typedef long long lo;
typedef long doub... |
f6d6bececb2fc3bd2495be2df7935d6f9d2c6ed8 | 49861590d46c74572d8a996257e16671f882c087 | seronet-project/SeRoNet-examples | /SeRoNet-Tooling-ROS-Mixed-Port/DomainRosModelsRepositories/ROSCommon_msgs/smartsoft/src/ROSCommon_msgs/Sensor_msgs_TimeReference.cc | C++ | cc | 1,871 | no_license | //--------------------------------------------------------------------------
// Code generated by the SmartSoft MDSD Toolchain
// The SmartSoft Toolchain has been developed by:
//
// Service Robotics Research Center
// University of Applied Sciences Ulm
// Prittwitzstr. 10
// 89075 Ulm (Germany)
//
// Information abo... |
29bdcabde896722b1ae914ae445820a4bd2bac26 | c797a8e5d62ac12d2ab131005b5dff6676b9f844 | otcshare/chromium-src | /content/browser/service_worker/service_worker_fetch_dispatcher.cc | C++ | cc | 32,290 | 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_fetch_dispatcher.h"
#include <string>
#include <utility>
#include <vector>
#include "base/bind.h... |
a301044728ce3da168f313c7b091b21b830c4c90 | 801d154d57eb1af05e7423b2f1f80c601e8bd795 | zhanglq79/GameLib | /Tools/src/RobotCtrl/src/rpc/CRobot_UpdateRobotStatue_Server.cpp | C++ | cpp | 249 | no_license | #include "CRobot.h"
Msg::ObjectMsgCall * Robot::CRobot::UpdateRobotStatue_RpcServer(INT32 nSessionID, Msg::Object objSrc , INT32 status/* = 0*/)
{
INT32 res = 0;
std::cout << "CRobot::UpdateRobotStatue_RpcServer "<< std::endl;
Return(res);
}
|
481693e7e445a9b97b361cb4ec3d24c6fb091151 | b4d0c6fe78931675787c0bfbc3b8f0b612a189a7 | jiaoew1991/practice | /poj/1005_houseboat.cpp | C++ | cpp | 425 | no_license | #include <iostream>
#include <cmath>
using namespace std;
const double PI = 3.1415926;
int main(int argc, const char *argv[])
{
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x, y;
cin >> x >> y;
cout << "Property " << i + 1 << ": This property will begin eroding in year " <... |
3e02e5c458107442986d31a2501011c37d2ecf16 | 899b9a63edc0e277006977bf9d5ba9db21b92529 | MuntasirNahid/oj-solution | /cf-1520-A.cpp | C++ | cpp | 803 | no_license | #include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define pi acos(-1)
#define INF 1e18
#define MN7 ios::sync_with_stdio(0);cin.tie(nullptr);
#define MOD 1000000007
#define popb pop_back()
#define popf pop_front()
#define revers(x) reverse(x.begin(),x.end())
#define fo(i,a,n) for(i=a;i<n;i++)
using names... |
5e5a17a1f3018f2d27c7b1af7d771b87797c6834 | 008ccb1681cd87dba354102c4959348a603d3ef6 | Leejung8763/catboost | /contrib/libs/cxxsupp/libcxx/src/mutex.cpp | C++ | cpp | 6,427 | permissive | //===------------------------- mutex.cpp ----------------------------------===//
//
// 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
//
//===---------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.