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 |
|---|---|---|---|---|---|---|---|---|
45972bcc0efd7ee80aa79cf13ab52b8c435d16e6 | f3bc1b0f6acfe338bf61fbbc47d3f35f393ac2ab | dingjingmaster/demo | /qt.bak/custom-sort-filter-model/filterwidget.cpp | C++ | cpp | 2,876 | permissive | #include "filterwidget.h"
#include <QIcon>
#include <QPixmap>
#include <QMenu>
#include <QAction>
#include <QActionGroup>
#include <QToolButton>
#include <QWidgetAction>
FilterWidget::FilterWidget(QWidget *parent) : QLineEdit(parent), m_patternGroup(new QActionGroup(this))
{
setClearButtonEnabled(true);
conne... |
a2bbfe1a8312ecb108b17c17c4bdb6753b79d8d0 | 41bd82fd4277c5e23ed41df999a23b910c12ffa4 | planee/new | /src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krick_and_ick.cpp | C++ | cpp | 31,338 | no_license | /*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
*
* Copyright (C) 2010-2015 QuantumCore <http://vk.com/quantumcore>
*
* Copyright (C) 2010-2012 MaNGOS project <http://getmangos.com>
*
*/
#include "ScriptMgr.h"
#include "QuantumCreature.h"
#include "SpellScript.h"
#include "Vehicle.h"
#inc... |
b6f2322e5a75b917ba2ec89028f3a9a31545ef5c | a52e9773012aeba85f64fae1b4e1a8c8d11e1cec | Aescosaurus/Dungeon-Crawler | /Engine/MessageLog.cpp | C++ | cpp | 1,441 | no_license | #include "MessageLog.h"
MessageLog::MessageLog( const RectI& messageArea )
:
messageStart( messageArea.GetTopLeft() ),
minMessageX( messageArea.left + padding ),
maxMessageX( messageArea.right - padding )
{
for( int i = 0; i < nMessages; ++i )
{
messages.push_back( "" );
}
}
void MessageLog::Draw( Graphics& ... |
f18a9c529c04b1b319a56d101d53ffa0db9e978f | 5bcb153c7e01d669af375b525196b94d590a9e36 | vermashresth/chainer-compiler | /compiler/graph_builder.cc | C++ | cc | 4,706 | permissive | #include "compiler/graph_builder.h"
#include <stdint.h>
#include <compiler/onnx.h>
#include <onnx/shape_inference/implementation.h>
#include <common/strutil.h>
#include <compiler/dtype_inference.h>
#include <compiler/flags.h>
#include <compiler/graph.h>
#include <compiler/node.h>
#include <compiler/topology.h>
#incl... |
48021f3947065a6f5c50782d21ce9c3634f2c3df | be7a195bf8edd497091218e92d26ec492c32a0a2 | vladfridman/wisey | /src/IfStatement.cpp | C++ | cpp | 1,611 | no_license | //
// IfStatement.cpp
// Wisey
//
// Created by Vladimir Fridman on 12/24/16.
// Copyright © 2016 Vladimir Fridman. All rights reserved.
//
#include "AutoCast.hpp"
#include "IfStatement.hpp"
#include "IRWriter.hpp"
#include "PrimitiveTypes.hpp"
using namespace llvm;
using namespace wisey;
IfStatement::IfStatemen... |
e2940a6aa343e3f75cb9a082e29d488fa9ae62a3 | 4ec425f720d5c13ca192491516ac9dc0c9b978ae | edu-417/Online-Judge-Solutions | /Codeforces/Round #131/D. Numbers.cpp | C++ | cpp | 769 | no_license | #include<cstdio>
int n;
int a[20];
long long C[200][200], dp[20][200];
long long mod=1000000007LL;
void comb(){
for(int i=0;i<=n;i++)C[i][0]=1;
for(int i=0;i<=n;i++)
for(int j=1;j<=i;j++)C[i][j]=(C[i-1][j]+C[i-1][j-1])%mod;
}
void doit(){
scanf("%d",&n);
for (int i=0;i<=9;i++) scanf("%d",a+... |
442de68be5296b35cc5e95ca94ffb220e369bf98 | d7e8bf2da22c0f461fdc61249ea6d0352457afa6 | prateeks97/Cpp_Data_Structures_and_Algorithms | /C++ Practice/Data Structures and Algorithms/Pointers/pointers1.cpp | C++ | cpp | 201 | no_license | #include <iostream>
using namespace std;
int main(){
int a = 10;
int *p;
p = &a;
cout << "Initioal pointer p: %d \n",p << endl;
*p = 12;
cout << *(p+1)<< endl;
return 0;
}
|
956230f692960051ba50574e407533011e58563d | 3df7e87d71a010c0736ce4cf3999d126ad119d8d | comjoueur/Laboratorio-12 | /Herencia2/Herencia2.cpp | C++ | cpp | 2,903 | no_license | #include<iostream>
using namespace std;
class Profesional{
protected:
string certificado;//codigo de su certificado
int graduado;//ano que se graduo
public:
Profesional(string mycertificado, int mygraduado)//constructor
: certificado(mycertificado),graduado(mygraduado){}
void mostrar1(){//vi... |
ba25c946655a965daed1537b7a67032cdc6986b8 | 14aee3559c9e4e025258056b202c86af1aa3a5bd | jhoush/dist-clang | /lib/Frontend/DependencyFile.cpp | C++ | cpp | 5,378 | permissive | //===--- DependencyFile.cpp - Generate dependency file --------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
b2a50f00fdd3c046a7a4c35ef98533b12e2e5861 | 5d98bcc727ae7d86b1cd551558da44703e5e1dca | ItzKaserine/Dovelet | /koi4u_mys/480780_WA.cpp | C++ | cpp | 1,699 | no_license | #include<stdio.h>
#include<algorithm>
using namespace std;
int N,W,H;
struct A {
int w,h,index;
bool operator<(const A &a) const {
if(a.w == w) return h < a.h;
return w < a.w;
}
}pre[333333];
struct B {
int value,ind;
}tree[10000000];
struct C {
int value,ind,limit;
}qu[333333];
int back[33333... |
0000ebd7483d9792dcd44923c7131c9e6e699aac | 6b69efc3dac888c3ca51debdcea5d1bb4b296cfa | Catishere/ColorPicker | /clickablebox.cpp | C++ | cpp | 226 | permissive | #include "clickablebox.h"
ClickableBox::ClickableBox(QWidget* parent)
: ClickableLabel(parent){}
ClickableBox::~ClickableBox() {}
void mouseMoveEvent(QMouseEvent *ev)
{
QPoint mouse_pos = ev->pos();
emit send
}
|
f2c1d3e1fd22b707302a92465462f7502ba676eb | 8699250387dbc996a729a3345f0b0e154eadec35 | Tubbz-alt/cr-archive | /valhalla/88/webrev.01/src/hotspot/share/prims/jvm.cpp | C++ | cpp | 159,659 | no_license | /*
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
a442074d15984e2e9ed39c51a61561198128e381 | 260b796509c5ec9eb289b00249e951ad34b429be | gitter-badger/engine | /render/loader/rLoader_3D_f_OBJ.hpp | C++ | hpp | 1,368 | permissive | /*!
* \file rLoader_3D_OBJ.hpp
* \brief \b Classes: \a rLoader_3D_OBJ
*/
/*
* Copyright (C) 2015 EEnginE project
*
* 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.apach... |
61c91eb0b1bf6b444470596d46cea956a95c6d27 | 9f378ee37ce9cff40bbb95330cfaac2dfa1e2eed | networkhermit/algorithm | /archive/c++/muse/data_structures/LinkedQueue.hpp | C++ | hpp | 1,229 | permissive | #ifndef MUSE_DATA_STRUCTURES_LINKED_QUEUE_HPP
#define MUSE_DATA_STRUCTURES_LINKED_QUEUE_HPP
#include <stdexcept>
namespace LinkedQueue {
template <typename E> class LinkedQueue {
private:
class Node {
public:
E data;
Node *next = nullptr;
public:
Node(E element) { data = element; }
~Node() {}
... |
a41323b7a72bab3be695b3141b4bf6245ec9e6f2 | b7baae505bc4bdbfada524748201f8fcbdbf9009 | blood2/yaamp | /stratum/coind_aux.cpp | C++ | cpp | 2,289 | no_license |
#include "stratum.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
void coind_aux_build_auxs(YAAMP_JOB_TEMPLATE *templ)
{
int len = 0;
for(CLI li = g_list_coind.first; li; li = li->next)
{
YAAMP_COIND *coind = (YAAMP_COIND *)li->data;
if(!coind... |
5f70c4550966201e78c931071e04ce2b67c5c445 | 32652cc89d96ca74adb9b941e34a63732e7f7fd4 | sekiya9311/Programming-Contest | /others/Facebook_Hacker_Cup/2020/qual/B/B.cpp | C++ | cpp | 3,112 | no_license | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <uno... |
27b8aa69135513b8a659305f5c82e3544c6b666d | a38836c6a6bac3d2141620c721da514338fbaf0c | renshengqiang/3dengine | /src/RenderWindow.cpp | C++ | cpp | 2,280 | no_license | #include "RenderWindow.h"
#include "Render.h"
#include <SDL/SDL.h>
//-----------------------------------------------------------------------
RenderWindow::RenderWindow(int windowWidth,int windowHeight)
{
m_WindowHeight=windowHeight;
m_WindowWidth=windowWidth;
}
//-------------------------------------------... |
78a02671465c07768015f02e8f0d365b90f49aaa | f8c18a94a0caa9c72f7117db05cc4d524bb9305c | mderezynski/Youki2 | /sigx/tunnel_context_base.cpp | C++ | cpp | 1,987 | no_license | /*
* Copyright 2008 Klaus Triendl
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is ... |
bc0f802af9de2859278c38bfed08da69daac770f | 5b189648fbd44ce473b878fb1c9e2f8c01373852 | jsenn/ifcplusplus | /external/Coin3D/src/nodes/SoBaseColor.cpp | C++ | cpp | 6,100 | permissive | /**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Red... |
27a6a8bdd8be2c7030d6b9ab3da768fca271d932 | 5c2232f541c63223afb07c8a997af8585799a984 | khaledsliti/CompetitiveProgramming | /cses/Introductory/1071.cpp | C++ | cpp | 692 | no_license | // We only fail when we stop trying
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define endl '\n'
#define D(x) cerr << #x << " = " << (x) << '\n'
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long l... |
1315c3b4d334b18c722ab43a17e03b23720b3ce9 | 55eb79186e67da07d9f2cf2fbcf9f89983b93ab8 | Rachelmorrell/tensorflow | /tensorflow/compiler/mlir/tfrt/jit/tf_cpurt_kernels.cc | C++ | cc | 25,593 | permissive | /* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
24d1ef62d1c58179402d28e0daaeb3dc508858ec | a488e28cae86819204a5f555d1b2ae0fdb9cd215 | liuxx220/GameApp | /FWCycleHero/server/src/lib/network/interfaces.hpp | C++ | hpp | 1,186 | no_license | /*
-------------------------------------------------------------------------------------
file name : interfaces.hpp
desc : 一些消息通知处理器的接口
author : ljp
log : [ 2015-04-28 ]
-------------------------------------------------------------------------------------
*/
#ifndef KBE_NETWORK_INTERFACES_HPP
#define KBE_... |
1062b76b2a15ac1dae32e92be96bfe4c2f177a3d | 0a4ecfbd64475d82c2c8963a0a58888117e81a1a | chunchou/ACM | /CF/数据结构/CF 145E Lucky Queries 线段树.cpp | C++ | cpp | 3,179 | no_license | /*
题目:
给出一个只有4和7的字符串,有两种操作:
1.区间反置,把4变成7,把7变成4
2.询问最长的不下降子序列
分析:
线段树延迟标记。
我们需要维护四个域:
n4 :表示该区间的右区间连续的4的个数
n7 :表示该区间的右区间连续的7的个数
inc :表示该区间的右区间连续最长上升子序列的元素个数
dec :表示该区间的右区间连续最长上升子序列的元素个数
所以对于每个节点,需要维护的信息如merge函数所写
*/
#include <set>
#include <map>
#include <cmath>
#include <que... |
28567bbcb128a96c12e9e3a9398a5174d3ba1c0f | 8bac4ededee90c51e9d9564a16a7d4ef2577e9b3 | Chortowod/Cpp-Practice | /Lab 8 Student01/Lab 8 Student01.cpp | C++ | cpp | 2,456 | no_license | #include <algorithm>
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <list>
#include <iterator>
#include <vector>
#include <fstream>
#include <windows.h>
using namespace std;
class Student
{
public:
void set_name(string student_name) { name = student_name; } ... |
2df02da9b2c59909360c90e62300c77d52766fa5 | c3d6a5e30870c9d28b2c9a9c1150d22a4d3b867d | useronuralp/AnorEngine | /AnorEngine/Source/Math/vec2.cpp | C++ | cpp | 1,785 | permissive | #include "pch.h"
#include "vec2.h"
namespace AnorEngine {
namespace Math{
vec2& vec2::add(const vec2 &other) {
this->x += other.x;
this->y += other.y;
return *this;
}
vec2& vec2::subtract(const vec2& other) {
this->x -= other.x;
this->y -= other.y;
return *this;
}
vec2& vec2::multiply... |
c3233a924019c47b4b2fc4fc985b2c984e54b488 | 582aab6508ba5f478545bcb3bd63e4c40963780c | JamesGbl/WxCode | /wxCode/components/sheet/src/sheetren.cpp | C++ | cpp | 40,435 | no_license | ///////////////////////////////////////////////////////////////////////////////
// Name: sheetren.cpp
// Purpose: wxSheet controls
// Author: John Labenski, Paul Gammans, Roger Gammans
// Modified by: John Labenski
// Created: 11/04/2001
// Copyright: (c) John Labenski, The Computer Surgery (paul@... |
a4767088e47a0b13edb6c73ee49afc43ab118066 | 2e5588d60db395d6933cc6a5aad79ade8c8e7e5b | amir5200fx/Tonb | /applications/marine/crossCurves/crossCurves.cxx | C++ | cxx | 11,433 | no_license | #include <Geo_Tools.hxx>
//#include <Marine_System.hxx>
#include <Marine_Bodies.hxx>
#include <Marine_WaterLib.hxx>
#include <Marine_CmptLib2.hxx>
#include <Marine_Models.hxx>
#include <HydStatic_CrossCurves.hxx>
#include <HydStatic_CrsCurvesGraph.hxx>
#include <HydStatic_Spacing.hxx>
#include <HydStatic_CustomSpacing.... |
72ccfb5524e734c403c447d0d44d900c70f47621 | c5990cd2a07c6a109cebfb215b198ca883297830 | skmioo/SkmiooStore | /3DMath/3DMath/3DMath/MathUtil.cpp | C++ | cpp | 301 | no_license | #include "MathUtil.h"
const Vector3 kZeroVector(0.0f, 0.0f, 0.0f);
float wrapPi(float theta)
{
theta += kPi;
theta -= floor(theta * k1Over2pi) * k2Pi;
theta -= kPi;
return theta;
}
float safeAcos(float x)
{
if (x <= -1.0f)
{
return kPi;
}
if (x > 1.0f)
{
return 0;
}
return acos(x);
} |
659529ab902a139403070dcc8e53a8b25b5394b2 | de29d9fa99d874daaa7495706604097974bf1380 | uhoohei/quick-cocos2d-x-Community | /cocos/editor-support/spine/SkeletonRenderer.cpp | C++ | cpp | 15,927 | no_license | /******************************************************************************
* Spine Runtimes Software License
* Version 2.3
*
* Copyright (c) 2013-2015, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to use, install... |
a5c3056fe8e96aee82b72744b4afb438b85eecce | b27159894329ff97595eb2bba156a3e709a3fe50 | Jim-CTChen/CAD_Contest | /src/placement.cpp | C++ | cpp | 22,983 | no_license | #include <iostream>
#include <unordered_map>
#include <string>
#include "eigen3/Eigen/Dense"
#include "global_func.h"
#include "base_DS.h"
#include "advance_DS.h"
#include "definition.h"
#include "placement.h"
#include <queue>
#include <algorithm>
#include <stdio.h>
#include <math.h>
using namespace std;
using names... |
bfdfbbf9c629124aac3b21d641ee0e6a2fc85960 | 4606197fc65f57c8f3dd8621b2f5310307364954 | TermuxArch/iree | /iree/compiler/Conversion/Common/LaunchConfig.cpp | C++ | cpp | 6,030 | permissive | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
c76e3848f568913aed4678799cd0752317861bf6 | 812169e2617ee9316c606cb37ef3b41b5c1751ba | Kullsno2/C-Cpp-Programs | /ReverseWar.cpp | C++ | cpp | 699 | no_license | #include<iostream>
#include<vector>
#include<stdio.h>
#include<stack>
#include<vector>
#include<queue>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
#include<map>
#include<algorithm>
#include<utility>
#define ll long long
#define p(a) printf("%d\n",a)
#define s(a) scanf("%d",&a)
#define sl... |
aedef11dcd3f3d3a2e3ccca94cc33d85f4c60946 | 6cac7793f4bec3b4b7cce8ad08a0745fe738a074 | sharmarajdaksh/cp | /leetcode/832.cpp | C++ | cpp | 596 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
vector<vector<int>> flipAndInvertImage(vector<vector<int>> &A)
{
vector<vector<int>> ans;
for (vector<int> &a : A)
{
reverse(a.begin(), a.end());
for (int &x : a)
{
... |
e88856cb91cd1b15363ab033cdf03a2b43a77ef8 | 2c9048244653db506f5d25ac8b94339eec31f06e | farichase/Computer-graphics-algorithms | /lab_2_bazartinova.cpp | C++ | cpp | 6,436 | no_license | #include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <cstdlib>
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
GLFWwindow *window;
GLfloat turnX = 0.0f;
GLfloat turnY = 0.0f;
GLfloat halfW;
GLfloat halfH;
GLfloat rib;
GLfloat perspective[] = {
1.0, 0.0, 0.0, 1.0 / 2.0,
0.0, 1.0... |
fa2f72adfccdc23e1c43395adb93293641532406 | d7a63f33a72021491de73f300a8e248c1b3581e6 | gabstv/godot-go | /cgodeps/godot_engine/modules/gdnative/gdnative/rid.cpp | C++ | cpp | 3,330 | permissive | /*************************************************************************/
/* rid.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
b1c2618b5426824e336b7e14da6aba7cfa8f0961 | 3a0ff12da5800fc2f120db0a72278aeacfa013ee | rrti/newtonics | /misc/interval_tree.hpp | C++ | hpp | 3,262 | no_license | #ifndef NEWTONICS_INTERVAL_TREE_HDR
#define NEWTONICS_INTERVAL_TREE_HDR
#include <cassert>
#include <cstddef>
#include <set>
template<typename t_key_type, typename t_val_type> struct t_interval_node {
public:
t_interval_node(
t_key_type min_key = t_key_type(0),
t_key_type max_key = t_key_type(0),
t_val_type v... |
efd85050d35a46a2fa169d5ff0890a7ffd774b3f | 64501306aa985249771ac0c6242e54b1a0e6fe4c | keithjjones/7z | /CPP/7zip/UI/GUI/UpdateGUI.cpp | C++ | cpp | 12,737 | no_license | // UpdateGUI.cpp
#include "StdAfx.h"
#include "../../../Common/IntToString.h"
#include "../../../Common/StringConvert.h"
#include "../../../Common/StringToInt.h"
#include "../../../Windows/DLL.h"
#include "../../../Windows/FileDir.h"
#include "../../../Windows/FileName.h"
#include "../../../Windows/Thread.h"
#inclu... |
748854ca855257c65a177887763d089da6a25415 | 2f10efa36aa2872d8d50f3b35d82c3c9b361343e | SgtFlame/indiezen | /Zen/plugins/ZCrazyEddie/src/ImageSetService.hpp | C++ | hpp | 2,810 | no_license | //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
// Zen Game Engine Framework
//
// Copyright (C) 2001 - 2009 Tony Richards
// Copyright (C) 2008 - 2009 Matthew Alan Gray
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the a... |
7250d0c910606b9c516d4ccde8074cd637b93efb | 95628e602b8082a91cc3c36f815f4b0a7bfedc02 | vovkasm/react-native-web-image | /samples/SampleApp/ios/Pods/boost-for-react-native/boost/asio/read_at.hpp | C++ | hpp | 26,175 | permissive | //
// read_at.hpp
// ~~~~~~~~~~~
//
// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_READ_AT_HPP
#define BOOST_... |
fb16ad0848ba6f63f91e3c3ec4dbcf3b9b2dd9f2 | 71ebbe8342bb8988da7572ddd8e62e72afa775b2 | salRoid/DS_Interview | /Utilities/countFactorialDigits.cpp | C++ | cpp | 218 | permissive | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double digits = 0;
for (int i = 2; i < n; i++) {
digits += log10(i);
}
cout << floor(digits) + 1;
return 0;
} |
675947f83dac44029e2887ce7f3f5d46fdc7a121 | 9890a130c331373fe50544c357664b4078a98cdc | jaanae/ClickHouse | /src/Interpreters/join_common.cpp | C++ | cpp | 22,243 | permissive | #include <Interpreters/join_common.h>
#include <Columns/ColumnLowCardinality.h>
#include <Columns/ColumnNullable.h>
#include <Columns/ColumnConst.h>
#include <DataStreams/materializeBlock.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <DataTypes/DataTypeNullable.h>
#include <DataTypes/DataTypesNumber.h>
#... |
6f6d636e90c2abdc248b44b51d8cee036098161f | 4f31cb2113b320822bf1e3bb9edb5f0c3a4e7d18 | iPolyomino/contest | /atcoder/abc/133/c.cpp | C++ | cpp | 310 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll L, R;
cin >> L >> R;
ll ans = 2019;
for (int i = L; i < R && i - L <= 2019; i++) {
for (int j = i + 1; j <= R && j - L <= 2019; j++) {
ans = min(ans, (ll)i * j % 2019);
}
}
cout << ans << endl;
return 0;
}
|
a68800648413b65a61546f872f7ca40e2857a519 | 4b93469ebe030ddd34efbe55b9e5229a770549df | riibiax/bauMapping | /src/main.cpp | C++ | cpp | 1,068 | no_license | #include "ofMain.h"
#include "ofApp.h"
#include "GUIPanel.hpp"
#include "ofAppGLFWWindow.h"
#ifdef USE_PROGRAMMABLE_GL
#include "ofGLProgrammableRenderer.h"
#endif
//========================================================================
int main( ){
ofGLFWWindowSettings settings;
settings.width = ... |
4f238fc4ba1c02ab9431e8816f3a55e9fccf6b21 | bc88275f95653a864175c1c157be963f1b87f143 | CUAGAIN-95/CPP_Module | /03/ex03/NinjaTrap.hpp | C++ | hpp | 1,563 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* NinjaTrap.hpp :+: :+: :+: ... |
d63f2e30975ab7edfb61932e38363fb99802a215 | ba388cf5da1085802e2bdc77f2f5c59439e08aca | paulwag/Structurly | /src/components/output_controller.cpp | C++ | cpp | 1,543 | no_license | #include <iostream>
#include "singletons.h"
using namespace std;
// /////////////////////////////////////////////////////////////////////////// Singleton Stuff
output_controller output_controller::oc_instance;
output_controller& output_controller::get_instance()
{
return oc_instance;
}
// ////////////////////... |
3a949a1caa86505f33dc45688677e56b97414ab8 | 40fd87a472f1df3b30e569ce69481ff1e3ff7da6 | mixmav/advanced-programming-techniques-A2-RMIT | /Factory.cpp | C++ | cpp | 1,118 | no_license | #include "Factory.h"
#include "Types.h"
Factory::Factory()
{
}
Factory::Factory(Tile tiles[FACTORY_SIZE])
{
this->tiles = std::vector<Tile>();
for (int i = 0; i < FACTORY_SIZE; i++)
this->tiles.push_back(tiles[i]);
}
Factory::~Factory()
{
this->tiles.clear();
delete &this->tiles;
}
std::vector<Tile> Fact... |
40b29f07dcd0eb69f34f7ca2af8985387bde4ed2 | 9a6bfeb341b9c82c5a89c85ef8c393d6da4b86e4 | qinhuaping/FAST-1 | /source/FAST/Algorithms/AirwaySegmentation/AirwaySegmentation.cpp | C++ | cpp | 12,227 | permissive | #include "AirwaySegmentation.hpp"
#include "FAST/Algorithms/GaussianSmoothingFilter/GaussianSmoothingFilter.hpp"
#include "FAST/Data/Segmentation.hpp"
#include <unordered_set>
#include <stack>
namespace fast {
AirwaySegmentation::AirwaySegmentation() {
createInputPort<Image>(0);
createOutputPort<Segmentation>(0, OU... |
6ed02091fca45a4a0a44018d87a1fc5e812e04fe | 19557dbff6b68f725b8cbd6dfcc56651679b9309 | yt-zgl/bubichain | /src/ledger/createaccount_ope_frm.cpp | C++ | cpp | 7,996 | permissive | /*
Copyright © Bubi Technologies Co., Ltd. 2017 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... |
cf25711ba26117a14f28dd026286eab73faccaea | e9b5dd6629889b2c6103ecf805a444854301dc19 | guille-c/VIR | /src/distribucionNormal.cpp | C++ | cpp | 1,492 | no_license | #include "distribucionNormal.h"
DistribucionNormal::DistribucionNormal (int n_pars, double sigma, int seed, int n)
: DistribucionPbb (n_pars){
this->n = n;
this->media = new double [n_pars];
for (int i = 0; i < n_pars; i++) {
this->media[i] = 0;
}
this->sigma = sigma;
this->add = sqrt(3 * n);
thi... |
7cce7b41bdcd03bc4d154ad743f38d4875dd6052 | e62e2bd2f9ef1c7b20bd7a1215e047d3c1580005 | jhnaldo/problem-solving | /koistudy/prob00C5.cpp | C++ | cpp | 1,814 | no_license | #include <stdio.h>
class Node{
public:
Node(int _k, char _ch, Node *_left = NULL, Node *_right = NULL){
k = _k;
ch = _ch;
left = _left;
right = _right;
}
int k;
char ch;
Node *left;
Node *right;
};
void dfs(Node *node, char result[26], int size){
if (node->... |
aeae611cf1715fb07a30180744ec7585d7962294 | 21cb51d5bfabd007783cf7e18c1e70cd187c2e9b | zfzlinux/CrawlerWithHIK | /crawlerstatusparam.cpp | C++ | cpp | 14,188 | no_license | #include "crawlerstatusparam.h"
#include "crawlerserial.h"
CrawlerStatusParam *CrawlerStatusParam::m_pInstance;
CrawlerStatusParam *CrawlerStatusParam::getInstance()
{
if(m_pInstance == NULL)
m_pInstance = new CrawlerStatusParam();
return m_pInstance;
}
CrawlerStatusParam::CrawlerStatusParam(QObject... |
f3ef53d4f4b95b4041c9326699f66129a845f909 | e3e8b8800c1c1188daeabc1b181113c5af3c2890 | KonstantinTwardzik/C---Learning | /Learning/Learning/Main.cpp | C++ | cpp | 256 | permissive | #include "iostream"
using namespace std;
int main()
{
int a, b, sum;
cout << "Enter two values, u want to sum up: \n a: ";
cin >> a;
cout << "\n b: ";
cin >> b;
sum = a + b;
cout << "\n The sum of those values is: " << sum;
cin >> a;
return 0;
}
|
ca8870276ed0e8938065ebf2769634c4303e9246 | 040c5ffbce7f8bdb47442ed89871e062695e72d8 | xuanlinhha/LLVM_Emulator | /src/test/test.cpp | C++ | cpp | 221 | no_license | /*
* test.cpp
*
* Created on: 23 Jan 2020
* Author: xuanlinhha
*/
#include <iostream>
class A {
unsigned refCount;
A() : refCount(0){};
~A(){
printf("~");
};
};
int main(int argc, char **argv) {
}
|
271fa782906377def49ce8a5a47024c45d07827d | bf24918d082100ad902f68ac360c6a63277aee2a | chrisoldwood/WCL | /Test/ResourceStringTests.cpp | C++ | cpp | 908 | permissive | ////////////////////////////////////////////////////////////////////////////////
//! \file ResourceStringTests.cpp
//! \brief The unit tests for the resource string utility functions.
//! \author Chris Oldwood
#include "Common.hpp"
#include <Core/UnitTest.hpp>
#include <WCL/ResourceString.hpp>
#include "Resource.h"... |
63f250e25c76b5f21dd4cbba362b0aa393e3d754 | 6e0bfa69116b233fc3a3a72a41161509a74a1856 | Jergar92/Zork | /Seller.cpp | C++ | cpp | 1,677 | no_license | #include "World.h"
#include "time.h"
#include <Windows.h>
#include "Seller.h"
#define time 20000
Seller::Seller()
{
}
Seller::Seller(const char* name, const char* description, int life, int atack, int armor, Room* location) :Creature(name, description, life, atack, armor, location)
{
isType = MONSTER;
CreatureType ... |
0240921370df16649ee5c7f399be438db68c78a3 | 803fe4003eb330db41f16eace4fd4ede99d4649d | nio304-mai/nmOpenGL | /2nmc-demo-gcc/src_host/pc-main.cpp | C++ | cpp | 2,666 | no_license | #include "VShell.h"
#include "hal.h"
#include "hal_host.h"
#include "stdio.h"
#include "nmpp.h"
#include "demo3d_host.h"
#include "demo3d_nm1.h"
#include "hostprofiler.h"
#include "nmglvs_host.h"
using namespace std;
int currentImage[WIDTH_IMAGE * HEIGHT_IMAGE];
int main()
{
if (nmglvsHostInit() != 0) {
return 1... |
987e3c7f9e7dd7d8b7851c4285f15d4531bed757 | 3763e798e06887eaeab8d5c774dfa1edf8d7ace9 | Vizionnation/chromenohistory | /media/audio/audio_input_unittest.cc | C++ | cc | 7,765 | 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.
#include <stdint.h>
#include "base/bind.h"
#include "base/callback.h"
#include "base/environment.h"
#include "base/macros.h"
#include "base/message_l... |
ad0630f22c5cdca74509f7a56cbd3347c0c2e5bd | ccea2222481d6f144c818dbee02baa4cc49c4a6c | rapyuta-robotics/rclUE | /ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__traits.hpp | C++ | hpp | 2,952 | permissive | // generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from pcl_msgs:srv/UpdateFilename.idl
// generated code does not contain a copyright notice
#ifndef PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_
#define PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_
#include "pcl_msgs/srv/det... |
e0c45d17ecae2b9e5d7dc0cd8767e0db5db5a066 | 8a5753879fcf8e6034a8924e8917762cc50bc60f | bysheva/oneDAL | /cpp/oneapi/dal/algo/decision_forest/backend/cpu/train_kernel_cls_hist.cpp | C++ | cpp | 1,603 | permissive | /*******************************************************************************
* Copyright 2020-2021 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... |
594c66c33d93d6172227008fcc57503c1d487a33 | f728945e8ff980ceaf98a3a22bb321b0e77f2146 | cinnamon-msft/terminal | /src/host/consoleInformation.cpp | C++ | cpp | 11,067 | permissive | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "precomp.h"
#include <intsafe.h>
// MidiAudio
#include <mmeapi.h>
#include <dsound.h>
#include "misc.h"
#include "output.h"
#include "srvinit.h"
#include "../interactivity/inc/ServiceLocator.hpp"
#include "../types/in... |
b477ef93205b16e402016cba0a8a2a10a65f817d | bffcc1d2f33225aa3630eb3ff0d8563f06c42c70 | mahfuzalhasan/Ray-Tracing | /Ray/Shape.hpp | C++ | hpp | 819 | no_license | #ifndef INCLUDE_SHAPE_HPP
#define INCLUDE_SHAPE_HPP
#include <cmath>
#include <fstream>
#include "Point.hpp"
#include "Ray.hpp"
#define INF 5000
class Shape{
public:
float ambCoeff,difCoeff,refCoeff,specCoeff,specExp;
float color[3];
Point IP;
public:
void setIP(Point P){
IP.x=P.x;
IP.y=P.y;
IP.z=P.z;
}
Po... |
e854f34d69ddfed3a708aa5f8950a0e42a49bf79 | eb282671c1d455f7f893bf499fa5d69f5276b6e9 | ThomasLengeling/sintra_moonsBloom | /src/MoonsApp.cpp | C++ | cpp | 5,880 | no_license | #include "MoonsApp.h"
#include "timeToggle.h"
#include "OscDetector.h"
#include "Midi.h"
using namespace ci;
using namespace ci::app;
using namespace std;
//-------------------SETUP-----------------------------------------------------
void MoonsApp::prepareSettings( Settings *settings )
{
settings->setWindowSize(... |
0663c7a7136f5afa2076d92847703f6965106989 | 3c3aa7430597046b4b970d5e667c3d73e337966d | LancerLix/Boost-Study | /smart_ptr/weak_ptr.cpp | C++ | cpp | 1,013 | no_license | #include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <iostream>
#include <pthread.h>
using namespace std;
void* reset(void* arg)
{
boost::shared_ptr<int> *sh = static_cast<boost::shared_ptr<int>*>(arg);
sh->reset(); //销毁shared_ptr对应的对象
return 0;
}
void* print(void* arg)
{
boost::weak_... |
eb29766034fe8d07dff5e547bcce4494bb95dbbb | ed1e3582957f7f7f7e8530faaaf7654df4314cfc | yarsanich/divi-coin | /src/qt/guiutil.cpp | C++ | cpp | 30,345 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2016-2017 The DIVI developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit... |
15be52f890e6cdf5e994690c50b1bb0188c82544 | fbebc0ddf7e2dee621ad6670cdc8de5531c3a25f | chrisbigart/project-ironfist | /tools/Revitalize/seance/test/imports/funcs/changeMenu.cpp | C++ | cpp | 530 | no_license | {
HMENU tempMenu; // [sp+Ch] [bp-4h]@1
tempMenu = menu;
if ( menu )
globalMenu1 = (HMENU *)menu;
else
tempMenu = globalMenu1;
globalMenu2 = tempMenu;
if ( *(&mainWindows + 7 * gameOrEditorIdx) )
{
if ( tempMenu )
{
SetMenu(windowHandle, tempMenu);
disableTooLarge... |
a7f135f253649b6cda068b9a861996b5d88b3b33 | 36ee4caf6810708ea2ad4eb38f9f8c4e7766ff0a | Xuhoming/ConsoleApplication2 | /ConsoleApplication2/叠加.cpp | C++ | cpp | 2,306 | no_license | #include<vtkRenderingCoreEnums.h>
#include<vtkRenderingCoreModule.h>
#include<vtkRenderingVolumeOpenGLModule.h>
#include<vtkRenderingVolumeOpenGLObjectFactory.h>
#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeType,vtkRenderingOpenGL)
#define vtkRenderingVolume_AUTOINIT 1(v... |
5274c85115d164ada4e6be130c6a4a597f66498b | 4cad747c2a49e4463fb6e7c36e977e1661fe4147 | 0xF6/openvino | /ngraph/test/onnx/onnx_import_exceptions.cpp | C++ | cpp | 3,682 | permissive | //*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
bf6cfe94cb7c4e80231fbc785423dd09bd0c10a8 | b4cf1f9068b75340b189c619f524e6bbc33d8cb8 | fordream/RRGCodingAndCrypto | /Classes/SecondScene.cpp | C++ | cpp | 1,831 | permissive | //
// SecondScene.cpp
// RRGCodingTest
//
// Created by 山本政徳 on 2015/10/01.
//
//
#include "SecondScene.h"
#include "HelloWorldScene.h"
USING_NS_CC;
SecondScene::SecondScene()
{
}
SecondScene::~SecondScene()
{
}
SecondScene* SecondScene::create()
{
SecondScene *ref = new (std::nothrow) SecondScene... |
57aba0e8eee9e17961c9307dfe3215ec7b4aed62 | 62ac6afd8964f8b26a0290fb0ed55cad7dd8c4c7 | frila/bauer | /inc/bauer_tcp_channel.hpp | C++ | hpp | 615 | permissive | #ifndef BAUER_TCP_CHANNEL_HPP
#define BAUER_TCP_CHANNEL_HPP
#include <iostream>
#include <string.h>
#include "socket_facade.h"
#include "bauer_node.hpp"
#include "bauer_exception.hpp"
#include "bauer_tcp_data.hpp"
namespace bauer {
class bauer_tcp_channel
{
private:
bauer_node tgt;
public:
void *data;
bauer_t... |
de4a4761b94e2cf65225c45f783cfb9f5d9acbc4 | 22fa7105f0fc09edd2059b35f6f3c5c4b803b2d2 | pdxwebdev/utim | /app/qrcodeimageprovider.cpp | C++ | cpp | 2,019 | no_license | /*****************************************************************************
* Copyright: 2013 Michael Zanetti <michael_zanetti@gmx.net> *
* *
* This file is part of tagger *
* ... |
b1fb51019456daa2da27baa96e1b0fb89f781ad8 | b0d11b1b5f7d6bff7b4052cb66d39bd58a10b4d4 | smft/NICO_NOW | /models/xios_cpl/src/date.hpp | C++ | hpp | 2,377 | no_license | #ifndef __XMLIO_CDate__
#define __XMLIO_CDate__
/// xios headers ///
#include "xmlioserver_spl.hpp"
#include "exception.hpp"
#include "duration.hpp"
namespace xios
{
/// ////////////////////// Déclarations ////////////////////// ///
class CCalendar;
class CDate
{
public :
... |
413e1a1dc64b880db9eca8cc35c00b78f69e5598 | 2f6e1809099e4e2870b9200b0ba96b949b0ca07f | cyliustack/clusim | /ns3/ns-3.26/src/wimax/test/wimax-fragmentation-test.cc | C++ | cc | 5,131 | permissive | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009-2010 TELEMATICS LAB - Poliotecnico di Bari
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundat... |
74859892f25c2d9fd158fb2f3bd2a0e5904a9d95 | bf9b03a3baf7fc08de81d787ead3f71aa876d65d | djw8605/condor | /src/condor_ckpt_server/server_interface.cpp | C++ | cpp | 16,109 | permissive | /***************************************************************
*
* Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Y... |
c3f658280805252ae1679df34314fbf30fcbd8f8 | 098dc01d0d685644340a579f7a0b9c447c6258ad | caomw/cuc_double | /lib/magma-2.2.0/src/sorgqr.cpp | C++ | cpp | 7,260 | no_license | /*
-- MAGMA (version 2.2.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date November 2016
@generated from src/zungqr.cpp, normal z -> s, Sun Nov 20 20:20:22 2016
@author Stan Tomov
@author Mark Gates
*/
#include "magma... |
36f3dd33c80a961245ae549e6dd630a076b5aec4 | 60430ad3119a6dde9d9399f094be953d3eecbc5d | hml1006/rabbitmq-test | /librmq_test/src/global.cpp | C++ | cpp | 1,790 | no_license | #include "global.h"
#include <ctime>
#include <pthread.h>
#include <mutex>
using namespace std;
GlobalConfig *GlobalConfig::s_instance = nullptr;
// 总mq线程数
static size_t s_mq_thread_num = 0;
// 全部线程统计数据
static unordered_map<pthread_t, shared_ptr<ThreadGlobal>> s_thread_stats;
// 初始化锁
static mutex s_thread_stats_mut... |
a61082c8303e965d0397e88a8fb0378722a2008a | 7670dbcbbd47b6ee101b88587744718e24d45b80 | mfkiwl/openncc | /SDK/Example/How_to/OpenNCC-EMMC/VSC/Load_a_model/main.cpp | C++ | cpp | 6,008 | permissive |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <assert.h>
#include "pthread.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "sdk.h"
#include "cameraCtrl.h"
#ifndef _WINDOWS
#include <sys/time.h>
#else
#include <... |
3306334601811816314a8a75cd633bff90107b9e | 8b9b0412e29663920fcd4255ae5b65d0ec780ab9 | adct-the-experimenter/lcc | /lcc_rtaudio.cpp | C++ | cpp | 13,051 | permissive | #include "RtAudio.h"
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <fstream> // std::ifstream
#include <thread>
#include <chrono>
#define QU... |
d64ab2361470a870fb11810762097db83f5e4d12 | 353e91dbc96f92a0e31818f02b36f33461a4a21b | zhouyujt/daxia | /encode/base64.cpp | C++ | cpp | 2,113 | no_license | #include <string>
#include <sstream>
#include <boost/archive/iterators/base64_from_binary.hpp>
#include <boost/archive/iterators/binary_from_base64.hpp>
#include <boost/archive/iterators/transform_width.hpp>
#include "base64.h"
namespace daxia
{
namespace encode
{
daxia::string Base64::Marshal(const void* data, si... |
9a42b1a162f1c832a914be4a1bb3b4f80a665d36 | 7636d7cbf51ec33d2ab396c6a8ac173891bc07a7 | tinou98/embree | /tutorials/find_embree/find_embree_ispc.cpp | C++ | cpp | 1,905 | permissive | // ======================================================================== //
// Copyright 2009-2018 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... |
f06fce1f1e50166d187d2164e24562344d0f2d08 | 1c3cccd6cc03c4fcd3a9e99339f31da01df6652e | lastis/FYS4411 | /Project2/src/cpp/plot/helium_06/main_02.cpp | C++ | cpp | 2,375 | no_license | #include "../../vmcsolver/VMCWrapper.h"
#include "../../vmcsolver/util.h"
#include <chrono>
#include <iostream>
#include <omp.h>
using namespace std;
using microfortnights = std::chrono::duration<float, std::ratio<12096,10000>>;
int main(int argc, const char *argv[])
{
// Take alpha and beta from command line.
... |
c4bdee132e85976a96094cc0cd569f71e2ee872a | 488b2be148088e7960e5010755c5bd34dfa5d7de | zenoalbisser/chromium | /chrome/utility/importer/bookmarks_file_importer.cc | C++ | cc | 3,682 | 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/utility/importer/bookmarks_file_importer.h"
#include "base/bind.h"
#include "chrome/common/importer/imported_bookmark_entry.h"
#include ... |
dedcdfd8e5e54e211cc3c676967907f1c0defafe | 1a4c3c550f183764dc631f2c9b401a14196deb3d | sfcdota/mini-web-server | /webserv/MessageValidator.hpp | C++ | hpp | 4,426 | permissive | //
// Created by sfcdo on 08.06.2021.
//
#ifndef WEBSERV_MESSAGEVALIDATOR_HPP_
#define WEBSERV_MESSAGEVALIDATOR_HPP_
#include <string>
class MessageValidator {
public:
MessageValidator();
~MessageValidator();
bool ValidHeaders(const std::string & request);
bool ValidResponse(const std::string & response);
... |
1090545988c75362c603a6fb318505468fa21bd3 | 355007b8bda07b5af0052f265fbb5e6f44ec6bab | fanzcsoft/wxWidgets | /src/common/init.cpp | C++ | cpp | 15,987 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: src/common/init.cpp
// Purpose: initialisation for the library
// Author: Vadim Zeitlin
// Modified by:
// Created: 04.10.99
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
////////////////////... |
f9353ebe1584036c33c0b59486a4a947adb337fc | 119ad39abcdd7b5f8f8f00d554e83c97b72077a2 | robertwyb/Computer-graphic-assignments | /computer-graphics-ray-tracing/src/write_ppm.cpp | C++ | cpp | 2,036 | no_license | #include "write_ppm.h"
#include <fstream>
#include <cassert>
#include <iostream>
bool write_ppm(
const std::string & filename,
const std::vector<unsigned char> & data,
const int width,
const int height,
const int num_channels)
{
assert((num_channels == 3 || num_channels == 1) && ".ppm only supports RGB o... |
322e4837ad3b338871155a9e5b9b7cccbbc464d0 | ee6c939e69e3e416a4ee30ded60315e0e3ec750b | ShmuelLevine/hpx | /tests/unit/agas/components/server/simple_mobile_object.hpp | C++ | hpp | 1,253 | permissive | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011 Bryce Adelstein-Lelbach
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//////////////////////////////////... |
a51d8b6b7e6bdf4fd4002110b63607d14f6b1e35 | 70454e13a6d6645e1ce1e608f03ab92453a2865d | meepzh/CIS563-FluidSolver | /src/fluidSolver/sphSolver/kernelFunctions.inline.hpp | C++ | hpp | 3,717 | permissive | // Copyright 2016 Robert Zhou
//
// kernelFunctions.inline.hpp
// MFluidSolver
#ifndef MFLUIDSOLVER_SPHSOLVER_KERNELFUNCTIONS_INLINE_HPP_
#define MFLUIDSOLVER_SPHSOLVER_KERNELFUNCTIONS_INLINE_HPP_
#define GLM_FORCE_RADIANS
#include <glm/gtx/norm.hpp>
// Super long constants
// constexpr double POLY6_CONST = 1.566... |
145f1fca2504574f0cdc82cb5f81ea52d5332cd3 | 96d3ac0bb8b4c7f065df063a13e45bcef67854c0 | steAz/Virtual-World-C- | /Swiat.cpp | C++ | cpp | 17,892 | no_license | #define _CRT_SECURE_NO_WARNINGS
#define POMOCZNICZA_DO_NR_ORGANIZMU 10
#define WIELKOSC_PLANSZY 400 // wielkosc pola ze scianami -> szerokosc*wysokosc=400
#include "Swiat.h"
#include "Zwierze.h"
#include "Roslina.h"
#include "Czlowiek.h"
#include "Wilk.h"
#include "Owca.h"
#include "Lis.h"
#include "Zolw.... |
6bed31a2f3ea043a2c9a16a75870ccb56ac8f89c | 20631f902ec10932ab9f378aaa698e5020340544 | zhanglei486/SPDZ-2-Float | /BMR/Register.cpp | C++ | cpp | 29,702 | permissive | // (C) 2018 University of Bristol, Bar-Ilan University. See License.txt
/*
* Register.cpp
*
*/
#include "Register.h"
#include "Wire.h"
#include "GarbledGate.h"
#include "Gate.h"
#include "Party.h"
#include "TrustedParty.h"
#include "CommonParty.h"
#include "Register_inline.h"
#include "prf.h"
#include "GC/Secret... |
af0d718e3dc546091051d7c1751985968fec39ba | 3dbb2222dafa09f9f61a9135d4d88450278f181c | nietras/onnxruntime | /onnxruntime/contrib_ops/cuda/math/bias_softmax.cc | C++ | cc | 3,066 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "contrib_ops/cuda/math/bias_softmax.h"
#include "core/providers/cuda/cuda_common.h"
#include "contrib_ops/cuda/math/bias_softmax_impl.h"
using namespace onnxruntime;
using namespace onnxruntime::cuda;
using names... |
045838d49006ead31c5fab5e348637f80baf86a0 | ed4197432c1ab9756a516006a245457782a1178a | sharpglasses/BitPop | /chrome/browser/sync/test/integration/sessions_helper.cc | C++ | cc | 10,216 | 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.
#include "chrome/browser/sync/test/integration/sessions_helper.h"
#include <algorithm>
#include "base/stl_util.h"
#include "base/test/test_timeouts.... |
f77ef0ed3076dd94d9a217eb515d14290016d4cb | 667a9546decc55264fd1ac95fa9b2f2f65c620bf | vhawk19/World_Map_Of_CPP_STL_Algos | /nth_element.cpp | C++ | cpp | 456 | no_license | #include<iostream>
#include <algorithm>
#include <vector>
int main(){
int n,temp,nth;
bool truth=true;
std::cin>>n;
std::vector<int> a(n);
for(auto& i:a){
std::cin>>temp;
i=temp;
}
std::sort(a.begin(),a.end());
std::cout<<"enter the number u want to find whose position u ... |
5cd0954e046000d9c1f40f7479c0d6722193798b | fae1567290d40d4cb50e7de45268fe2cf6a60822 | kosua20/MIDIVisualizer | /src/libs/glm/detail/func_matrix.hpp | C++ | hpp | 6,990 | permissive | ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documen... |
b5964202a09bef1bbd19375031fafe29620abe38 | 54845d444fb6a94eebc3cfb9a5905a1dff779ec6 | Raunaq-singh/SudoPlacement2019 | /BitMagic/BleakNumbers.cpp | C++ | cpp | 541 | no_license | #include<bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
ll setBits(ll n){
ll ret=0;
while(n){
ret+=(n&1);
n=n>>1;
}
return ret;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
bool isBleak[10001]={};
for(ll i=1;... |
e3b2342c2279b335614293f1c1f77383f2d9601d | f9dccd287d955502858f6c24ccd4de80256fc148 | zepen/tensorflow | /tensorflow/compiler/xla/service/gpu/cudnn_convolution_rewriter.cc | C++ | cc | 20,294 | permissive | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
d158e4444ac9f42fa9667a5a0adb0ce63e11d8af | 04136d44b0b2e9b1650f326d2ac72467ddc304d2 | dicehub/VTK | /Interaction/Widgets/vtkLineWidget.cxx | C++ | cxx | 31,439 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkLineWidget.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is... |
1364122a1b2648eebfe44869c184c955ea642e20 | 8a702805cfbec120bdd8a79e9074fdc8205b83eb | Haar-you/kyopro-lib | /Mylib/Algorithm/cartesian_tree.cpp | C++ | cpp | 1,078 | no_license | #pragma once
#include <optional>
#include <tuple>
#include <vector>
namespace haar_lib {
template <typename T, typename Compare>
auto cartesian_tree(const std::vector<T> &a, Compare compare) -> std::tuple<
int, // root
std::vector<std::optional<int>>, // parent nodes
... |
2b0d33b3832b0a5104872b37c3acef073f271f92 | 79b3f1f763890e29a797d93c947c08b6a8675f2b | iotivity/iotivity-alljoyn-bridge | /unittest/SecureModeResourceTest.cpp | C++ | cpp | 7,859 | permissive | //******************************************************************
//
// Copyright 2017 Intel Corporation All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance w... |
2e6875cbc617f4d84d82a929dbfd71229003e1ef | da86b809583873401c1cef7b8778b473bb4e3f6a | bowei437/Applied-Software-Design--ECE-3574 | /Lecture_QT/Snapshots/chapter9/example9_5to9_8/main.cpp | C++ | cpp | 482 | no_license | #include "mainwindow.h"
#include <QApplication>
#include <QObject>
#include <QMap>
#include <QtGui>
#include <QChar>
#include <QString>
#include <QImage>
#include <QLabel>
#include <QPixmap>
#include <QWidget>
#include "cardpics.h"
#include "cardtable.h"
int main(int argc, char *argv[])
{
QApplication a(argc, ar... |
42fa20cab526db35606a2b6ced02104af55c2b43 | 4ca8b7c84b05411f298d9c5d2de33b1659b78548 | krueg22r/oops-mc | /Small.cpp | C++ | cpp | 2,256 | no_license | #include <stdlib.h>
#include <cmath>
#include <random>
#include "Bead.h"
using namespace std;
//bead-bead dist func that takes bead ptrs.
double getDist(Bead* b1, Bead* b2, double length[], int dimension){
double dist = 0;
for(int i = 0; i < 3; i++){
double di = b1->getCoord(1, i) -... |
17a9966297bbf014f1ecb2e967bb64451c75008c | af09bb3cf9db3d662e78472de165906f643629c1 | KozhevnikovDenis/HH | /Игра 4 в ряд/4 в ряд 9х7/TicTacPlayer.cpp | C++ | cpp | 794 | no_license | #include "TicTacPlayer.h"
void TicTacPlayer::SetupPlayer(string name, CellType cellType)
{
this->name = name;
this->cellType = cellType;
}
void TicTacPlayer::SetBoard(TicTacBoard* board)
{
this->board = board;
}
bool TicTacPlayer::MakeMove()
{
unsigned int col;
cout << "Игрок " << name << ", ваш ход..." << e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.