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 |
|---|---|---|---|---|---|---|---|---|
050edfc4c8a4ada13eda03e313bffbba9ad99fbb | d55ff386a46fc3f3186a733644e7d48f0fc7da20 | VB6Hobbyst7/GeometricTools-Apple | /WildMagic5/LibGraphics/LocalEffects/Wm5Texture2AddEffect.cpp | C++ | cpp | 10,124 | no_license | // Geometric Tools, LLC
// Copyright (c) 1998-2013
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.0 (2010/01/01)
#include "Wm5GraphicsPCH.h"
#include "Wm5Texture2AddEff... |
65ef02b3e71e34aed78f509457e3776d4783fe79 | 6fe396f915c075abcbb0e2af0156e6dea80d7d1c | danielaczarref/RelatorioBase | /listrelatoriobase.cpp | C++ | cpp | 3,750 | no_license | #include "listrelatoriobase.h"
#include "ui_listrelatoriobase.h"
#include <QTableWidget>
#include <QTableWidgetItem>
#include "negocio/cadastroestoque.h"
#include "dominio/estoque.h"
#include "cadastro.h"
#include <QDebug>
#include "relatorio.h"
ListRelatorioBase::ListRelatorioBase(Filtro* filtro,QWidget *parent) :
... |
5a7e40a6eaf5fc00ed33a65044fae7b62eb08c8f | de0207b02b0d82b723f7415886fda192ed0508a6 | KinoluKaslana/POJ_Via_Cpp11 | /1001-1010/1002.cpp | C++ | cpp | 1,468 | no_license | /*
这个题难度比上一题难度小了很多,只需要对map的一个确定,对mai的解引用访问和迭代器访问之间的差距有了解就好
原题地址:http://poj.org/problem?id=1002&lang=zh-CN
*/
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
using std::string;
using std::pair;
using std::map;
int main()
{
const map<char, char> dic{
{ 'A', '2' },{ 'B', '2' ... |
60f44bd5bc01e7e6f97bf834618520b24e0a8792 | e117eed7714a6cf41eff3346eca05277f13ac44c | 1101516DanielBento/Think-Code | /Game3D/Lapr5/Lapr5/Login.cpp | C++ | cpp | 4,100 | no_license | //
// This code was created by Jeff Molofee '99 (ported to Linux/GLUT by Richard Campbell '99)
//
// If you've found this code useful, please let me know.
//
// Visit me at www.demonews.com/hosted/nehe
// (email Richard Campbell at ulmont@bellsouth.net)
//
#include <stdio.h>
#include <iostream>
#ifdef __APPLE... |
07ca781ee8c1f94cda7d6e7ece53096dec0c8436 | ae9a211816a3a343b11f4d5c4347d2d9d0293778 | killvxk/Memory-Engine | /Blackbone/src/BlackBone/Process/Process.cpp | C++ | cpp | 14,625 | permissive | #include "Process.h"
#include "../Misc/NameResolve.h"
#include "../Misc/DynImport.h"
#include <memory>
namespace blackbone
{
#define SystemHandleInformation (SYSTEM_INFORMATION_CLASS)16
#define ObjectNameInformation (OBJECT_INFORMATION_CLASS)1
Process::Process()
: _core()
, _modules( *this )
, _memory(... |
2ccc2b34f919f04d02e10e4c58878c1c967eb198 | 2b4b587a28bf2615fbb7e362628c7075d3ba4d47 | cmacdougald/2021SPRING-COSC1336 | /final_review/review.cpp | C++ | cpp | 1,119 | no_license | #include <iostream>
#include <vector>
#include <string>
int main()
{
std::vector<std::string> vtrNames;
std::string strName = "";
do
{
std::cout << "Please enter a name (quit to quit): ";
std::cin >> strName;
if (strName != "quit")
{
vtrNames.... |
37599dc981ca6c3ee9b7ba5c52d22000b4aa98f6 | 935a95fc1423563e95cde6c75812b420c5343e57 | katzhang/algorithms-in-cplusplus | /3.10.list-reversal.cpp | C++ | cpp | 803 | no_license | /*
author: Robert Sedgewick
PROG: List reversal
*/
#include <iostream>
using namespace std;
struct node {
int item;
node* next;
// Constructor
node(int x, node* t) {
item = x;
next = t;
}
};
typedef node* nodeLink;
nodeLink reverse(nodeLink x) {
nodeLink t, y = x, r = 0;
while (y != 0) {
t = y->next;... |
f5ec9b1dfee7de9520f0becdd7daa8bbde38f6b4 | 218f48e6191b70f61e73c90b8d9be24bd7c58938 | tiankonguse/ACM | /contest/codeforces/round/688/D.cc | C++ | cc | 1,483 | no_license |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long LL;
typedef unsigned long long ull;
typedef unsigned long long ULL;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
// const int mod = 1e9 + 7;
template <class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
... |
05b2d0063fedc054e7b1756618c572c6c6bf8f09 | fdfab42819a87ef29f246922021bea9da73f74bb | StarsX/SuperResolution | /SuperResolution/SuperResolutionX.cpp | C++ | cpp | 13,669 | no_license | //*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL... |
32afe5abf629312dddafb31a6d77430e2a094152 | 8e6446988fadf9843aba0d35b9d450eb00a1fbc4 | OIEIEIO/ombre2 | /src/crypto/pow_hash/cn_slow_hash_hard_intel.cpp | C++ | cpp | 19,810 | permissive | // Copyright (c) 2019, Ryo Currency Project
//
// Portions of this file are available under BSD-3 license. Please see ORIGINAL-LICENSE for details
// All rights reserved.
//
// ombre changes to this code are in public domain. Please note, other licences may apply to the file.
//
// THIS SOFTWARE IS PROVIDED BY THE COPY... |
5e1efb6f7780ae8c545ee727f821aa41dcd1b082 | f2707904f03a01b9398e1e2ff55dcc84801fd7e1 | DmitriiGorelov/pmas_test_foe | /src/ISSUE.cpp | C++ | cpp | 8,452 | no_license | /*
============================================================================
Name : PIVarExample.cpp
Author :
Version :
Description : GMAS C++ project source file
============================================================================
*/
#include <iostream>
#include <sstream>
#include <string>
#i... |
4ff9c09e95d97900f142926047b111bad4c4d418 | bfb416990b81a27395ad4f00077b46b375e8c9b4 | bhrnjica/magma | /magmablas/dgetmatrix_transpose_mgpu.cpp | C++ | cpp | 3,206 | no_license | /*
-- MAGMA (version 2.4.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date June 2018
@generated from magmablas/zgetmatrix_transpose_mgpu.cpp, normal z -> d, Mon Jun 25 18:24:14 2018
@author Ichitaro Yamazaki
*/
#include "... |
6ef9ff35739525bee095afd73ed79f250f0044e0 | f1e136fd7a3f0c27e8fb54ad7327c40fb852ca5d | simsunny22/simunny22 | /leetcode/sum.cc | C++ | cc | 1,408 | no_license | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
int cmpfunc(const void* a , const void* b) {
return (*(int*)a - *(int*)b) ;
}
void print_list(const int *a, int size) {
for (int i = 0; i < size; i++) {
std::cout << a[i] << ",";
}
std::cout << std::endl;
}
void find3(cons... |
421edd2e2e92257be8534d2673dd61e6024e155f | 72be3e263909fc0767387819dbd752c128a1227e | IgorYunusov/Mega-collection-cpp-1 | /The C++ Standard Library - A Tutorial and Reference/io/outbuf1x.hpp | C++ | hpp | 1,316 | permissive | /* The following code example is taken from the book
* "The C++ Standard Library - A Tutorial and Reference"
* by Nicolai M. Josuttis, Addison-Wesley, 1999
*
* (C) Copyright Nicolai M. Josuttis 1999.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright no... |
e7b0e00eaad17778f2308508b5eaa5f1d2d50598 | 7ae02da0778680a73786247b7cfe267841777e30 | JIghtuse/functional-cpp | /src/new_functions/partial_function_application.cpp | C++ | cpp | 1,562 | permissive | #include <common.h>
#include <partial_application.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
// we take
// operator > : (int, int) -> bool
// and create a new unary function object that fixes
// second argument to a specific value (partial function application)
c... |
5c07fe65577e142128f41d47a0045361e2ad6e91 | 76ee54e93e410658272bf112e28796b56b4da25c | Gaurav047/CPP_STL_Competitive | /Samsung/strings/subString.cpp | C++ | cpp | 678 | no_license | // A CPP program to find largest substring with same characters.
#include <bits/stdc++.h>
using namespace std;
int substring(string s){
int ans = 1, temp=1;
//Traverse the string
for ( int i=1 ; i<=s.size() ; i++ ){
if ( s[i] == s[i-1] ){
++temp;
}
els... |
2a5ed13e5d39310ea0ddca6012c12e6af6480964 | c8602c558296258a7dc4fe123faea297fef06f00 | test19124/cppfile | /有道小图灵青少年编程精英挑战赛-热身赛/2.cpp | C++ | cpp | 1,153 | no_license | #include <bits/stdc++.h>
using namespace std;
int n,m;
int a[1000010],b[1000010],c[1000010];
int f[1000010];
int main() {
scanf("%d%d",&n,&m);
for(int i=1;i<=m;i++) scanf("%d",&b[i]);
for(int i=0;i<n;i++) scanf("%d%d",&a[i],&c[i]);
while(1) {
//cout<<1<<z" | "; for(int i=1;i<=m;i++) {cout<<b[i]<<" ";} cout<... |
812b3644112116e0ea19bc820f1dc1371a3155e2 | 361c4adec9b7715e7c6a0be849f94713c7a51416 | faadil1999/algoquicksort | /quicksort/ConsoleApplication3.cpp | C++ | cpp | 830 | no_license | // ConsoleApplication3.cpp : définit le point d'entrée pour l'application console.
//
#include "stdafx.h"
#include <iostream>
#include <algorithm>
using namespace std;
void quickSort(int arr[], int left, int right)
{
int i = left;
int j = right;
int tmp;
int pivot = arr[(left + right) / 2];
while (i <= j)
{
... |
b4b17b471b05e30db8f517656ba3ef8236641973 | 1af4931f04acc08d5496a805fad9e1a72f482472 | adsai/adsai | /src/spork.cpp | C++ | cpp | 10,769 | permissive | // Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2016-2017 The ADSAI developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "spork.h"
#include "base58.h"
#include "key.h"
#include "main.h"
#includ... |
1e008b2b475f374873827b8ba95c1a2b77246d92 | 18189070fe444b6e187fd5a0f462a8fbc65a112f | FatemaAkter44/C-Projects | /FatAkt_open.cpp | C++ | cpp | 2,221 | no_license | #include <iostream>
#include <string>
#include <iomanip>
#include <math.h>
#include <cmath>
using namespace std;
const double PI = 3.1416;
const double CENTIMETERS_PER_INCH = 2.54;
const int INCHES_PER_FOOT = 12;
int main()
{
int feet, inches;
int totalInches;
double x1, y1;
double x2, y2;
dou... |
e75deebd1c36fda4d5c01c4d22be6ea715d5f6f7 | 73fd49ce6fe952dc4c5fb5f3b2319b9d8ef1aa64 | sigrond/Valve3 | /Valve3.cpp | C++ | cpp | 11,463 | no_license | #ifndef WIN32_LEAN_AND_MEAN//magiczna likwidacja konfliktow definicji
#define WIN32_LEAN_AND_MEAN
#endif
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define _NDEBUG
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "wsock32.lib")
#pragma comment(lib,"strmbase.lib")
#pragma comment(lib,"Strmiids.lib")
#p... |
9da3734bc5df775cd0abca8aac4aa723a5fd742f | f93c1c56c98846e85483a6a558bfb6003af2e639 | zhaoxukl1314/UpgradeMyAbility | /app/src/main/cpp/native-lib.cpp | C++ | cpp | 257 | no_license | #include <jni.h>
#include <string>
extern "C"
jstring
Java_com_example_zhaoxu_upgrade_VectorActivity_stringFromJNI(
JNIEnv *env,
jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
|
1e944966a7da2341e34d018db6ea7650f7226a2a | fd54bf06088d9348c99b9a6e881c133b65e2154b | sashavassin/oopServer | /stats.cpp | C++ | cpp | 627 | no_license | #include "stats.h"
typedef unsigned long ulong;
stats::stats()
{
}
void stats::findStat(std::vector<double> &workersIntervals)
{
// среднее значение интервала между проходами рабочих
interval_average = double(accumulate(workersIntervals.begin(), workersIntervals.end(), 0)) / workersIntervals.size();
//ср... |
a4c2e0b787823d79baf4e9875c8bb432df3d14e6 | 98c1e1b238704c9067d0ff6c5681a7f042293bf4 | jing-ge/MyCodeInterview | /17_Print1ToMaxOfNDigits/main.cpp | C++ | cpp | 2,682 | no_license | #include <iostream>
using namespace std;
#include <cstdio>
#include <memory>
#include <cstring>
void PrintNumber(char* number);
bool Increment(char* number);
void Print1ToMaxOfNDigitsRecursively(char* number, int length, int index);
// ====================方法一====================
void Print1ToMaxOfNDigits_1(int n)
{... |
298497e1795ae50ee8d8db43c2ccaea040b7872d | df507902bf77d37824c2574a16ea39561417446b | ZihanJiang96/CMU-15618-final-project | /GPU-BVH-version/rand_scene_gen.cpp | C++ | cpp | 854 | permissive | #include <iostream>
#include <random>
using namespace std;
#define N 1000
#define LEFT -300
#define RIGHT 300
int main() {
freopen("scene","w",stdout);
std::default_random_engine generator;
std::uniform_int_distribution<int> distribution(LEFT, RIGHT);
cout << 4 << " " << N << endl;
for (int i =... |
70c7e27a0ccb882e694d27d9ff25d0e9beab23aa | 2f3645bd423c87e1efcef52eb2a085dca0a6a84e | XinweiHsu/FastCAE_Ubuntu20 | /Code/GeometryWidgets/dialogCreateLine.cpp | C++ | cpp | 8,823 | permissive | #include "dialogCreateLine.h"
#include "ui_dialogCreateLine.h"
#include "geoPointWidget.h"
#include "geometry/geometrySet.h"
#include "geometry/geometryData.h"
#include "GeometryCommand/GeoCommandCreateLine.h"
#include "GeometryCommand/GeoCommandList.h"
#include "geometry/geometryParaLine.h"
#include <QMessageB... |
4dff993d04dbe3dc8b063053aeacbb7d3f1f06e6 | e9007a28458f5521dd1cc357b5829052af906f51 | SoftwareNetwork/specifications | /db/92/18/46/057e2ac8deaeb7e1f55cde5c40cda11789e8a5a93983379e9cdf835ad5227ea133bc0aa2562abe1ab5b53d1d21884c182549a5293705c7c76ab0c509/sw.cpp | C++ | cpp | 18,825 | no_license | #pragma sw require header org.sw.demo.ragel
#pragma sw require header org.sw.demo.lexxmark.winflexbison.bison
#pragma sw header on
static void gen_stamp(const DependencyPtr &tools_stamp_gen, NativeExecutedTarget &t)
{
auto c = t.addCommand();
c->always = true;
c << cmd::prog(tools_stamp_gen)
<< cm... |
5badb5d24f385393d4e96d3f32b4b24b53b4e5bb | 5ab4ebd897967cdd2345c385540f6659be83a22a | pedrobelo/Heterogeneous-Exploration | /stl_aeplanner/src/param.cpp | C++ | cpp | 6,384 | permissive | #include <ros/ros.h>
#include <stl_aeplanner/param.h>
namespace stl_aeplanner
{
Params readParams()
{
Params params;
std::string ns = ros::this_node::getNamespace();
bool ret = true;
params.hfov = 60;
if (!ros::param::get(ns + "/camera/horizontal_fov", params.hfov))
{
ROS_WARN("No horizontal fov speci... |
83435f0bcb4f859e4d3b71c00de4a32f9856209a | 7aa0cd84ec8b85b7bc7ee5370fca72320a4f0a73 | roblzs/palindrome-test-cases | /main.cpp | C++ | cpp | 1,514 | no_license | #include <iostream>
#include <string>
using namespace std;
int get_reverse_number(int& num){
string reverse_num_string = "";
string num_string = to_string(num);
int num_len = num_string.length() - 1;
while(num_len >= 0){
char num_part = num_string.at(num_len);
reverse_num_string.push_... |
8c2b33ae5958495bdfcd386f85e46622c3b7d555 | 247f21a58af14c8942570ba8331c3c970119f950 | BackupTheBerlios/feedticker | /src/layout/defaultlayout.cc | C++ | cc | 1,767 | no_license | /**
* @file defaultlayout.cc
*
* Copyright (C) 2009 T. Kordelle (feedthk@users.berlios.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at you... |
911673862d0b001b51c86a864e57702f2ef6648c | caa3b74ec121300899e1aeedabf61b3fd3cb4f63 | wesmail/hydra | /old_hydra/hydra/tags/v8_21/tof/htofcontfact.cc | C++ | cc | 2,601 | no_license | //*-- AUTHOR : Ilse Koenig
//*-- Modified last : 20/02/2002 by Ilse Koenig
//_HADES_CLASS_DESCRIPTION
/////////////////////////////////////////////////////////////
//
// HTofContFact
//
// Factory for the parameter containers in libTof
//
/////////////////////////////////////////////////////////////
#include "htof... |
65d6530ae317621e1d8764f45dfb66e425538216 | d54c714c1599b4b6c9b53f949152771d129c14f4 | alisw/AliRoot | /ITS/ITSbase/AliITSVertexerFixed.cxx | C++ | cxx | 3,420 | permissive | /**************************************************************************
* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
69989fc0cb65bd8a7ce111efda954ca630f6ca18 | 4f1301fcaf62e7f9418761675906f4d7c178a7d9 | jasonssssshieh/suffixprefix-Trie | /211. Add and Search Word - Data structure design.cpp | C++ | cpp | 1,449 | no_license | //Leetcode No.211
//Using Trie & Backtracking method
class TrieNode{
public:
TrieNode(){
children.resize(26,NULL);
}
bool isEnd = false;
vector<TrieNode*> children;
};
class WordDictionary {
public:
WordDictionary(){root = new TrieNode();}
// Adds a word into the data structure.
voi... |
47fa74601240c67b8600030bb9090d9696f7fee9 | 14c12a897fe2ca7c2bf030ed27a232d9fd755e37 | xianjimli/Elastos | /Elastos/Framework/Droid/eco/src/core/location/GpsNetInitiatedHandler.cpp | C++ | cpp | 2,543 | no_license |
#include "location/GpsNetInitiatedHandler.h"
const CString GpsNetInitiatedHandler::TAG = "GpsNetInitiatedHandler";
const Boolean GpsNetInitiatedHandler::DEBUG;
const Boolean GpsNetInitiatedHandler::VERBOSE;
const CString GpsNetInitiatedHandler::ACTION_NI_VERIFY = "android.intent.action.NETWORK_INITIATED_VERIFY";
cons... |
61d4f7055b933156498967b2bc579242c0923749 | 8dcfe4006a6565ce6a713c7a09dd0a8ff93df402 | binary-cocoa/LegacyXPG | /source/XPG/OpenGL/ShortIndexVBO.cpp | C++ | cpp | 613 | no_license | #include <XPG/OpenGL/ShortIndexVBO.hpp>
namespace XPG
{
ShortIndexVBO::ShortIndexVBO(GLenum inUsage)
: VertexBufferObject(GL_ELEMENT_ARRAY_BUFFER, GL_UNSIGNED_SHORT,
inUsage)
{
}
ShortIndexVBO::~ShortIndexVBO()
{
}
void ShortIndexVBO::draw(GLenum inMode) const
{
... |
5dfd802fbc9a0555625742eef362599f75ccd8ac | aa50770081aa1fc5b215eec0f0841d4824987b4a | China13/elen3009-lab-4-China13 | /src/payroll/Hourly.cpp | C++ | cpp | 932 | no_license | // Member function definitions for class HourlyWorker
#include "hourly.h"
// Constructor
HourlyWorker::HourlyWorker (const string& first_name, const string& surname,
double wage, double weekly_hours)
: Employee(first_name, surname), // call base-class constructor
wage_(wage),
weekly_h... |
a82327f2049d49b2148838fc1018b42f314c9bfd | 6b7fbb61b810b9b43febdc0141547bc7b07ce5c7 | saransh37/codeforces_A_solution | /112A - petya and string.cpp | C++ | cpp | 365 | no_license | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
int f=0;
for(int i=0;i<a.length();i++){
if(tolower(a[i])>tolower(b[i])){
cout<<1;
f=1;
break;
}
else if(tolower(a[i])<tolower(b[i])){
cout<<-1;
f=1;
... |
baed312c4d3d823a3fa368bd605635617593588e | e43482c5f11cc55ef2757c86753436e860253d91 | kostko/h0g | /iid/src/scene/rendrable.cpp | C++ | cpp | 2,957 | no_license | /*
* This file is part of the Infinite Improbability Drive.
*
* Copyright (C) 2009 by Jernej Kos <kostko@unimatrix-one.org>
* Copyright (C) 2009 by Anze Vavpetic <anze.vavpetic@gmail.com>
*/
#include "scene/rendrable.h"
#include "scene/scene.h"
#include "scene/lightmanager.h"
#include "renderer/statebatcher.h"
#in... |
50f3b02e72b671252ca885db42166120aad8d23b | a1253fad3f8fbeea30333743a7c9aeecb522b3a7 | 2bite/ARK-SDK | /SDK/ARKSurvivalEvolved_Task_DKaijuFindMovePointWithinArena_parameters.hpp | C++ | hpp | 2,306 | permissive | #pragma once
// ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_Task_DKaijuFindMovePointWithinArena_classes.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Parameters
//----------------------------------... |
46843b8d035f28ae857abb9d1d9108201982ac0b | 41fc46db8136e13d14f9c555d4b4bbfd685c0022 | sh2393/ECE4960 | /Assignment3/paramExtraction.cpp | C++ | cpp | 2,463 | no_license | /*H**********************************************************************
* FILENAME : parameExtraction.cpp
*
* DESCRIPTION :
* Construct a modular program that can accomplish least-square fitting and parameter extraction
*
* AUTHOR : Joyce Huang (sh2393:Cornell University) START DATE : 5 Apr ... |
24c0a8fe4d166022d24cf478674f660c0c349d68 | 4ed4a1eb0aa5b260d2a901a00196aa64e01f19d6 | ccdxc/logSurvey | /data/crawl/squid/old_hunk_5946.cpp | C++ | cpp | 687 | no_license | fs = (file_state *) hash_lookup(hash, &r->id);
if (NULL == fs) {
errno = EBADF;
fprintf(stderr, "%d WRITE id %d: ", (int) mypid, r->id);
perror("do_write");
return -EBADF;
}
if (r->offset > -1 && r->offset != fs->offset) {
if (lseek(fs->fd, r->offset, SEEK_SET) < 0) {
fprintf(stderr, "%d FD %d... |
c36df1279c60d4e2d289ef85f12c7289fe8c5abc | 6008fa30b5555f43a7d5790ae7e28bad17036e34 | Garrettcraig4/c-plus-plus-snake | /main.cpp | C++ | cpp | 4,555 | no_license | #include <iostream>
void run();
void printMap();
void initMap();
void move(int dx, int dy);
void update();
void changeDirection(char key);
void clearScreen();
void generateFood();
char getMapValue(int value);
// Map dimensions
const int mapwidth = 20;
const int mapheight = 20;
const int size = mapwidth * mapheight... |
1d3b0a56abab54ae097275519ed941041b86f2a6 | 9ec95693e2b45095b59251653ee531ecea6c78a7 | maxwell-zhengxu/compute-runtime | /runtime/gtpin/gtpin_hw_helper.cpp | C++ | cpp | 1,370 | permissive | /*
* Copyright (c) 2018, Intel Corporation
*
* 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 limitation
* the rights to use, copy, modify, merge, ... |
b3f5727524a40f40142c66838f0429fca2e7c656 | ca51c5010cdb95b74fecc2b3ca6a085ba963d8a7 | niftich/escher | /escher/gl/gles2/context.cc | C++ | cc | 4,747 | permissive | // Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "escher/gl/gles2/context.h"
#include <string>
namespace escher {
namespace gles2 {
Context::Context() : frame_buffer_(MakeUniqueFrameBuffer()) ... |
97c3b0bcd0c254d9dc645e89b7f2205a1db7211d | 9cf9ca858f42b31c7a97984a7b03728770ce1f47 | fundamental/rtosc | /test/version.cpp | C++ | cpp | 1,556 | permissive | #include <rtosc/rtosc-version.h>
#include "common.h"
void comparisons()
{
rtosc_version v_3_1_1 = { 3, 1, 1 },
v_1_3_3 = { 1, 3, 3 },
v_2_9_9 = { 2, 9, 9 },
v_3_4_3 = { 3, 4, 3 };
assert_int_eq(1, rtosc_version_cmp(v_3_1_1, v_1_3_3) > 0,
... |
569a5845897603f0eed102b8fafe585b522a148b | d3d31edf18883db1ac9eeed1bebe3811c8a33f0c | Lilith2/HelvetaCS | /Netvars/Netvars.hh | C++ | hh | 5,349 | permissive | #pragma once
#include "../SDK/Forward.hh"
#include "../Helpers/Helpers.hh"
#include <memory>
#include <unordered_map>
#include <type_traits>
struct Netvars_t
{
Netvars_t() = delete;
Netvars_t(SDK::ClientClass *pClassHead);
inline ~Netvars_t(){};
ptrdiff_t Get(Hash_t hClass, Hash_t hProperty) const;
private:
vo... |
a26fdf186db8b6182416dbbf2b5d5539b6b54505 | 7d4d39b926c41a7c8e9ea7d6286930b7bc87e46c | koson/Multi-Sensor-Fusion | /03-mapping-and-matching/lidar_localization/src/matching/matching.cpp | C++ | cpp | 8,454 | no_license | /*
* @Description: 前端里程计算法
* @Author: Ren Qian
* @Date: 2020-02-04 18:53:06
*/
#include "lidar_localization/matching/matching.hpp"
#include <pcl/common/transforms.h>
#include <pcl/io/pcd_io.h>
#include "glog/logging.h"
#include "lidar_localization/global_defination/global_defination.h"
#include "lidar_localizatio... |
ae26e4e96f7e7e113274cc3d10a872f0d7be079e | 96e5db262fc6aaec12c31fd0a23f178e2a7fb9ca | ruevers/Tecax | /src/qt/paymentserver.cpp | C++ | cpp | 28,110 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Tecax Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "paymentserver.h"
#include "bitcoinunits.h"
#include "guiutil.... |
0288c306b40bb5b24764ef12e1a7098bd49ea6f6 | c2abb43f05cb5692cf60930cea31db90aaf3ace0 | blackhearted/ember-plus | /libember/Headers/ember/util/TypePun.hpp | C++ | hpp | 1,721 | no_license | /*
libember -- C++ 03 implementation of the Ember+ Protocol
Copyright (C) 2012-2014 L-S-B Broadcast Technologies GmbH
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; eithe... |
f178cb974cc459dc80aac2c82f3476421bdc9c96 | 8db49ed2b149bd045fc09e0a651e46caefb376dc | project-asap/swan_clang | /lib/CodeGen/CodeGenModule.cpp | C++ | cpp | 122,808 | permissive | //===--- CodeGenModule.cpp - Emit LLVM Code from ASTs for a Module --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
2dbd49e5a7c387b1d202d85182c9e9627f7027c8 | 59eb6df878c38255d2b24388c0eb55d9b98ac52f | robatkins/bitcoin | /src/test/fuzz/pow.cpp | C++ | cpp | 5,530 | permissive | // Copyright (c) 2020-2021 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 <chain.h>
#include <chainparams.h>
#include <pow.h>
#include <primitives/block.h>
#include <test/fuzz/FuzzedDataProv... |
c072c14970e180088b8ce7e1127bc5c2e9fe63fd | 3746b2f3e70af262317370dde4b81f8fb8ff7a28 | jalimena/UserCode | /plots/macros/makeHistos/makehistos-Ntuples-signalandcosmics_upperlower.cpp | C++ | cpp | 43,151 | no_license | {
//overlays histograms, saves eps files
using namespace std;
gROOT->Reset();
gROOT->SetStyle("Plain");
gROOT->ForceStyle(); //forces it to use the style set above, rather than the style the rootfile was made with
gROOT->LoadMacro("style.cpp");
global_style();
int color_plot=1; // 1/0 for color/black... |
aa2e86f49201632642fa1f38ca98247124e7771c | d9f8b3a827499f83fc5965a6a6f8b0f0a843d8bd | WalfredMA/MaxVar | /VarCaller/ref_reader.hpp | C++ | hpp | 482 | no_license | //
// ref_reader.hpp
// testcpp
//
// Created by Wangfei MA on 8/13/20.
// Copyright © 2020 UCSF_Kwoklab. All rights reserved.
//
#ifndef ref_reader_hpp
#define ref_reader_hpp
#include <stdio.h>
#include <string>
#include <fstream>
#include <iostream>
#include <cstring>
class refreader{
public:
ref... |
8ec58589ce12f380efd426c7f99018f2e7e41222 | bd6e78ea708112291823261be918e9686fc3d813 | samueltang-x/accelerated-cpp | /ch13-using-inheritance-and-dynamic-binding/main.cpp | C++ | cpp | 1,218 | no_license | #include "Grad.h"
#include <algorithm>
#include <fstream>
#include <ios>
#include <iomanip>
#include <iostream>
#include <stdexcept>
#include <vector>
using std::cout;
using std::domain_error;
using std::endl;
using std::ifstream;
using std::max;
using std::setprecision;
using std::streamsize;
using std::sort;
using ... |
e952b6a25f071f6acc1c6cd778f79b6b24e0e923 | 59500fa3324b41cca4ce0b967f27ed811b73632c | bino7/chromium | /components/sync/api/entity_data.cc | C++ | cc | 1,214 | permissive | // Copyright 2015 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 "components/sync/api/entity_data.h"
#include <algorithm>
#include "base/logging.h"
namespace syncer_v2 {
EntityData::EntityData() {}
EntityDa... |
1647c81cc9a792278a7a4d7e2af2be94f7c4723c | 1bc420f59a775cfffc69c5524df094131ee5c09e | cmyers-CERN/AliPhysics | /PWGHF/treeHF/AliAnalysisTaskSEHFTreeCreator.cxx | C++ | cxx | 122,906 | permissive | /**************************************************************************
* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
dc1b39cd87532717814f7103f94fd731acfc8034 | 00886476de5f87a3e6177e32b8fff023d5c81ab3 | zer0main/bin_game_mvc | /src/Game.hpp | C++ | hpp | 486 | permissive | /*
* Copyright (C) 2014-2016 Pavel Dolgov
*
* See the LICENSE file for terms of use.
*/
#ifndef GAME_HPP_
#define GAME_HPP_
#include "global.hpp"
#include "GameDesk.hpp"
#include "GameController.hpp"
/** Contains all classes necessary for game */
struct Game {
/** Create new instance.
\param row_number W... |
7459da84da12872b073641c5bd11b1dd361fa0df | b226f5be406d7f0b4710dfd9833e07f18e133483 | bartkerfeld/BKChess | /src/main.cpp | C++ | cpp | 333 | no_license | #include <iostream>
#include "movegen.h"
#include "zobrist.h"
#include "evaluate.h"
#include "uci.h"
int main(int argc, const char *argv[]) {
std::cout << "BKChess Started!" << std::endl;
BitBoard::init();
Zobrist::init();
MoveGenerator::init();
Board board;
SearchInfo info;
Uci::loop(board, info);
... |
21b3c099934bc43ccc431672a98a5031cadee7af | df7b3096129bccbeb2718eed49b946b75813ee3b | iPhreetom/ACM | /Final Game/航电多校/2019-muti-5/1005.cpp | C++ | cpp | 1,523 | no_license | // fyt
#include<bits/stdc++.h>
#include <time.h>
// #define int long long
// #define double long double
#define endl '\n'
using namespace std;
signed main(){
// ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
double start,finish; /* 开始时间,结束时间 */
start=(double)clock(); /* 我的time.h内没有CLOCKS_PER_SEC */
vector<ve... |
09c8a77a73788beef2cd78bf879f59de140742d3 | 602acff2088d6861832ffb85b4fe0ff5a3413dc9 | njwhite/arrow | /cpp/src/arrow/compute/compute-test.cc | C++ | cc | 14,218 | 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"); you may... |
0f7833e21fa0c27b8fabc61612d0de2faac9bd57 | 3a516ad6189c92f65fd5682294c4a46696c83651 | balancedbanana/balancedbanana | /testsrc/database/JobGatewayTests.cpp | C++ | cpp | 77,676 | no_license | #pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-err58-cpp"
#include <gtest/gtest.h>
#include <database/JobGateway.h>
#include <database/job_result.h>
#include <database/job_details.h>
#include <database/Utilities.h>
#include <database/WorkerGateway.h>
#include <QSqlQuery>
#include <QVariant>
#includ... |
adf35eb13c73498cc1fa01c0140f6f7c57a16f19 | f8d84fe9ccb579f22dcf57eba182aa48e2c982fb | shandaming/Martial_arts | /Smjy/src/client/old/game_config.cpp | C++ | cpp | 639 | no_license | /*
* Copyright (C) 2017 by Shan Daming
*/
#include "game_config.h"
namespace game_config
{
const std::string version = VERSION;
const Version_info game_version(VERSION);
#ifdef MARTIAL_ARTS
std::string path = MARTIAL_ARTS;
#else
std::string path = "";
#endif
std::string game_program_dir;
#ifdef REVISION
... |
def584683e944acb2294c9e4ad51a4ea4a701cf5 | 6baef1f545ef3965b41ae657586495be67ec99aa | jhinkoo331/leetcode | /solution/1161____Maximum_Level_Sum_of_a_Binary_Tree.cpp | C++ | cpp | 1,109 | permissive | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int maxLevelSum(TreeNode* root) {
return _1(root);
}
private:
/**
* @perf: [37, ... |
a778a8c0a1a1745a55a369a397686532e2f066af | a072790623853c999daf698ce8638542a5790d67 | tiagosr/pd-8 | /src/arch/desktop/hal/hal.cpp | C++ | cpp | 1,052 | permissive | #include <SFML/Window/Keyboard.hpp>
#include <hal/hal.hpp>
#include <sys/time.h>
#include <unistd.h>
#include <emu/emulator.hpp>
#include "../window.hpp"
#include "devices/image.hpp"
namespace hal
{
std::uint16_t update_button_state()
{
#ifndef YOCTO8_DESKTOP_HEADLESS
return arch::desktop::yolo_window.button_s... |
c8ae33dc6949016bc7feda92021c697598111a55 | 6ea52d9a2cb65a9cf8e5985a4f96ab72f0a59d2b | Raker623175274/TwoDTest | /Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp | C++ | cpp | 13,873 | no_license | /******************************************************************************
* Spine Runtimes Software License v2.5
*
* Copyright (c) 2013-2016, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable, and
* non-transferable license to use, install, execute, ... |
56bdf487459607ce945dd4a906cd1c1e7cfefb4e | 586d28b871336ea45c126f1d40320945427436fc | asdlei99/D.S.A-Leet | /src/cpp/142. Linked List Cycle II.cpp | C++ | cpp | 1,421 | permissive | /*
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Note: Do not modify the linked list.
Follow up:
Can you solve it without using extra space?
*/
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* Li... |
057ea56d98a7dd8f1617572b666263e6f0cfa380 | ade5804e4e20ba27978c4450f803a912b7b15d36 | leschtz/sweb | /arch/arm/verdex/source/MMCDriver.cpp | C++ | cpp | 5,832 | no_license | /**
* @file arch_mmc_driver.cpp
*
*/
#include "BDManager.h"
#include "BDRequest.h"
#include "MMCDriver.h"
#include "ArchInterrupts.h"
#include "Scheduler.h"
#include "kprintf.h"
#define TIMEOUT_WARNING() do { kprintfd("%s:%d: timeout. THIS MIGHT CAUSE SERIOUS TROUBLE!\n", __PRETTY_FUNCTION__, __LINE__); } while ... |
a28dbb8b1232881ee8ba5d4ee7981b2d6f7e6fc2 | 22206fcfefbab30888f65a226d0b51612cf2bf31 | gnoliyil/fuchsia | /src/ui/scenic/bin/main.cc | C++ | cc | 2,519 | permissive | // Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/async-loop/cpp/loop.h>
#include <lib/async-loop/default.h>
#include <lib/sys/cpp/component_context.h>
#include <lib/syslog/cpp/macros.h>
#inc... |
23105550c1eb75e332815260fc40b7504791b9ee | cc7dada02908b86d4f8276eacdae115f7c17ae85 | dreademarco/Spectrometer | /src/plotter.cpp | C++ | cpp | 1,833 | no_license | #include "plotter.h"
using namespace std;
#define BUSY_WAIT 1
Plotter::Plotter(FFTWSequenceBuffer *sourceDataBlock, SpectrogramPlot *spectrogramPlot, int selectedSpectSize, int selectedChans, QObject *parent) : QObject(parent)
{
this->nchans = selectedChans;
this->spectSize = selectedSpectSize;
thi... |
d642da5763a02c848b1807991743f6a7ee4c8568 | bc244b41c2fbb4dc23e67acab9f410d06c43dae3 | brunad-coder/proview | /xtt/lib/xtt/src/xtt_jop.cpp | C++ | cpp | 4,258 | no_license | /*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2018 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2... |
213073eea0d85741e67c9ad870f84371ec7ab67b | 937a3f83c0594b8ac5ac6894a4cc9c6a9b391484 | wiwitrifai/competitive-programming | /atcoder/dwacon6th-prelims/b.cpp | C++ | cpp | 696 | no_license | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, mod = 1e9 + 7;
int x[N];
long long powmod(long long b, long long p) {
long long r = 1;
for (; p; p >>= 1, b = b * b % mod)
if (p & 1)
r = r * b % mod;
return r;
}
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++... |
ad106da84014e643cbc45a49db16254b584034d2 | dfafe7705aef2c35c4d3aa135824f87fd10fba6a | Vinograduss/technopark_cpp | /net/common/socket.cpp | C++ | cpp | 9,090 | no_license | #include <iostream>
#include <stdexcept>
#include <arpa/inet.h> // inet_aton()
#include <fcntl.h>
#include <netdb.h> // gethostbyname
#include <netinet/in.h> // struct sockaddr_in
#include <string.h>
#include <sys/socket.h> // socket(), AF_INET/PF_INET
#include "socket.hpp"
// global
std::string int2ipv4(ui... |
9d99f2aee04a56fede36471d5454dea2b4a8ea45 | 737e6099cb2fc3c5f099a817843279794d679228 | kusoof/wprof | /WProf/src/chrome/browser/ui/views/ash/key_rewriter.cc | C++ | cc | 21,686 | 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/ui/views/ash/key_rewriter.h"
#include <vector>
#include "ash/shell.h"
#include "base/logging.h"
#include "base/string_util.... |
df114ce486d3d0457338b33181ed46ae5a500fed | 497af4fb7924e651781c58aa68f6e61e923fabc3 | paulsammut/learn | /learn_cpp/chapter4/ex_1/ex_1/main.cpp | C++ | cpp | 1,063 | no_license | #include <QDebug>
#include "src_1.h"
testScore_t gradeTest(){
return (12);
}
int main(int argc, char *argv[]) {
//extern int bigDicks;
qDebug() << "hello beautiful world!" << endl << endl;
qDebug() << "Dicks is: " << Constants::dicks << endl;
qDebug() << "Please enter the type of faggot tha... |
417a07e1176f0cecb2435d8febd8d20ae4f98ff7 | 11dc9a19209cca0c72d4429c8e4082a17eb7fc4d | husigeza/Patterns | /Lazy_init/src/Lazy_init.cpp | C++ | cpp | 938 | no_license | //============================================================================
// Name : Lazy_init.cpp
// Author : Geza Husi
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
... |
a9c8ceab1b2df4af1dc11e45e2d2f2fe5ba16c7d | a969d8f76d3135ef60bba96446529c08d585a2b9 | berlinbrown/OctaneMechOpenGLGame | /octanemech/glants_mech/win32/glAntsV05/maps.cpp | C++ | cpp | 4,864 | no_license | /**
* Copyright (c) 2006-2011 Berlin Brown. All Rights Reserved
*
* http://www.opensource.org/licenses/bsd-license.php
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* * Redistributi... |
4a98db1b397842b3eeb55cadda26bb027cac1934 | 4240866610ea3fc0eb5b129179648faee4d6a8fe | 15831944/barry_dev | /src/DocFileMgr/DfmLogTester/main.cpp | C++ | cpp | 13,956 | no_license | ////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2005
// Packet Engineering, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification is not permitted unless authorized in writing by a duly
// appointed officer of ... |
3468aa260bc17f901ceb77fe1b8f58697a4bf4c2 | 2ae9f6c7428858a5581badf1d589b783379e0023 | Demon000/uni | /pdav/jpeg/yuv420/YUV420Codec.cpp | C++ | cpp | 3,858 | no_license | #include "YUV420Codec.h"
#include "YUV420Image.h"
void YUV420Codec::encode(YUV444Image &source, YUV420Image &target) {
target.resize(source.width(), source.height());
for (uint32_t blockY = 0; blockY < source.dataHeight(); blockY++) {
for (uint32_t blockX = 0; blockX < source.dataWidth(); blockX++) {... |
937dadf905e6c3e1587d4b9a7e8937bb8198e5ad | 1d5d9b673f576870927d7a3143b91b0e39debc78 | eao197/sobjectizer | /dev/so_5/mbox_fwd.hpp | C++ | hpp | 510 | permissive | /*
SObjectizer 5.
*/
/*!
\file
\since
v.5.5.1
\brief A forward declaration of mbox_t.
*/
#pragma once
#include <so_5/atomic_refcounted.hpp>
namespace so_5
{
class abstract_message_box_t;
//
// mbox_t
//
//! Smart reference for the abstract_message_box.
/*!
* \note Defined as typed... |
36a29485f699e2e781924ce542d5602a3e83fc54 | 6dfe4939708395535094b331fdc11c6beef16c51 | ccdxc/logSurvey | /data/crawl/git/hunk_958.cpp | C++ | cpp | 622 | no_license | struct commit *commit;
if (verbosity >= 0) {
- char from[GIT_SHA1_HEXSZ + 1], to[GIT_SHA1_HEXSZ + 1];
- find_unique_abbrev_r(from, head_commit->object.oid.hash,
- DEFAULT_ABBREV);
- find_unique_abbrev_r(to, remoteheads->item->object.oid.hash,
- DEFAULT_ABBREV);
- printf(_("Updating %... |
5eb042fb8a4a5ea67d45f6664a744f30e9955e7f | 01a4c73cc13707ce63ed62644364ad21457d8ce8 | MrBigDog/study | /src/examples/gwDracoTest/main.cpp | C++ | cpp | 4,514 | no_license | #include <osg/Quat>
#include <osg/Depth>
#include <osg/NodeVisitor>
#include <osg/StencilTwoSided>
#include <osg/MatrixTransform>
#include <osg/ComputeBoundsVisitor>
#include <osg/PositionAttitudeTransform>
#include <osg/Material>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgDB/FileUtils>
#include ... |
ac791b7a2fa6877d23a8258530f0123fa38ba172 | a18a7178d7b7b349cd3d32568cf3b7a28b3c07e9 | CJ-Nil/computer-grphics-qt | /src/my_label.cpp | C++ | cpp | 546 | no_license | #include "my_label.h"
my_label::my_label(QWidget *parent):QLabel(parent)
{
this->setMouseTracking(true);
}
void my_label::mouseMoveEvent(QMouseEvent *ev)
{
QPoint mouse_pos=ev->pos();
if(mouse_pos.x()<=this->size().width() && mouse_pos.y()<=this->size().height() && mouse_pos.x() >= 0 && mouse_pos.y() >= 0... |
0fe5d2cface0cf9cae8187c4d34bab5d72419dca | 98ba9e4956edf16c8831f80d62b687133f1af7f2 | karunmatharu/Android-4.4-Pay-by-Data | /external/chromium_org/chrome/browser/translate/translate_prefs_unittest.cc | C++ | cc | 4,276 | 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/translate/translate_prefs.h"
#include <algorithm>
#include <string>
#include <vector>
#include "chrome/test/base/scoped_browser... |
7f663a0726eacbfdabd09555c65e1dc4b9fff902 | a3da160c7ade907728ee1e32cae6d412c705505e | termoshtt/cujak | /exception.hpp | C++ | hpp | 694 | permissive | #pragma once
#include "driver_types.h"
#include "cufft.h"
#include <stdexcept>
#include <string>
namespace cujak {
struct CUDA_ERROR : public std::exception {
cudaError_t err;
CUDA_ERROR(cudaError_t err) : err(err) {}
virtual ~CUDA_ERROR() throw(){};
const char *what() const throw();
};
struct CUFFT_ERROR ... |
a7d0e7239bfa73aa03feeee19af11413c80861cf | 7af59c45466471ab56a1c6a576a1806dd64de5d8 | tiankonguse/ACM | /manger/递推/递推/习题/source/杜昆泰/domino.cpp | C++ | cpp | 391 | no_license |
#include <fstream>
using namespace std;
long long f[10000];
// f[i]指让2*i个长方形铺满所需要的长方形个数
ifstream fin("domino.in");
ofstream fout("domino.out");
int main(void)
{
long all,i;
fin>>all;
f[0]=f[1]=1;
for(i=2;i<=all;i++)
f[i]=f[i-1]+f[i-2];
fout<<f[all]<<endl;
fin.close();
... |
79d4836658d4b476b8f20343d294e370975db29d | 97b8cbf6eb5887506e2966d7b68e33a7567cf4ce | novaquark/aws-sdk-cpp | /aws-cpp-sdk-elasticfilesystem/source/model/DescribeFileSystemsResult.cpp | C++ | cpp | 1,875 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
534de8ccef32b80a42a105eda415feee34962e41 | 600f5b575a2e83424800f7f02596e1d8502dfc55 | chemiczny/automateusz_gto_d2 | /src/d2_ee_pdpd_AD.cpp | C++ | cpp | 1,973 | no_license | #include "gto_d2_kit/d2_ee_pdpd_AD.hpp"
#include "gto_d2_kit/d2_ee_pddp_AC.hpp"
void second_derivative_ee_1212_14(
const double ae,
const double xA,
const double yA,
const double zA,
const double be,
const double xB,
const dou... |
e99b08667f2f4432f53aa904de4d99622fb49849 | 2a419749b1ec71f10d81f86f0ec0797804bcb630 | Qtsho/hist_user_tracking | /src/deprecated/openni/test_connected_components_matcher.cpp | C++ | cpp | 5,278 | no_license | #include "utils/debug/debug.h"
#include "connected_components_matcher.h"
#include "vision/utils/image_utils/drawing_utils.h"
#include "vision/utils/image_utils/color_utils.h"
inline void test_given_patterns(ConnectedComponentsMatcher & matcher,
cv::Mat1b & patterns,
... |
bcbb39bf83cea2caa91f82e3a6a0ff9b44690d02 | b67a425e7e58c221d8c1bfce7f1923cd7a6c75c9 | ngzHappy/OpenGL45Book | /src/OpenGLTool/QuaZip/quaadler32.cpp | C++ | cpp | 1,394 | no_license | /*
Copyright (C) 2010 Adam Walczak
Copyright (C) 2005-2014 Sergey A. Tachenov
This file is part of QuaZIP.
QuaZIP is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2.1 of the License, or
(at... |
ecd4b0e03313eadfbebda8ce4fb56acebf3cd48d | ed43273a341f101564e9a2659b3ea790cb1ff1c5 | rashadkm/libkml | /src/kml/dom/geometry.cc | C++ | cc | 17,259 | permissive | // Copyright 2008, 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 conditions and ... |
7c54a150577cfb4da017cc4c28f7a6ae3df263f0 | 3827f42ca30a72b216513cc6c86f24c5a38dc2e8 | qazz625/Competitive-Programming-Codes | /Codeforces/1567/1567c.cpp | C++ | cpp | 953 | no_license | #include <bits/stdc++.h>
using namespace std;
#define int long long
#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#include "../../../debug.cpp"
#endif
int32_t main(){
int t;
cin >> t;
while(t--){
string s;
cin >> s;
int n = s.size();
reverse(s.begin(), s.end());
if(n == 1){
cout << (s[0]-'0') - 1 <... |
eb9f9e2a19c7bdcf5f3f659a139d442cf61dc678 | 7fb2f98741d4ab6490a57e449dc727d65bc1c9a7 | yanaiela/neuron-gpu | /Hoc_Process/csv_64MDL_process.cpp | C++ | cpp | 1,564 | no_license | #include "csv_64MDL_process.h"
/*
* The process function takes much too long
* it's probably a matter of the regex or the function
* that use it
*/
// Constructor
csv64MDL_process::csv64MDL_process()
{
count = INIT; // Assuming the count in the vector is starting from 0.
mod = MOD; // every module regex
}
vec... |
e14944d3bcb4387ddf0674530b578a71cf8271ef | 61dd23ddb32160fbab350b15c0bfe2f9794fcc58 | shu-ramen/atcoder_cpp | /abc/129/a.cpp | C++ | cpp | 1,707 | no_license | //=template==================================================================//
// include
#include <vector>
#include <list>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
// namespace
using namespace std;
// define
#define FOR(i,a,b) for(int (i)=(a); ... |
1dfaa01502985b99531e052ceb4c9f0a5255db2c | c0c404a4518f47489d8ef66f159e78c40a065155 | ufz/ogs | /ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp | C++ | cpp | 4,655 | permissive | /**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "TwoPhaseFlowWithPrhoProcess.h"
... |
a8e1026635490501fcad6f4056666ee102c9107b | 110072c4c56d7b5997dd187c39691cb52a2643e7 | chrisvander/TicTacToe | /main.cpp | C++ | cpp | 4,719 | no_license | /**
* Created by Chris Vanderloo on 1/4/2020
*/
#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
using namespace std;
class Board;
class Player {
public:
// returns 0-8
virtual int getMove(Board b) = 0;
virtual ~Player() {};
};
class Board {
private:
vector<int> board... |
a322a115d62046a7762dbb69ef6e2ba3fd827e46 | 1df29157ce3ef39e344bd56294f1c6bcfde8351a | CompilerTeaching/Pegmatite | /examples/calculator/calculator.cc | C++ | cc | 6,859 | permissive | #include <iostream>
#include <sstream>
#include <string>
#include "pegmatite.hh"
// This is very bad style, but it's okay for a short example...
using namespace std;
using namespace pegmatite;
/**
* The AST namespace contains the abstract syntax tree for this grammar.
*/
namespace AST
{
/**
* The base class for ... |
d42aadb09144b72c73859896fd91218556253cef | 2b3f49c5942c0abd82d62277fd5199332c0b81e9 | DinuCr/CS | /Competitive Programming/Codeforces/Good Bye 2019/B. Interesting Subarray/main.cpp | C++ | cpp | 637 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define f first
#define s second
#define pb push_back
int v[300001];
int main()
{
cin.sync_with_stdio(false);
cout.sync_with_stdio(false);
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
for(int i=1... |
7c4e38919a8e940874fe64acd92c56b16c9979cc | 41ab772098ba86579a524083b27350d572df265d | RaduAlexandru/easy_pbr | /src/Gui.cxx | C++ | cxx | 109,453 | permissive | #include "easy_pbr/Gui.h"
//opengl stuff
#include <glad/glad.h> // Initialize with gladLoadGL()
// Include glfw3.h after our OpenGL definitions
#include <GLFW/glfw3.h>
#include "imgui.h"
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include "imgui_ext/IconsFontAwesome.h"
#include "imgui_ext/ImGuiUtils.... |
8b3ce070c1e14086c14fd9264f1de07c57cb79c0 | 5e5d4b364cab21be2f854ecaa4ae1b066270dc2c | mikecancilla/ProgrammingProblems | /ProgrammingProblems/src/ShuffleArray.cpp | C++ | cpp | 1,558 | no_license | /*
This problem was asked by Facebook.
Given a function that generates perfectly random numbers between 1 and k (inclusive), where k is an input, write a function that shuffles a deck of cards represented as an array using only swaps.
It should run in O(N) time.
Hint: Make sure each one of the 52! permutation... |
b0ac328e8c6f33ae0b4da63c4420881b29fbd636 | 2728671ba5e4671ba5e459c554b7b17e1468f541 | AndreyNevolin/cracking-the-coding-interview | /6. Recursion/Fibonacci (matrix form)/main.cpp | C++ | cpp | 1,229 | permissive | /* Write a method to generate the nth Fibonacci number */
#include <iostream>
using namespace std;
int BIT( int n, int m)
{
return (n >> m) & 1;
}
void mul( long long A[][2], long long B[][2], long long res[][2])
{
for ( int i = 0; i < 2; i++ )
for ( int j = 0; j < 2; j++ )
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.