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 |
|---|---|---|---|---|---|---|---|---|
f2b08ec32ac74efdf043a9d8c0b370b15965feaf | 356a866e287a668766532b7877b16a2498c370f5 | Azzhag/Win2D | /winrt/lib/CanvasBitmap.cpp | C++ | cpp | 6,216 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use these files 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 applicab... |
52f7bbb3bfd29a8b4d99a50964c7e23683ef8eeb | 97bbc87367d4db499d267733666a8b541a410363 | Jeannix/EDA | /ejemplos/source/counting_int.cpp | C++ | cpp | 699 | no_license | // Copyright
#include <algorithm>
#include <fstream>
#include <iostream>
#include <iterator>
class LessThan {
public:
explicit LessThan(int maxValue) : upperBound(maxValue) {}
bool operator()(int value) const { return value < upperBound; }
private:
const int upperBound;
};
int main() {
co... |
ff2b1d1eac286d4b5a6da98941bf73efcfd9dffe | ea50a9bb2ff898e4f8472c4347472ba93fbb0f30 | hvellyr/herschel | /bootstrap/test/tst_str.cpp | C++ | cpp | 7,132 | permissive | /* -*-c++-*-
This file is part of the herschel package
Copyright (c) 2015 Gregor Klinke
All rights reserved.
This source code is released under the BSD License.
*/
#include "catch/catch.hpp"
#include "../str.h"
#include <iostream>
#include <string>
using namespace herschel;
TEST_CASE("String lengt... |
df4fd6144bcf21e7f101181e716730d8db42d2fa | 72e323b3483a60f92b2323845afbfe54e92c93ce | kspine/simple-platformer | /src/Main.cpp | C++ | cpp | 7,552 | permissive | #include "config.hpp"
#include "object/Cube.hpp"
#include "ui/Framerate.hpp"
#include "ui/Title.hpp"
#include <Corrade/PluginManager/Manager.h>
#include <Corrade/Utility/Resource.h>
#include <Magnum/Context.h>
#include <Magnum/DefaultFramebuffer.h>
#include <Magnum/Platform/Sdl2Application.h>
#include <Magnum/Rendere... |
230fcfed9878695600d7402ed365550342cbadf2 | 75dab21ad8a8934b5fd9aac31daa8536c28d4817 | elwyncrestha/C-Basics | /72. Write a C program to swap two numbers using argument but no return value function.cpp | C++ | cpp | 337 | no_license | #include<stdio.h>
void swap(float a,float b);
int main()
{
float x,y;
printf("Enter value of x:\n");
scanf("%f",&x);
printf("Enter value of y:");
scanf("%f",&y);
swap(x,y);
}
void swap(float a,float b)
{
float temp;
temp=a;
a=b;
b=temp;
printf("The value of x after swap:%f\n",a);
printf("The value of y afte... |
e7ead78cdcce0dbad6c514e9cfe19d42dd84f421 | 87fd508644ece3de05826a435f0c3cdeea20890c | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/LogicalPortSettings/tests/LogicalPortSettings.Tests/main.cpp | C++ | cpp | 2,058 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
33fffe76e95fa473b0dfcbcf58816fcf4e35f149 | f0bb9db627c5095a347793d3a54dfc7f1ae688e6 | yoferzhang/UvaOnlineJudge | /10366-FaucetFlow.cpp | C++ | cpp | 1,893 | no_license | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <string>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <stack>
#include <queue>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
using n... |
a03cf1674e281fd2aa1eccabee282fae13ba2ab0 | 2f5db7d19da9a7ee5ea5f4e29b0a5ba21dac24b5 | aljazk/navigation_mesh | /src/screens/MainMenu.cpp | C++ | cpp | 2,275 | no_license | #include "MainMenu.hpp"
MainMenu::MainMenu(){
// create font
font.loadFromFile("arial.ttf");
// create text
text.setFont(font);
// define eclipsed time
eclipsed = 1;
// create interface
createGUI();
}
void MainMenu::createGUI(){
int startPos = 50;
int sizeY = 30;
int gap = 4;
Button mbutton;
mbutton.setP... |
e2c4842f2d14cfc5342fb3d9dac8a689948af1a3 | 4c9138ee195663e85ec785c696a66cee6b7ce332 | SreeramGarlapati/qpid-proton | /proton-c/bindings/cpp/src/ssl.cpp | C++ | cpp | 2,212 | permissive | /*
*
* 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 License, Version 2.0 (the
* "License"); y... |
68a3ca8eccadddcdc1bf0396372a42829af5f62b | 73f3b71eeecaaae2814a356fe690dd95c800ae59 | drivestudy/SARibbonBar | /SARibboniconstyle.cpp | C++ | cpp | 636 | no_license | #include "SARibbonIconStyle.h"
SARibbonIconStyle::SARibbonIconStyle():m_iconSize(16,16)
{
}
SARibbonIconStyle::~SARibbonIconStyle ()
{
}
int SARibbonIconStyle::pixelMetric(PixelMetric metric, const QStyleOption * option, const QWidget * widget) const
{
int s = QProxyStyle::pixelMetric(metric, opt... |
df7f41b85f0b68762dfaa3aca33634c395ebb5f7 | 898d7cf38b8fbd6a3dbbbf898530ca10e781786a | ebayboy/ngx_security_waf | /ModSecurity/src/engine/lua.cc | C++ | cc | 12,169 | permissive | /*
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* 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
*
* If any of the files rela... |
516f20ed52a7e4dbaed1f816682c460faaf761bf | 5d45a13422196a675081206ffbd088863ae5c002 | ttzztztz/leetcodeAlgorithms | /多指针问题/1156. Swap For Longest Repeated Character Substring.cpp | C++ | cpp | 1,482 | no_license | class Solution {
public:
int maxRepOpt1(string text) {
const int n = text.size();
unordered_map<char, int> a, cur;
for (const char ch : text) a[ch]++;
auto needMove = [&]() -> bool {
if (cur.size() <= 1) return false;
if (cur.size() >= 3) return true;... |
94d3f71ab30647371ebae4013fff59ef552ab575 | f5fcb02c35a20e1bea17d18f6e536985fdc9434c | asad14053/My-Online-Judge-Solution | /Codeforces round Solution/code_forces(385)a.cpp | C++ | cpp | 2,512 | no_license | #include<bits/stdc++.h>
using namespace std;
#define fr(i,a,b) for(int i=(a);i<(b);i++)
#define rfr(i,a,b) for(int i=(b-1);i>=(a);i--)
#define freach(i, c) for( __typeof( (c).begin() ) i = (c).begin(); i != (c).end(); ++i )
#define rep(i,n) for(int i=0;i<(n);i++)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define for... |
7224cc2879cec94560fa803f9491ad09113fd97e | 3da1dea0c25d10c4380cc49bc746fbbe00e7ab58 | kongdeming/MockFFMPEG | /simplest_ffmpeg_player_2.5/simplest_ffmpeg_helloworld/simplest_ffmpeg_helloworld.cpp | C++ | cpp | 3,752 | no_license | /**
* 最简单的FFmpeg Helloworld程序
* Simplest FFmpeg HelloWorld
*
* 雷霄骅 Lei Xiaohua
* leixiaohua1020@126.com
* 中国传媒大学/数字电视技术
* Communication University of China / Digital TV Technology
* http://blog.csdn.net/leixiaohua1020
*
*
* 本程序是基于FFmpeg函数的最简单的程序。它可以打印出FFmpeg类库的下列信息:
* Protocol: FFmpeg类库支持的协议
* AVFormat: ... |
db95606a575d8d2c5175add78e531a1704de0717 | c64a77a704c5c503cf4fc942c785e2e5f98890d2 | OliverTHK/cpp-programming | /Lab Tutorials/Lab01/average.cpp | C++ | cpp | 615 | no_license | // average.cpp
// This program finds the average of two numbers.
// It contains two errors that must be fixed.
#include <iostream>
using namespace std;
int main ()
{
int size = 2; // The number of values to be averaged
double num1,
num2,
average; // Average of num1 and num... |
03a3c753de0cd30a5ee4501d180cdba58f1d02fe | 95c15d6dff40376454621f26daa1417fe6a48b69 | brianmok/Keep3r | /main.cpp | C++ | cpp | 2,054 | no_license | #include <iostream>
#include "RobotCom.h"
#include "PrVector.h"
#include "Vision.h"
int const LEFT_POLE = 160;
int const RIGHT_POLE = 320;
float const MPP = 1.0 / 100;
int main(int argc, char** argv) {
initVision();
while (1) {
bool kickInProgress;
float y_f = processFrame(kickInProgress);
... |
a8372b096596de05d7b19ad0b75082c7e8354b8f | 574ff22e66c04f39c48f282cb284259869c097e5 | madhav-bits/Coding_Practice | /leetSumOfAllSubetXORTotals.cpp | C++ | cpp | 3,444 | no_license | /*
*
//******************************************************1863. Sum of All Subset XOR Totals.******************************************************
https://leetcode.com/problems/sum-of-all-subset-xor-totals/
*******************************************************************TEST CASES:***************************... |
79d64d0bd83de2488358e94fe7141a9ee91064c6 | 28b517d8040462b70ef65eb6c7ffc3c012a97699 | wasimusu/opengl_glut_setup | /opengl_setup.cpp | C++ | cpp | 1,142 | no_license | #include <iostream>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <windows.h>
void display(void) {
glColor3d(1,1,0);
glutSolidSphere(1.0, 25, 25);
glFlush();
}
void init(void) {
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
... |
7a4d440d626555438027c7da0bd0713c2094e04d | a80d58ff71171109dff15088b36ecae886cc69b0 | Coderode/Cpp-new | /c++ solution of attached pdf/ass7/ass7-1.cpp | C++ | cpp | 896 | no_license | #include<iostream>
#include<conio.h>
using namespace std;
template<class T>
class Num{
T a,b,c;
public:
Num()
{
cout<<"\nEnter numbers: "<<endl;
cout<<"\nNumber 1 : ";
cin>>a;
while(!cin)
{
cout<<"\nError enter again\n";
cin.clear();
cin.ignore();
cin>>a;
}
cout<<"\nNumber 2 :... |
720c39c465bac5ba75c8112241cb231c5aa466f9 | 950dcee7860562adfa1c6c6846ccc891fc40df75 | DougGregor/swift-lldb | /source/Plugins/Language/CPlusPlus/LibCxxVector.cpp | C++ | cpp | 4,378 | permissive | //===-- LibCxxVector.cpp ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
d0b9b3afce2f3db843a7d7574e80e9be600b7c94 | 28d0cb1dbf1fdce2f8127f843e622b80edfc0cf1 | windcry1/My-ACM-ICPC | /SWUST OJ/1103.cpp | C++ | cpp | 979 | permissive | //Author:LanceYu
#include<iostream>
#include<string>
#include<cstring>
#include<cstdio>
#include<fstream>
#include<iosfwd>
#include<sstream>
#include<fstream>
#include<cwchar>
#include<iomanip>
#include<ostream>
#include<vector>
#include<cstdlib>
#include<queue>
#include<set>
#include<ctime>
#include<algorithm>
#includ... |
359667161d372c8858f40d9d7e6695d9041b34d6 | 265c80c87348dceecc9d88f3b0c7ecfcc2c656ea | lmoes42/cpphw1 | /week1ex7.cc | C++ | cc | 591 | no_license | #include <iostream>
using namespace std;
int main()
{
uint64_t value = 0;
value = value + 3;
value = value << 5;
value = value + 0;
value = value << 4 ;
value = value + 7;
value = value << 4;
value = value + 15;
value = value << 4;
value = value + 15;
value = value << 4;
... |
563dfdac1cb6e40fad6b21ac1532f6529815959d | 35cb750ae32c53aafc868e9e02cfa29674b256fa | dyemanov/firebird | /src/dsql/BoolNodes.cpp | C++ | cpp | 47,670 | no_license | /*
* The contents of this file are subject to the Interbase Public
* License Version 1.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.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* ... |
eaa039b61194c6943899f4fbc955cc10f83576db | 8d2d7671860a575e4cd468aa3d163866d57bfd91 | 15831944/cbwindows | /GShr/LBoxPiec.cpp | C++ | cpp | 5,343 | permissive | // LBoxPiec.cpp
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitatio... |
3e661314e9d04cc5c0bddfe9214750290cbb7f19 | c65d9eb82dbcbb7fbb3fc8455e2438ab3a504b0a | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE23_Relative_Path_Traversal/s03/CWE23_Relative_Path_Traversal__char_listen_socket_w32CreateFile_10.cpp | C++ | cpp | 7,527 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE23_Relative_Path_Traversal__char_listen_socket_w32CreateFile_10.cpp
Label Definition File: CWE23_Relative_Path_Traversal.label.xml
Template File: sources-sink-10.tmpl.cpp
*/
/*
* @description
* CWE: 23 Relative Path Traversal
* BadSource: listen_socket Read da... |
e355ee46c7fdf6130be78ff38910d677a29808cc | 72989a353d762ef988a136ea4f606f2ff51b347f | mjjimenez/pytorch | /aten/src/ATen/native/UnaryOps.cpp | C++ | cpp | 24,422 | permissive | // define constants like M_PI and C keywords for MSVC
#ifdef _MSC_VER
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#endif
#include <ATen/ATen.h>
#include <ATen/Dispatch.h>
#include <ATen/ExpandUtils.h>
#include <ATen/NativeFunctions.h>
#include <ATen/LegacyTHFunctionsCPU.h>
#include <AT... |
0d65ee0fb70ef8c7d28cdb2487684338824da993 | 8f672c36105dd5416e0de45cd7fc15ecd298efd9 | Larissa-22/Trabalho_Github_1-B-_-Mylena---Larissa- | /projetoGIT1.cpp | C++ | cpp | 1,908 | no_license | #include <iostream>
#include<string>
using namespace std;
/*
Conta todas as letras 'letra' contidas em 'texto'
*/
int contaLetras(char letra, string texto)
{
int qtdletras=0, i, qtd;
qtd=nome_length();
for(i=0;i<qtd;i++)
{
if(texto[i]==letra)
{
qtdletras++;
}
}
return qtd... |
42e66e2b074ca2300394c37bd501b1b068f8268f | 8a6b4baaeb3bc70c8cfe9e350cf6b363b9cdbb8f | dimiturtrz/fmi-tables-oop-project | /helpers/CellUtils.cpp | C++ | cpp | 1,423 | no_license | #include "CellUtils.h"
// black magic, do not touch
CellType determineType(const char* cellContent) {
const char* reader = cellContent;
for(; *reader == ' '; ++reader);
if(*reader == '\0') {
return String;
}
if(*reader == '=') {
return Formula;
}
bool isInteger = true;
bool isDouble = true;
int i = ((r... |
4f62262b91bfdb7961bd2dcc6385d93d32773d60 | 208dbe64c20173b9b3575bdb26d1e3084885dc5f | kimsin3003/NewWorld | /NewWorld/WinMain.cpp | C++ | cpp | 705 | no_license | #include "Engine/RContext.h"
#include "GameManager.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
MSG msg;
bool done;
// Initialize the message structure.
ZeroMemory(&msg, sizeof(MSG));
// Loop until there is a quit message from the window or the user.
done ... |
a92500ea4f108d7949af5a339eaf214e33566cd7 | 41dccc798ec62f40c2e970b063d7d56358264fe3 | Florence42/CPP | /d05/ex03/ShrubberyCreationForm.hpp | C++ | hpp | 1,419 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ShrubberyCreationForm.hpp :+: :+: :+: ... |
5392b146568922a26cdfb789314db152a6a8a814 | 1e70c6c38874d6ace3f8aceb9d6c34f4f32b9e0b | MormonJesus69420/Applied-Geometry-And-Special-Effects | /GMlib/modules/opencl/memory/gmbuffergl.cpp | C++ | cpp | 1,798 | permissive | /**********************************************************************************
**
** Copyright (C) 1994 Narvik University College
** Contact: GMlib Online Portal at http://episteme.hin.no
**
** This file is part of the Geometric Modeling Library, GMlib.
**
** GMlib is free software: you can redistribute it ... |
192756da4051d78b2f2e9dd6c08a2b5fa3541823 | f0b2908d5fad0468fe9999783d3a6ffed0d0bd52 | Chippiewill/kv_engine | /engines/ep/src/mutation_log.cc | C++ | cc | 32,355 | permissive | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2015 Couchbase, 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
*
* h... |
f76643fa8db10f42aa530300c8e036090dfdcc56 | 9943a59e7fec31958d381fa811096ea2cda19701 | vlad054/basics-of-c-plus-plus-development-red-belt | /Week_5/09 Programming Assignment/Solution/explore_key_words.cpp | C++ | cpp | 4,146 | permissive | #include "test_runner.h"
#include "profile.h"
#include <map>
#include <string>
#include <algorithm>
#include <future>
//----------------------------------------------------------------------------------------------------
struct Stats
{
std::map<std::string, int> word_frequences;
void operator +=... |
fecf9bdc41dc7704c4d8b505fdc47144354d2308 | 388d30219eae986573eabaae74fec27dd85229a8 | elime920/CursoFCII-2020-1 | /Documentos/Parcial3/CC1017246165/parcial3.cpp | C++ | cpp | 3,642 | no_license | //Parcial de:
//Santiago Andrés Pérez
//Bryan Pérez
//Juan José Ochoa
#include<iostream>
#include<iomanip>
#include<cmath>
#include <fstream>
#include <cstdlib>
using namespace std;
class Hiperbolicas{ //Clase que nos resuelve la ecuación hiperbólica
private:
double h,k,lambda; //Densidad de pasos
double Longit... |
f17e3a159f6ce0aa71b2dd0b46ee4c5203d2f8a5 | a0986fb9f3960ce6089103b38e298f5e608042e4 | Jumpy237/HackerRank | /Easy Problem/Viral Advertising.cpp | C++ | cpp | 304 | no_license | #include<bits/stdc++.h>
#include <string>
using namespace std;
#define db(arg) cout << "debug : " << arg << endl;
int main()
{
int n;
scanf("%d",&n);
int days[n];
int sum = 2;
days[1] = 2;
for(int i = 2; i <= n; ++i)
{
days[i] = (days[i-1] * 3) / 2;
sum += days[i];
}
printf("%d\n",sum);
}
|
38ccfa21ff57df2cd0e717dec976cd0de39920d3 | 57b07f3fbf7e18000783ca36aa71b5d1cd0f4b4f | truenas/ports | /www/chromium/files/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc | C++ | cc | 1,562 | permissive | --- third_party/blink/renderer/platform/fonts/font_metrics.cc.orig 2021-04-14 18:41:10 UTC
+++ third_party/blink/renderer/platform/fonts/font_metrics.cc
@@ -38,7 +38,7 @@
namespace blink {
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || d... |
7cc62b90ef4dbeb80664bf397cc73260696f3242 | b23e5647699bf7585c342ed9e66e9b42d4df7479 | edenb/SODAQ_EVENT_ATT_MAKER | /sodaq-saraR4-maker/Command.cpp | C++ | cpp | 5,208 | no_license | /*
Copyright (c) 2016, SODAQ
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 following disclaime... |
b9882412c77ab85bf06f6a0c6dd6a56c936714aa | 1001abc26776e7bf3243b1cf758faa5be9a2b79f | Daikon-Sun/VFX2017 | /hw2/src/stitching.hpp | C++ | hpp | 1,206 | no_license | #ifndef _STITCHING_HPP_
#define _STITCHING_HPP_
class STITCHING {
public:
STITCHING(const int& p_mode, const vector<double>& para, const vector<Mat>& i,
const vector<vector<Keypoint>>& k,
const vector<vector<vector<pair<int,int>>>>& m,
vector<vector<Mat>>& s, vector<vector<pair<int,in... |
cf1f1ebd1376067f4d4787c7f2f1687510ed95b4 | 4fffd26521e76e9c78dca4061ea9bfd02b1c0fdd | aleksha/prm | /configs/geom/amber-pilot/PRMDetectorConstruction.hh | C++ | hh | 1,314 | no_license | #ifndef PRMDetectorConstruction_h
#define PRMDetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
/// Detector construction class to define materials and geometry.
class PRMDetectorConstruction : public G4VUserDetectorConstruction
{... |
9207c0650ae5fb2630b9e78ade1a7f9399e4b33a | e1d50b4e6e34b7c957eafb39b5f73cc65059edf3 | tagattie/FreeBSD-Electron | /devel/electron20/files/patch-content_browser_browser__main__loop.cc | C++ | cc | 1,966 | permissive | --- content/browser/browser_main_loop.cc.orig 2022-08-01 19:04:28 UTC
+++ content/browser/browser_main_loop.cc
@@ -241,6 +241,12 @@
#include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h"
#endif
+#if BUILDFLAG(IS_BSD)
+#include "content/browser/sandbox_host_linux.h"
+#include "content/public/common/zygote... |
ad624aa9f3798ebd5431a49c48ab554cb66f626f | e197fc36748049f0f0130c9a974d31fef3347a49 | maikebing/vpp | /test/examples/code/3rdparty/assimp/detail/RemoveVCProcess.cpp | C++ | cpp | 10,886 | permissive | /*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2016, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
w... |
11ee1c635d6b3bd6ffd740bf8848faf6718afce4 | 76d4a69e2e78aa98e38bf2005e48640ecf0855fb | madi346/Undergrad-Work | /Labs/cs211 cabbage wolf game/Source.cpp | C++ | cpp | 3,882 | no_license | #include <iostream>
using namespace std;
void DisplayStateIsland(char island[2][4]) {
cout << "ISLAND 1 : ";
for (int i = 0; i < 4; i++) {
cout << island[0][i] << ", ";
}
cout << endl << "ISLAND 2 : ";
for (int i = 0; i < 4; i++) {
cout << island[1][i] << ", ";
}
}
int DisplayChoices() {
int choiceNum;
... |
f29539d996c364be08733dee4a6e6564a3e13f68 | d4b5c0ad5fd1e63e3a28dc69aacbf32c883890d7 | NessOffice/Sync_Code | /purple/3.array/QUE-Floating-Point Numbers(UVA 11809)/test.cpp | C++ | cpp | 594 | no_license | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
char s[30];
double p,M[10][32],m,x;
long long q,E[10][32],e;
for(int i=0;i<=9;i++)
for(int j=1;j<=30;j++){
e=pow(2,j)-1;
m=1-1/(pow(2,i+1));
x=log10(m)... |
766b3d0cb4eead826a471cf4f224a448391cb65c | c4eb46b49803ae1e21691f202edf22c61acb9256 | kronicler/cs2040_DSnA | /KattisPractices/James/diablo.cpp | C++ | cpp | 346 | no_license | #include <iostream>
#include <cmath>
using namespace std;
const long double pi = 3.14159265358979328;
int main () {
long double area, fencing;
cin >> area >> fencing;
long double radius = fencing/(2*pi);
long double a = radius*radius*pi;
(area <= a)? cout << "Diablo is happy!" << endl : cout << "Need more materia... |
098ddb1ee966fd44bfa0f9cceeb1aff8c9d8a8b7 | e482dd9f114fce1ddc9d7786856bc8724d5977d8 | MarcelHB/mpi-rma-static-analysis | /src/LLVMBasedMICFG.cpp | C++ | cpp | 20,683 | permissive | /**
* Modified version of Phasar file `LLVMBasedICFG.cpp`, initially written by:
*/
/******************************************************************************
* Copyright (c) 2017 Philipp Schubert.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of PHAS... |
51be5eac10e78de2ceae5d3b03dc930d7424fcce | 9bda26e72d646c04315fc3353ad312e10386936d | vvasco/gazebo | /gazebo/rendering/VideoVisual.hh | C++ | hh | 1,442 | permissive | /*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* 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 appl... |
85b217c0e9eb4e7a4f0afe4d220cbecca613a398 | 5e689d1520a50997e50e03aca6546c8d34e267b8 | koskot77/framework | /Readers/EMTFReader.cxx | C++ | cxx | 3,055 | no_license | using namespace std;
#include "EMTFReader.h"
#include "TTree.h"
#include "TBranch.h"
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/L1TMuon/interface/EMTFTrack.h"
#include "DataFormats/L1TMuon/interface/EMTFHit.h"
//using namespace l1t;
edm::Wrapper<vector<l1t::EMTFTrack>> *__emtfTracks = ne... |
a5856bfb71cf9ae80d3888663553ea62ab213c77 | dd059d879306e63ce4270b732072c1f5c2fffb54 | geigev/chromium | /chrome/updater/updater.cc | C++ | cc | 4,686 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/updater/updater.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/at_exit.h"
#include "base/ca... |
5dbe1cd5b64c84df7aed660a08a91ff0072fedda | bbe9606baa7b517c66c66f01c7180ddd75258a20 | agentsamX/HarmonicSemester2 | /Semester2Game/MathModule/Arrow.cpp | C++ | cpp | 542 | no_license | #include "Arrow.h"
#include "Scene.h"
Arrow::Arrow()
{
}
int Arrow::GetArrowType()
{
return 0;
}
int Arrow::SetArrowType()
{
return 0;
}
void Arrow::SetFrozen(bool fro)
{
frozen = fro;
}
bool Arrow::GetFrozen()
{
return frozen;
}
void Arrow::AddArrTime(float delta)
{
arrTime += d... |
2cefd49356e0d22470e310e22c82722910bfc680 | 2137e657054b90968e2ffe941ac7a6b8a92df24f | TurkerKoc/Data-Structures | /Stack implement k stacks in a single array/Stack implement k stacks in a single array/main.cpp | C++ | cpp | 1,641 | no_license | //
// main.cpp
// Stack implement k stacks in a single array
//
// Created by Turker Koc on 11.11.2018.
// Copyright © 2018 Turker Koc. All rights reserved.
//
#include <iostream>
using namespace std;
class kStacks
{
public:
kStacks(int k, int size)
{
n=size;
s = new int[k*n];
top =... |
b586769c8b532c6364abbaa801fa928022006b46 | eb14b6589f5d8749ee236b7c3aa3973609815614 | Bubbus/AlterCAtion | /components/miscShared/functions.hpp | C++ | hpp | 499 | no_license | class miscShared
{
file = "components\miscShared";
class getDirPos{};
class teleportPlayer{};
class tryMoveIntoVehicle{};
class isKindOfAny{};
class insertLoadoutIntoCrate{};
class addWeaponToCrate{};
class isContainer{};
class sideToString{};
class ignoreZeus{};
class makeEx... |
6711718e7be36e78ffbe8f87bc7297c39c1d6fb6 | b578c8462f05653d5ac201c5c1a5708c122cc3ec | NoOverflow/ige | /ige/src/plugin/ScriptPlugin.cpp | C++ | cpp | 1,675 | permissive | #include "ige/plugin/ScriptPlugin.hpp"
#include "ige/core/App.hpp"
#include "ige/ecs/Entity.hpp"
#include "ige/ecs/System.hpp"
#include "ige/ecs/World.hpp"
#include "ige/plugin/TimePlugin.hpp"
#include <cstdint>
using ige::core::App;
using ige::ecs::EntityId;
using ige::ecs::System;
using ige::ecs::World;
using ige::p... |
1b5023c9b217c75e0ef2586dd8bda5957d1f250b | 0f8b8c87b32fb475990ab30cf9fac80fe97b2a95 | RevolutionBTC/test-rbtc | /src/test/blockencodings_tests.cpp | C++ | cpp | 14,686 | permissive | // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <blockencodings.h>
#include <chainparams.h>
#include <consensus/merkle.h>
#include <pow.h>
#include <streams.h>
#in... |
8982392f6139e7a4782d8c7cc279d200a9b6e13a | b1edcb77c7870d50ad5ec9193b10718ec920978e | frgossen/iree | /compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUTensorPad.cpp | C++ | cpp | 4,839 | permissive | // Copyright 2023 The IREE Authors
//
// Licensed 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
#include "iree/compiler/Codegen/LLVMCPU/LLVMCPUPasses.h"
#include "iree/compiler/Codegen/PassDeta... |
6926dea04be2779737d0c914639dc9730e9bc897 | aba9d81b019df73add9585e03ca7b5e1397dec27 | mortunco/calib | /clustering/cluster.cc | C++ | cc | 19,176 | permissive | //
// Created by borabi on 20/12/17.
//
#include "cluster.h"
#include "kseq.h"
// #include <pthread.h>
#include <zlib.h>
#include <thread>
#include <mutex>
#include <stack>
#include <algorithm>
#include <time.h>
#include <math.h>
#include <stdio.h>
// Debug includes
#include <sstream>
#include <iomanip>
KSEQ_INIT(gz... |
3414d992dcbe431b69434c607bb4078e73076a43 | fcd99e83dc1fa678eb04bddb8be23ab49c939d79 | stayinhungryandfoolish/tencentcloud-sdk-cpp | /mongodb/src/v20190725/model/CreateDBInstanceHourRequest.cpp | C++ | cpp | 12,261 | 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
... |
899e45a994ffb4f89bb4a13b9133e0b5c8a28551 | 34fde1f6ab0c922fdf8fd9c73640a8bc18250481 | echdicode/CTDL | /tongdaycon=k.cpp | C++ | cpp | 707 | no_license | #include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
int n,k,a[11],socuoi,cc[11],count1=0;
int check(){
int sum=0;
for(int j=0;j<n;j++){
if(cc[j]==1){
sum+=a[j];
socuoi=j;
}
}
if(sum==k) return 1;
return 0;
}
void inKQ(){
if(check()){
for(int j=0;j<n;j++){
... |
9cb1ce5ef549d82ffa9efa18d4a581183b2a6686 | 0b8f862f2a267c40e3080bfe4da8c7a8923853a8 | rushilpaul/competitive-programming | /contests/codeforces/332_div2/B.cpp | C++ | cpp | 4,760 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<double> VD;
#define EPS (std::numeric_limits<double>::epsilon())
#define max_buf_size 1024
#define rep(i,n) for(int i=0;i<(n);i++)
#define repab(i,a,b) for(int i=(a... |
cdf48540de05305600cf87a3cecb577bbfc15a81 | 26cc2654808fa45066307d97dde9a55b4e50c816 | cterrevo/AliPhysics | /PWGCF/FEMTOSCOPY/FemtoDream/AliAnalysisTaskOtonkd.cxx | C++ | cxx | 37,311 | no_license | /*
* AliAnalysisTaskOtonkd.cxx
*
*
* reCreated on: 20 Oct 2021
* Authors: bernhardhohlweger, Bhawani, Oton
*/
#include "AliAnalysisTaskOtonkd.h"
#include "AliFemtoDreamBasePart.h"
#include "AliAnalysisManager.h"
#include "AliInputEventHandler.h"
#include "AliAODInputHandler.h"
#include "AliMCEvent.h"
#incl... |
1eb3dfe25b3ee0f9bc588381c3b552c3568de67e | e9615ada4397364a4c70c546073d7218b13ead59 | RaresC21/ProgrammingContests | /ICPC/SWERC/2014/F.cpp | C++ | cpp | 1,899 | no_license | /*
/home/rares/ProgrammingContests/ICPC/SWERC/2014/
F.cpp
*/
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,m,n) for(int i = (m); i < (n); i++)
#define ROF(i,m,n) for(int i = (n)-1; i >= (m); i--)
#define foreach(x,i) for( __typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
typedef long lon... |
8385237e9ac3bf69ee506bdfb6fa585c020220f9 | 3b915276aeb12f30e824470b32ed234fd0b0a702 | stratwine/epi | /Rotate_array.cpp | C++ | cpp | 1,455 | no_license | // Copyright (c) 2013 Elements of Programming Interviews. All rights reserved.
#include <algorithm>
#include <cassert>
#include <iostream>
#include <random>
#include <vector>
#include "./Rotate_array.h"
#include "./Rotate_array_permutation.h"
using std::cout;
using std::default_random_engine;
using std::endl;
using ... |
6f69af494b55eb068a1a2fe7d63fbb63addb9488 | e268902ba98332341023077b7c15d3528ad281b4 | tienpv147/code-assignment | /C++ practice/DSAA/emailaddress.cpp | C++ | cpp | 458 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
cin.ignore();
string val;
vector<string> vec;
for (int i = 0; i < n; i++)
{
getline(cin, val);
vec.push_back(val);
}
sort(vec.begin(), vec.end());
vec.erase(unique(vec.begi... |
c84feb420755a2d335748300019034b5ead8b342 | 7b0c4e7eca0162601ae8fcc2db8b814187de142a | unflynaomi/algorithms | /3.BruteForceAndExhaustiveSearch/ImplicitGraphSearch/Sudoku/Sudoku网上多解版.cpp | C++ | cpp | 1,977 | no_license | //Memory Time
//184K 422MS
#include<iostream>
#include<string.h>
#include<fstream>
using namespace std;
int map[10][10]; //九宫格
bool row[10][10]; //row[i][x] 标记在第i行中数字x是否出现了
bool col[10][10]; //col[j][y] 标记在第j列中数字y是否出现了
bool grid[10][10]; //grid[k][x] 标记在第k个3*3子格中数字z是否出现了
//(这里说明的字母不代表下面程序中的变量)
void DFS(... |
fd41db567ec6e4c9cd3e4d6494b75e997263bec4 | 1c4de6c8d4623cb1c53c67797a686cebf9ce6990 | iraAlor/CSE167Projects | /CSE167Project3/Window.cpp | C++ | cpp | 13,564 | no_license | #include <iostream>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "Window.h"
#include "Cube.h"
#include "Matrix4.h"
#include "Globals.h"
int Window::width = 512; //Set window width in pixels here
int Window::height = 512; //Set window height in pixels h... |
d1c2f380d86884d6be21e4a861df7b99af8b6f0c | 668864b0cf92150ca2c1e71b4a778aded57c2fa7 | aejsmith/gemini | /Engine/Runtime/Engine/DebugWindow.cpp | C++ | cpp | 1,527 | permissive | /*
* Copyright (C) 2018-2020 Alex Smith
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DIS... |
91f3c4d61c5df03f2dee05d6302f5c9440f526d0 | 3499e8c04c8544a3885dd0db07f52e7d6c8a20e6 | zhennan-sun/impala | /be/src/util/metrics-test.cc | C++ | cc | 8,734 | permissive | // Copyright 2012 Cloudera Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
d5002143c4e88716a737ff35783f81de8e16c53f | fd23a4d654ce71ff797cc3e958283e016cb841f2 | Sonzy/Flow | /Flow/Source/Flow/Framework/Events/Event.cpp | C++ | cpp | 322 | no_license | #include "pch.h"
#include "Event.h"
std::string Event::ToString() const
{
return GetName();
}
bool Event::IsInCategory(Event::Category Category) const
{
return GetCategoryFlags() & (int)Category; //TODO: Check if I wiffed changing to enum class
}
EventDispatcher::EventDispatcher(Event& event)
: m_Event(event)
{
}... |
c35ab1560bfd93d4012157a9d1c32cedc1b84277 | 56ce729cc7cdddc412276dae01fa32ee6b20af08 | Samsung/Castanets | /third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp | C++ | cpp | 1,315 | permissive | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/gpu/gl/GrGLAssembleHelpers.h"
#include "include/gpu/gl/GrGLAssembleInterface.h"
#include "src/gpu/gl/GrGLUtil.h"
#define GET_PROC_LOCAL(F) GrGL##F##Fn* F =... |
7ba81d1ce50f44a1a100bc415822b676028e3ccd | 2096babead13ba261bbcbef5701ad60255153d2a | ianhuangnote/lnav | /src/log_format_loader.cc | C++ | cc | 42,631 | permissive | /**
* Copyright (c) 2013-2016, Timothy Stack
*
* 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 ... |
4be5a0264499533cd62c45cb0e7837030346cfd9 | e6dea2e84eed15faad95d4ee8cb9b4c18a857c0c | vayan/gravity | /src/main.cpp | C++ | cpp | 3,124 | no_license | #include <iostream>
#include <iterator>
#include <vector>
#include <string>
#include <cmath>
#include <SFML/Graphics.hpp>
#include "Universe.hpp"
#include "Star.hpp"
#include "Planet.hpp"
#include "HUD.hpp"
#include "FPS.hpp"
#include "Dispatcher.hpp"
#include "Zoom.hpp"
#include "Move.hpp"
#include "Close.hpp"
#inclu... |
aad400fb77886846f149802258afc7161775c747 | 79ea04de2274f70e32f1958cc9cc73d7cff12aa7 | Pratikcs50/DSA | /Graph/Kruskal'sAlgo.cpp | C++ | cpp | 1,322 | no_license | #include<bits/stdc++.h>
using namespace std;
struct node{
int u;
int v;
int wt;
public:
node(int u,int v,int wt){
this->u=u;
this->v=v;
this->wt=wt;
}
};
bool comp(node a,node b){
return a.wt <b.wt;
}
int find(int n,vector<int> &parent){
if(n... |
2e77f01de81aa2c3504bff5001cc6d8e97680817 | 41535649f83136cd2e7058423eefa88eebd95fc0 | OpenAPITools/openapi-generator | /samples/server/petstore/cpp-qt-qhttpengine-server/server/src/models/OAIPet.cpp | C++ | cpp | 5,914 | permissive | /**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openap... |
260871a84d441df57ca60e3943b548c941eec87f | ade7664e1c60f3b24df0dc21ef2fbe402eac5e03 | SaschaMester/delicium | /chrome/browser/ui/views/translate/translate_bubble_view.cc | C++ | cc | 25,983 | 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 "chrome/browser/ui/views/translate/translate_bubble_view.h"
#include <algorithm>
#include <string>
#include <vector>
#include "base/i18n/string... |
ef5fdcda2f679c400e7d01f234f617bbddda806e | 8e3c3a2bb665c9e557c1af141fbdffe4bdba7866 | a-kashirin-official/spbspu-labs-2018 | /golyshev.ilya/A1/main.cpp | C++ | cpp | 1,656 | no_license | #include <iostream>
#include "circle.hpp"
#include "rectangle.hpp"
#include "triangle.hpp"
void OutInf(Shape &object);
void OutInfAboutShape(const Shape &shape)
{
shape.OutInf();
}
int main()
{
Rectangle rectangle(10.0, 5.0, {4.0, 3.0});
std::cout << " " << std::endl;
std::cout << " " << std::endl;
std:... |
77224ff4681a192054d5f1af6963fb215868f230 | 7712e290faf25adaae59a1c4278169b0266ee0db | astamm/fdahotelling | /src/statisticImplementations.cpp | C++ | cpp | 4,736 | no_license | #include "statisticImplementations.h"
#include "statisticClass.h"
arma::colvec
eigenvalues(const arma::mat& x,
const arma::mat& y)
{
fdahotelling::Statistic stat;
stat.SetInput1(x);
if (y.n_cols != 0)
stat.SetInput2(y);
stat.SetTolerance(0.0);
return stat.GetEigenValues()... |
a9b3938d77f1a04867ac5d25bcfa4fe89b6b1a63 | 8605f6143630b88c0a71f58233e3216cb0b9adc4 | labintei/C- | /Entrainement/DAY06/1.cpp | C++ | cpp | 1,487 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 1.cpp :+: :+: :+: ... |
4d83ee6c82b94d47d9e6fe446c8751e02efdb320 | 6f7a981b3fb7ecea4bcc6e6d9b87f4e74ea857c6 | ShivaniSundriyal/Hacktobertfest-2021 | /4.cpp | C++ | cpp | 733 | no_license | #include <bits/stdc++.h>
using namespace std;
void swap(int *xp, int *yp) {
int temp = *xp;
*xp = *yp;
*yp = temp;
}
// A function to implement bubble sort
void bubbleSort(int arr[], int n) {
for (iint = 0; i < n-1; i++)
for (int j = 0; j < n-i-1; j++)
if (arr[j] > arr[j+1])
... |
c50e4c055b41c8b158a1f6c9e5cfb5d92e09f0d8 | 86a2b30446e20e2b5920224fb41bc9f14e5f8c27 | thiagomoraesn13/Computacao-Grafica | /LAB3/testes/bulemaldito.cpp | C++ | cpp | 3,305 | no_license |
#include <cmath>
#include <GL/glut.h>
#include <GL/glu.h>
#include <GL/gl.h>
using namespace std;
//ângulo de rotação
double anguloRotacao = 10;
//Direção da câmera
float lx = 0.0f,lz = -1.0f;
//Posição da câmera
float x = 0.0f,z = 5.0f;
//ângulo para rotacionar via tecla
float angulo = 0.0f;
void desenhaTeaPot(){
... |
1a212059b05fc95194dd28a1004bac29da8677bf | ebaebc3da242278310b1adf504165f7ed50ae229 | Mandalore477/BlackJack | /Sprite.cpp | C++ | cpp | 3,603 | no_license | #include "Sprite.h"
Sprite::Sprite(const char* filename, int xpos, int ypos, int width, int height, SDL_Renderer *renderer)
{
/** Set SDL_Renderer variable in Sprite class */
this->renderer = renderer;
/** Set SDL_Rect variable in Sprite class */
rect.x = 0;
rect.y = 0;
rect.w = width;
rect.h = height;
/** S... |
01121a00cbb14268d5716fc7d45264c24d663836 | e2d067bf243b06fd5d73d84dda528e44a62d7d81 | arw12625/Quad_Copter_Code | /QuadCopter_Arduino/QuadCopter/Math/matrix.cpp | C++ | cpp | 1,562 | no_license | /*
MinIMU-9-Arduino-AHRS
Pololu MinIMU-9 + Arduino AHRS (Attitude and Heading Reference System)
Copyright (c) 2011 Pololu Corporation.
http://www.pololu.com/
MinIMU-9-Arduino-AHRS is based on sf9domahrs by Doug Weibel and Jose Julio:
http://code.google.com/p/sf9domahrs/
sf9domahrs is based on ArduIMU v1.5 by Jordi ... |
0346a8bddf6130b0e47e7fac3dc73a2a98a5fed9 | e4d4872f43532ec02fe4eaf723d85b1c7afe6256 | jamesr66a/EmbeddedCapstonePiSoftware | /main.cpp | C++ | cpp | 5,444 | no_license | #include <cppcms/application.h>
#include <cppcms/applications_pool.h>
#include <cppcms/service.h>
#include <cppcms/http_response.h>
#include <cpprest/http_client.h>
#include <cpprest/json.h>
#include <fcntl.h>
#include <gflags/gflags.h>
#include <iostream>
#include <memory>
#include <termios.h>
#include <thread>
#inclu... |
7afc77f0ae85586a56e5f0429a23f163c9b39a4b | 8d036156a21f12492c96d2786a49b6c77b7b6c40 | adityasiriguppa/Codes | /Spoj/NGM/NGM-14582860.cpp | C++ | cpp | 653 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define l long
#define MAX 314160
#define MOD 1000000007
#define fin(i,a,n) for(i=a;i<=n;i++)
#define fde(i,a,n) for(i=n;i>=a;i--)
#define sd(a) scanf("%d",&a)
#define sld(a) scanf("%ld",&a)
#define slld(a) scanf("%lld",&a)
#define pd(a) printf("%d... |
6a8f6cbfdcc056c69c8fc8f10a8f4af9d2610290 | f28c5091a8c36d05c7b3971f054ba76a52e4f394 | mxaddict/bls-signatures | /js-bindings/wrappers/SignatureWrapper.cpp | C++ | cpp | 5,882 | permissive | // Copyright 2018 Chia Network Inc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in wr... |
3f442c8b431d081fc54bb44a12d8201981575e32 | cc63f89fef8c37e16148f7303e42a5c9c4ff116b | massnetwork/mass-browser | /third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.cpp | C++ | cpp | 2,754 | permissive | /*
* Copyright (C) 2010, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condition... |
7f76debbffc09cd62d5cbd2e691bcc1fc152ba7a | 8533a8f840c9fefc73de82a59fa2e21b8bb8e44c | OpenLocalizationTestOrg/ECMA2YamlTestRepo2 | /fulldocset/add/codesnippet/CPP/401ca427-6c60-47eb-91ba-_1.cpp | C++ | cpp | 1,133 | permissive | using namespace System;
using namespace System::Globalization;
int main()
{
// Creates and initializes a GregorianCalendar.
GregorianCalendar^ myCal = gcnew GregorianCalendar;
// Displays the header.
Console::Write( "YEAR\t" );
for ( int y = 2001; y <= 2005; y++ )
Console::Write( "\t {0}", ... |
10e2d5b1c93be65ffb5f5334683deb90238dfcd7 | ae4a26005a954b2f2a442dcdb8d1768814115cc1 | eyhl/issm | /trunk/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp | C++ | cpp | 2,718 | permissive | /*!\file RheologyBbarAbsGradientx
* \brief: compute misfit between observations and model
*/
#include "./RheologyBbarAbsGradientx.h"
#include "../../shared/shared.h"
#include "../../toolkits/toolkits.h"
void RheologyBbarAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads... |
2bbba4605c9f38bbca72ab78f348f346cea4f271 | fb9a860f4b459697a42d8043c15a80a63f1c7869 | xianjimli/Elastos | /Elastos/Framework/Droid/eco/src/core/content/CSyncStorageEngineHelper.cpp | C++ | cpp | 3,067 | no_license |
#include "content/CSyncStorageEngineHelper.h"
#include "content/CSyncStorageEngine.h"
#include "ext/frameworkdef.h"
#include "os/Environment.h"
ECode CSyncStorageEngineHelper::NewTestInstance(
/* [in] */ IContext* context,
/* [out] */ ISyncStorageEngine** newEngine)
{
VALIDATE_NOT_NULL(context);
VALID... |
8d2ac6bc1e072ccbee7c2f152ee9e32190d97ca3 | 5036251a44d98e1f523430abcdce9bdb0eca48b1 | worldmint/valgard | /src/rpcmasternode-budget.cpp | C++ | cpp | 44,390 | permissive | // Copyright (c) 2014-2015 The Dash Developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The ValgardCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h"
#in... |
d5c36334ee6c3be46e89f01cd443fdd4ddc59afc | ceea90a0f61ab70d098b021c413a6c0f998b094c | MatheusXimeness/Data-Structure | /pratica01/p01/p1_michael_68064/Teste2Agenda.cpp | C++ | cpp | 1,615 | no_license | /* -------------------- File Teste1Agenda-Alt.cpp ---------------
Programa para testar a as classes Data, Horario e Agenda
descritas no diagrama UML da primeira aula pratica de INF213
Verifica a consistencia dos valores dos objetos de cada classe
Autor: Marcus V. A. Andrade - 07/03/2017
-------... |
73a76c8dd4e362a8a75c9dcfb19e2ecd0b035bc8 | 8a91a22d934c5e2ae97655d657d86049db9eccdf | djmally/dominion | /src/cpp/JsonRPC.cpp | C++ | cpp | 2,039 | no_license | /* DOMINION
* David Mally, Richard Roberts
* JsonRPC.cpp
* Defines functions for making and parsing JSON requests
* to the Random.org JSON RPC API.
*/
#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
#include "JsonRPC.h"
#include "Defs.h"
json_rpc::JsonResponse::JsonResponse(int reqsLeft,... |
856dab6f4c2dbed44d580c7925a4ac79d346e0ec | 5e324eb357e3971f4460bfa571ab776933375687 | exafmm/old_fmm_vortex | /fmmtra/fl2l2.cxx | C++ | cxx | 1,207 | no_license | #include "../misc/constants.h"
extern int *nfi,*nc;
extern std::complex<double> (*ax)[mpsym],(*axo)[mpsym],(*ay)[mpsym],(*ayo)[mpsym],(*az)[mpsym],(*azo)[mpsym];
extern void boxc(int, int, int*);
extern void boxn1(int*, int&, int);
extern void fl2l(std::complex<double>*, std::complex<double>*, std::complex<double>*, ... |
55e269424adb8834e7bb779a914bb2074898c4a5 | cf154c1de05aa03bfd05f2e81a843de2cd959ec9 | fradetjulien/Zappy | /Gui/source/algoGui.cpp | C++ | cpp | 1,772 | no_license | //
// Created by torres_l on 29/06/18.
//
#include "guiClient.hpp"
void GuiClient::algoGui()
{
if (!_cmdSend) {
_send[_mode]();
}
else if (_readCmd) {
_execute[_mode]();
_cmdSend = false;
}
}
void GuiClient::execute_res()
{
_gui->parseTitle(_answerReceived, false);
if ... |
e8fa16cff8260103c9f8c0eeef6d0480e8b78804 | 1fb442bcea626c0d7b05d475a25b0d2e67f4e221 | TileDB-Inc/TileDB | /tiledb/sm/query/writers/global_order_writer.cc | C++ | cc | 49,754 | permissive | /**
* @file global_order_writer.cc
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017-2022 TileDB, Inc.
*
* 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 ... |
0742f99f224fc4456643b7bbd36c17d75f401052 | 8ce8deea65afe4831b988aac5b0adcf2313acded | leovalais/raytracer | /includes/image.hh | C++ | hh | 820 | permissive | #pragma once
#include <memory>
#include <utility>
#include <string>
#include <FreeImage.h>
#include "color.hh"
using point_t = std::pair<unsigned, unsigned>;
struct FIBITMAPDeleter {
void operator()(FIBITMAP* bitmap) { FreeImage_Unload(bitmap); }
};
/**
* Wrapper around FreeImage's FIBITMAP-related functions.
... |
c9ba84cfbed66f2b074a55692aabaeddb515249d | c0d519b4e772ae0df0a2d2ffa8d78b6f4c3aa8fc | ryankereliuk/resiprocate | /resip/stack/ssl/TlsConnection.cxx | C++ | cxx | 22,479 | permissive | #if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
#if defined(USE_SSL)
#include "resip/stack/ssl/TlsConnection.hxx"
#include "resip/stack/ssl/TlsTransport.hxx"
#include "resip/stack/ssl/Security.hxx"
#include "rutil/Logger.hxx"
#include "resip/stack/Uri.hxx"
#include "rutil/Socket.hxx"
#include <openssl/opensslv... |
e34ad7b40af4f6ca47d260e260c3ea4715aff20a | 5def770f6330c67b1e5c38360393755447f545b1 | ppodhajski/Tide | /tide/master/localstreamer/PixelStreamerLauncher.cpp | C++ | cpp | 8,622 | permissive | /*********************************************************************/
/* Copyright (c) 2013-2018, EPFL/Blue Brain Project */
/* Raphael Dumusc <raphael.dumusc@epfl.ch> */
/* All rights reserved. */
/* ... |
15f5906276e1a19d3bbe77b20a58b6531ee29a6e | 96e5555545dde18f6c7cf05e17b71f4cd3e1d178 | khyun3/baekjoonCpp | /단계별로 풀어보기/수학1/2839_설탕배달.cpp | C++ | cpp | 633 | no_license | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
int i,j, n, k=0;
int SmallestNumber[1000];
memset(SmallestNumber,0,sizeof(SmallestNumber));
cin>>n;
if(3 <=n && n<=5000){
for(i = 0; i<n/3+1; i++)
for(j = 0; j<n/5+1; j++){
if(3*i+5*j==n)
SmallestNumber[k++] =i+j;
}
if(Sma... |
c4656b7cc41633c46089457ed235e132c5fd6109 | c5a4ca6e7d97dd3f620fa7b29a0b7adcfc2d57e2 | gotlibsh/SaveTheKing | /SaveTheKing/King.cpp | C++ | cpp | 1,764 | no_license | #include "King.h"
//+---------------------------------------------------------+
//| Constructors |
//+---------------------------------------------------------+
/*
* Default constructor.
*/
King::King()
{}
/*
* Assigns the place and other variables of the king.
*/
King::King(const Point & place)
:m_place(... |
80af0f805f7bfb7d0165c6f0b62370b9a3534f77 | 3908ad58bffd9a6d77c87889e054638a841e1bca | nikosChalk/hy340-project | /syntax_analyzer/syntax_error.cpp | C++ | cpp | 454 | no_license |
#include "syntax_error.h"
using namespace std;
using namespace syntax_analyzer;
syntax_error::syntax_error(unsigned int lineno)
: runtime_error("Syntax Error --> line: " + to_string(lineno) + ". ") {}
syntax_error::syntax_error(const string &msg, unsigned int lineno)
: runtime_error("Syntax Error ... |
dad8a35991b86a07561e0579547d1f2a6753c504 | a644749d4902287b9c6d77729ee5a831c8abb367 | syntheticpp/CMakeLua | /Source/cmDocumentVariables.cxx | C++ | cxx | 49,522 | permissive | #include "cmDocumentVariables.h"
#include "cmake.h"
void cmDocumentVariables::DefineVariables(cmake* cm)
{
// Subsection: variables defined by cmake, that give
// information about the project, and cmake
cm->DefineProperty
("CMAKE_AR", cmProperty::VARIABLE,
"Name of archiving tool for static libraries.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.