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 |
|---|---|---|---|---|---|---|---|---|
d3b27699e14b898b9ea2cddf12ada62ac3ade095 | f514aeab20b505f05031682817f059951d71ec63 | spmno/DStep-stm32f103 | /main.cpp | C++ | cpp | 2,826 | no_license |
#include "DStep/DStep.h"
static void vLEDTask( void *pvParameters );
static void interrupt1( void );
TaskHandle_t xHandle = NULL;
int send_flag = 0;
void test()
{
DStepSerial0::begin(9600);
DStepSerial0::write('8');
u8 value = DStepSerial0::read();
DStepSerial1::begin(9600);
DStepSerial1::write('8');
value =... |
555efeaf8f82eebdb21e3313e1a42bf7dcd91f18 | 7014b073439e7452538853bb4b73e57dda7d731b | Aj163/Competitive-Programming | /CodeChef/AUG17/CHEFFA.cpp | C++ | cpp | 1,098 | no_license | #include <bits/stdc++.h>
#define f(i, num) for(int i=0; i<num; i++)
#define F(i, lower, upper, step) for(int i=lower; i<upper; i+=step)
#define F_(i, upper, lower, step) for(int i=upper; i>lower; i-=step)
#define M 1000000007
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<i... |
66d774eb711f69d96d8c9b88df32e7c6656febee | c49afe85803415ace0eff6741ee82a82c4beed7b | studierstube/studierstube | /src/components/viewer/displaymode/SoFieldSequentialDisplayMode.cxx | C++ | cxx | 6,172 | no_license | /* ========================================================================
* Copyright (C) 2005 Graz University of Technology
*
* This framework 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... |
efa25cd6608ebc53431c5d44e53c99b0bb915aca | 6da9bda5d9a8db4e351bd1607f59e8ae71717a4e | bfgeek/chromium | /components/exo/pointer_unittest.cc | C++ | cc | 11,268 | 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 "ash/shell.h"
#include "components/exo/buffer.h"
#include "components/exo/pointer.h"
#include "components/exo/pointer_delegate.h"
#include "compo... |
afa12758fd7f4e491e569e67cc68bd2c82c132df | 6ac0665eb726dcb6aaf494346dace6718d0f4112 | andrew2015/ooxmlpp | /Libooxml/trunk/Libooxml/ST_TLChartSubelementType.cpp | C++ | cpp | 355 | no_license | #include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/dom/DOM.hpp>
#include "pml.h"
ST_TLChartSubelementType& ST_TLChartSubelementType::operator =(const ST_TLChartSubelementType& b) {
}
ST_TLChartSubelementType& ST_TLChartSubelementType::operator =(wchar_t *b) {
}
ST_TLChartSubelementType:... |
00d3c666b447a29c20b3a8b29200add86ef3264b | 6ee75d5bb7c1583c610d3711dfdc7c893639861b | SerenityOS/serenity | /Userland/DevTools/UserspaceEmulator/SoftVPU.cpp | C++ | cpp | 24,812 | permissive | /*
* Copyright (c) 2022, Leon Albrecht <leon.a@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "SoftVPU.h"
#include "SoftCPU.h"
#include <AK/SIMDMath.h>
namespace UserspaceEmulator {
void SoftVPU::PREFETCHTNTA(X86::Instruction const&) { TODO(); }
void SoftVPU::PREFETCHT0(X86::Instruction co... |
04b97303c3fdeabf252c6d82f8c7672b8c46ce14 | 2e14543a376399fdb9e4bb6650de8eea68080f06 | catboost/catboost | /contrib/tools/ragel6/mlfflat.cpp | C++ | cpp | 9,810 | permissive | /*
* Copyright 2004-2006 Adrian Thurston <thurston@complang.org>
* 2004 Erich Ocean <eric.ocean@ampede.com>
* 2005 Alan West <alan@alanz.com>
*/
/* This file is part of Ragel.
*
* Ragel is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Publ... |
1533fd32a7c9784ef50a1e64b390a0a8c0aeb170 | f525f96d733eab99305f377515d5eef9ecd1ecf6 | naveenmahadevuni/incubator-trafodion | /core/sqf/src/seabed/src/map64.cpp | C++ | cpp | 1,297 | permissive | //------------------------------------------------------------------
//
// @@@ START COPYRIGHT @@@
//
// (C) Copyright 2006-2014 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You m... |
3a2f41aa21db78b8a666fbaeb6143f4e37d28335 | 00ca84d068f3a3d72b3f0d88ca11a50f7fbd3f07 | gurellia53/TestApp0 | /app/src/main/cpp/native-lib.cpp | C++ | cpp | 1,202 | no_license | #include <jni.h>
#include <string>
#include "native-lib.h"
// JNI function to clear inputs to the calculator
extern "C" JNIEXPORT void JNICALL
Java_gurik_andrew_testapp0_MainActivity_gscClearInputValuesJNI(JNIEnv *env, jobject /* this */)
{
gscClearInputs(0);
return;
}
// JNI function to set input... |
5e1212e4163ef45d07c1ceac992652befa750990 | 58bbd423fc25f151720f4843e66f008d97c50287 | ailyanlu1/Competitive-Programming-2 | /CodeChef/SHORT/COOK54/ANUAHR/test.cpp | C++ | cpp | 1,739 | permissive | #include<stdio.h>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<map>
#include<set>
#include<vector>
#include<utility>
#include<math.h>
#define sd(x) scanf("%d",&x);
#define sd2(x,y) scanf("%d%d",&x,&y);
#define sd3(x,y,z) scan... |
3bb99d7ea9d1990f5f8f8e99e020c5145017055d | 83634f7c6face895f9f342067163ec7501d5ffde | HolyMarble/laboratorniye | /Lab 3/Lab 3, 1/1.cpp | C++ | cpp | 846 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string.h>
#include<fstream>
using namespace std;
int main()
{
const int a = 3;
setlocale(LC_ALL, "");
const char p = '\n';
char temp_str[256];
const int len = 41, strings = 3;
char strng[strings][len];
ifstream fs("F:\\file.txt");
... |
f759a6749a74bd3464b5d873c60bee1a8bea0a46 | 5067a5f2e95bb8611cb063912ba5a2ea39500a20 | AdayevKP/ParallelDataStructures | /main.cpp | C++ | cpp | 4,439 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <numeric>
#include <limits.h>
#include <cmath>
#include <iostream>
#include "fineGrainedSync.h"
#include "lazySync.h"
#define WRITERS_NUMB 3
#define READERS_NUMB 3
using namespace std;
int size = 2000;
vector<int> ... |
d61fc71e936ad6ae356cf21e08cb0d77c8bcce01 | 00090e2e3d57d37b38434973a8d5be2453a0b7a3 | lwfitzgerald/raytracer | /Materials/Transparent.cpp | C++ | cpp | 1,305 | no_license | #include "Transparent.h"
#include "../Utils/Ray.h"
#include "../Utils/ShadeInfo.h"
#include "../World.h"
namespace Raytracer {
Transparent::Transparent(std::istringstream& iss) {
initMaterialFromIss(iss);
iss >> distribution;
iss >> ior;
iss >> name;
}
Colour Transparent... |
6579183b954b0f3c9170194b66bd3850263a03b5 | 7de80a2d83f31575d2f467ab649889350c29d4a8 | 0xc0dec/solo | /vendor/assimp/4.1.0/code/ASEParser.cpp | C++ | cpp | 70,982 | permissive | /*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2017, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
... |
bf2c66caab82300870e8bba43d3ebeef2c7f5daf | 7eb3883930f285eed65323bcb30a5836f846eb9a | vvvictorlee/eossmartcontractssafeframeworks | /contractscxx/access/Whitelist.hpp | C++ | hpp | 2,428 | no_license | //
#include "../ownership/Ownable.hpp"
#include "../access/rbac/RBAC.hpp"
/**
* @title Whitelist
* @dev The Whitelist class has a whitelist of addresses, and provides basic authorization control functions.
* This simplifies the implementation of "user permissions".
*/
class Whitelist :public Ownable,public RBA... |
c5a6118a83499f3cceca6ca09802f6cd2fce8a7c | ebb536d5dcebcdbd924d329366263cb0b7d0e120 | raiker/BulletSharp | /src/UniformScalingShape.cpp | C++ | cpp | 698 | permissive | #include "StdAfx.h"
#include "UniformScalingShape.h"
#define Native static_cast<btUniformScalingShape*>(_native)
UniformScalingShape::UniformScalingShape(btUniformScalingShape* native)
: ConvexShape(native)
{
}
UniformScalingShape::UniformScalingShape(ConvexShape^ convexChildShape, btScalar uniformScali... |
9921e956eebfc171d7d5a19b955d0e1356de970f | 1342d44143a6cbfdf93228888d55d8abe96525f0 | nealwu/UVa | /volume128/12887 - The Soldier's Dilemma.cpp | C++ | cpp | 1,002 | no_license | #include <stdio.h>
/*
add tallest people in position i
ways[n] = \sum ways[i] * ways[n-i-1].
^^^^^^[1] ^^^^^^^^^^[2]
[1] left tree pos[0, i-1]
[2] right tree pos[i+1, n-1]
then label of right tree must small than label of left tree
=> Catalan number, an = (4n-2)/(n+1) * an-1
*/
long long inv(long long n, long lo... |
926b8d641dcc0eb7172ca621ad9a55f5f081b826 | 8601212b25288d3a90fa7ba2b39393e384b07d45 | yeah2569/magnum | /src/Magnum/Text/Test/AbstractFontTest.cpp | C++ | cpp | 3,192 | permissive | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016
Vladimír Vondruš <mosra@centrum.cz>
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 S... |
74cd203833bee65a62b9b157f037e62fb45dd45c | 51ff4eba4b25118b76833fe939faa46bc0f8d4d6 | L31N/SuperRectEvolution | /hm_window.cpp | C++ | cpp | 3,825 | no_license |
#include <wx/dcbuffer.h>
#include "hm_window.h"
#include "app.h"
HMWindow::HMWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, wxT("SuperRect Main Menu"), pos, size, style ) {
this->SetBackgroundColour( wxColour( 0, 0, 0 ) );
wxBoxSizer* bSizer1... |
65f02eb6bc6e3d79665169a98aaeca3bed799c91 | a6e4e1c5e09c7d97e4e0a3b1b952307caf74ef64 | mposa/drake | /bindings/pydrake/solvers/mosek_py.cc | C++ | cc | 1,003 | permissive | #include "pybind11/pybind11.h"
#include "drake/bindings/pydrake/documentation_pybind.h"
#include "drake/bindings/pydrake/pydrake_pybind.h"
#include "drake/bindings/pydrake/solvers/solvers_pybind.h"
#include "drake/solvers/mosek_solver.h"
namespace drake {
namespace pydrake {
PYBIND11_MODULE(mosek, m) {
// NOLINTNE... |
41eff4f63991999081520f39ce6b633dec0340e4 | 9762c1ddb486f1ce3e9248940c1e0cf21e67f13b | engineer6080/CodingExcercises | /CTCI/Array_String/is_unique.cpp | C++ | cpp | 821 | no_license | //#include <cstdio> //gets, puts, printf, scanf
//#include <cstdlib> //atoi, free, malloc
#include <iostream> //cin, cout
#include <string>
#include <bitset>
#define SIZE 128 //ASCII 128 characters
using std::cout;
using std::cin;
using std::endl;
using std::string;
using std::bitset;
bool isunique(const string &str... |
79e1c68a7653a2618b31ec3c6508f4e44916117e | f22b63daa64330b36eea9b8b66bca43090796d5e | hporwal3/Getting-started | /maxpath.cpp | C++ | cpp | 1,532 | no_license | #include <iostream>
#include <queue>
using namespace std;
class TreeNode{
public:
int data;
TreeNode* left;
TreeNode* right;
TreeNode(int d){
data=d;
left = NULL;
right = NULL;
}
};
TreeNode* createTree(){
int x; cin >> x;
if (x == -1){
... |
b0136cf69171cbc89865c27aaf67e4c5a275adc1 | 8d2fd66bb42ae2dc6e2f6de2377f8efd94d29a35 | BackupTheBerlios/sems-svn | /tags/1.1.0/core/AmIcmpWatcher.cpp | C++ | cpp | 3,806 | no_license | #include "AmIcmpWatcher.h"
#include "AmRtpStream.h"
#include "log.h"
#include <string>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/in.h>
#include <netinet/ip_icmp.h>
#define __FAVOR_... |
9fe085beae6b8c2df8f47c0c92870b339325395b | 471c3a20737c3a41080af70287db84b17a5bc5fb | skgshivam/Coding_Practice | /Arrays/reverse_array.cpp | C++ | cpp | 431 | no_license | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
void reverse_array(int *arr, int n){
int temp=0;
for(int i=0; i<=n/2; i++){
temp = arr[i];
arr[i]=arr[n-1-i];
arr[n-1-i]=temp;
}
}
int main(){
int n;
cin>>n;
int arr[n];
for(int i=0; i<n;i++)
cin>... |
0354b8b00c85b2734f36243c680dd73c03b1b5bc | 63d07fa8c4e1783c72c131c9bde19ef93dce3ed8 | EasierMonk95/Parcial-Final | /Parcial_final/bolasn.cpp | C++ | cpp | 529 | no_license | #include "bolasn.h"
#include "mainwindow.h"
extern MainWindow *main;
BolasN::BolasN()
{
int aleatorioX = rand()% 790+5;
int aleatorioY = rand()% 400+5;
setPos(aleatorioX,aleatorioY);
/* QTimer *temporizador = new QTimer();
connect(temporizador,SIGNAL(timeout()),this,SLOT(randomizer()));
... |
7a882f45665d293dbc03bab38814904392188c3f | 6a51f236a629064f9d9a8eb149d1c4a7f71b9457 | freesense/qserver | /tianmadata/common/src/BaseFile.cpp | C++ | cpp | 4,631 | no_license | //BaseFile.cpp
//
#include "stdafx.h"
#include "BaseFile.h"
///////////////////////////////////////////////////////////////////////////////
CBaseFile::CBaseFile()
{
m_pRecordBuf = NULL;
m_nRecordBufLen = 0;
m_nRecordPos = NULL;
m_pCurRcdBuf = NULL;
m_nRecordCount = 0;
m_nRecordLen = 0;
... |
af11c0ff34f38ee751d98cd437b5d2f4cf1fe16e | bf7f7cb7e41df45b3db19e31e6c9535a506bd32f | wuqiang22/cocos2d_framework | /cocosstudio/CSCacheLoader.cpp | C++ | cpp | 1,465 | no_license | #include "cocosstudio/CSCacheLoader.h"
#include "CCFileUtils.h"
#include "cocostudio/ActionTimeline/CSLoader.h"
GAEM_NAME_SPACE_BEGIN
CSCacheLoader* CSCacheLoader::instance = nullptr;
void CSCacheLoader::returnNode(const std::string& path, cocos2d::Node* node)
{
CC_SAFE_RELEASE(node);
if (node->getRefer... |
11745db27b28de980ce09219721612b398ccef82 | 1a3f6d345586e9e106347c9d929ad0538484dfe5 | ssamadgh/WWDC-Videos | /Audio/WWDC 2010/Audio Development for iPhone OS/Sample_Codes/SpeakHere/Classes/MeterTable.cpp | C++ | cpp | 3,295 | no_license | /*
File: MeterTable.cpp
Abstract: Class for handling conversion from linear scale to dB
Version: 2.4
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this... |
11dafc707992d4abc34481ccabecd03c783d5f73 | 73cf1eef8081a3d9eea1401b5933d377fa49760e | bhargavthriler/OpenCL-CTS | /test_conformance/compatibility/test_conformance/api/test_mem_object_info.cpp | C++ | cpp | 36,142 | permissive | //
// Copyright (c) 2017 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable la... |
5201957673715dbc95e0f297ba528778de0e0008 | 27e92adfdfaea0e57448cd59d89495083e3d49e5 | NotMrPotter/mwc-qt-wallet | /state/send1_OnlineOffline.cpp | C++ | cpp | 1,772 | no_license | #include "send1_OnlineOffline.h"
#include "../wallet/wallet.h"
#include "../windows/send1_onlineoffline_w.h"
#include "../core/windowmanager.h"
#include "../core/appcontext.h"
#include "../state/statemachine.h"
#include "../util/Log.h"
namespace state {
SendOnlineOffline::SendOnlineOffline(const StateContext & conte... |
ad01f667fed5d6348c9b5c0114f51ecca1792b8c | 6aa2f2b2c8405f9bbda757d800c33561eec46ba9 | gpernot/drp_1d | /RedshiftLibrary/src/lib/reliability/zqual.cpp | C++ | cpp | 71,208 | no_license | #include <RedshiftLibrary/common/datatypes.h>
#include <RedshiftLibrary/operator/operator.h>
#include <RedshiftLibrary/processflow/result.h>
#include <RedshiftLibrary/debug/assert.h>
#include <RedshiftLibrary/log/log.h>
#include <RedshiftLibrary/processflow/datastore.h>
#include <RedshiftLibrary/processflow/resultstor... |
5827fa4bf60b5067a53d6931b20daec16684570e | 9e81ba8a453131ae3bd698c1f6fbb832c6a10134 | chongtianfeiyu/Rose | /apps-src/apps/librose/exceptions.hpp | C++ | hpp | 1,055 | permissive | /* $Id: exceptions.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
/*
Copyright (C) 2010 - 2012 by Guillaume Melquiond <guillaume.melquiond@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Softwar... |
49b1ac1c58b50b2d6ceeceda3dd759d3891a8987 | 733e5d0ce13732b7013b587e6735338ddcafb38c | dunli/mpi-caffe | /tools/caffe.cpp | C++ | cpp | 15,530 | permissive | #ifdef WITH_PYTHON_LAYER
#include "boost/python.hpp"
namespace bp = boost::python;
#endif
#include <glog/logging.h>
#include <cstring>
#include <map>
#include <string>
#include <vector>
#include <mpi.h>
#include "boost/algorithm/string.hpp"
#include "caffe/caffe.hpp"
#include "caffe/util/signal_handler.h"
using ca... |
7c6bc1a67b8a4ba4f7f5b7b3d6573f2add48cfba | aee1446375fbc13ee55214c7e0b1c415f7124e41 | mmxsrup/procon | /atcoder/abc/073/b.cpp | C++ | cpp | 825 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<pint> vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=n-1;i>=(0);i--)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define each(it,v) for(__typeof((v).begin(... |
c63b796c55dcb72b8b1e65068f799d04ddbb1451 | 22229596fc97c350003adb5dfde359d8c9463b2d | yf885188/BeyondEngine | /SourceCode/EngineCenter.cpp | C++ | cpp | 7,435 | no_license | #include "stdafx.h"
#include "EngineCenter.h"
#include "Render/AnimationManager3D.h"
#include "Render/RenderManager.h"
#include "Resource/ResourceManager.h"
#include "Resource/ResourcePathManager.h"
#include "Render/renderer.h"
#include "Utility/BeatsUtility/ComponentSystem/ComponentPublic.h"
#include "Utility/BeatsUti... |
3a5db8d5ca7c2402724c710ad35c432c79710e38 | 25021ed74a40966899a82cdeb7df036335a5cdae | vzakaznikov/ClickHouse | /src/Functions/stem.cpp | C++ | cpp | 4,463 | permissive | #include "config_core.h"
#if USE_NLP
#include <Columns/ColumnString.h>
#include <DataTypes/DataTypeString.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionHelpers.h>
#include <Functions/IFunction.h>
#include <Interpreters/Context.h>
#include <libstemmer.h>
namespace DB
{
namespace ErrorCodes
{... |
66d0d93b5f326a8c8a3f75947e88fc0fb022a659 | 9f2d5d731f985604adc96ad8501f0229782ab119 | indresh07/Floodfill | /include/list.hpp | C++ | hpp | 4,879 | no_license | /* Author : Indresh Kumar Gupta
Purpose : Implementation of linked list data structure
Version : 1.2
*/
/*
* queue.hpp
*
* functionality of a singly linked-list
*
* define your methods in coherence with the following
* function signatures
*
*
*/
#ifndef LIST_HPP
#define LIST_HPP 1
namespace cs202... |
6af0d5e168633bb3bd61d5e8148a88be7fd9572a | fb6246cb1d4d9a3d165cd91b1df4e41e4c7e7027 | Kappatalist/C-like-Analysis | /C++/Crypto.cpp | C++ | cpp | 2,406 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include "Crypto.h"
#include "Universal.h"
#include "CpuUsage.h"
using namespace std;
Crypto::Crypto(int iter, int keysz)
{
ITERATIONS = iter;
KEY_SIZE = keysz;
}
void Crypto::RunCrypto()
{
CryptoTelemetry telemetry;
UniversalTelemetry universal;
CpuUsage cpu_usage;
ofstream fi... |
8c97ba4591be4c2cd0fe1d8ae077d925d6b19781 | 5d904c9667ed29be2b0238aa49ec4490628d1053 | gihop/AlgorithmStudy | /Programmers/Programmers/호텔_방_배정.cpp | C++ | cpp | 1,788 | no_license | #include <string>
#include <vector>
#include <map>
#include <iostream>
using namespace std;
//호텔 방 배정 문제 재도전.
//전에는 효율성을 통과하지 못했다.
//union find 알고리즘 사용으로 풀 수 있었다.
//부모 노드가 다음 빈 방 번호 값을 갖게 하는 방식이다.
//재귀를 이용해서 값을 계속 갱신시킨다.
map<long long, long long> m;
long long find(long long num){
//처음 찾는 숫자라면 map에서 0이다. 바로 num을... |
ec6e3c77a682a7a1ab4c11d94d6efa19c53631ff | ec10fd4909019c2e67dd3546f3e24ca34af9911d | krux/envoy | /test/common/upstream/health_checker_impl_test.cc | C++ | cc | 34,083 | permissive | #include <chrono>
#include <memory>
#include <string>
#include <vector>
#include "common/buffer/buffer_impl.h"
#include "common/http/headers.h"
#include "common/json/json_loader.h"
#include "common/network/utility.h"
#include "common/upstream/health_checker_impl.h"
#include "common/upstream/upstream_impl.h"
#include ... |
9f80645354e209efeeccfb848d31e255301c98c3 | 872334df41aa03afd515bfb75d04cc00428da68c | rhoona/paulDavidson_ciscsc5_spring18 | /mark_lerh_class_2018/ASISGNMENTS/chapter6_functions/chapter_6_function_pr_11/main.cpp | C++ | cpp | 471 | no_license | /*
* File: main.cpp
* Author: Dr Mark E. Lehr
* Created on February 13, 2018, 1:20 PM
* Purpose: Create a CSC/CIS 5 Template
*/
//System Libraries
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
#include <string>
using namespace std;
//User Libraries
//Global Constants - Math/Phys... |
6bba04b37d5348e459d552075a0ce3a13d8e6513 | eace8172287214c41c412bef196a0aed6a076dab | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14600/function14600_schedule_4/function14600_schedule_4_wrapper.cpp | C++ | cpp | 1,324 | no_license | #include "Halide.h"
#include "function14600_schedule_4_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){
Halide::Buffer<int32_t> buf00(16384);
Halide::Buffer<int32_t> buf01(163... |
0328c7b08b4bed1571b8a9b917d7cc2e803a509f | 16816206272da5550ea8d325edee6807444d011c | bravesoftdz/shsmeta | /Sources/Components/FastReport5/LibD19/frxExportXML.hpp | C++ | hpp | 6,594 | no_license | // CodeGear C++Builder
// Copyright (c) 1995, 2013 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'frxExportXML.pas' rev: 26.00 (Windows)
#ifndef FrxexportxmlHPP
#define FrxexportxmlHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- ... |
0dbeb14aa9ceb755c39c46d1066568683b88a6f1 | 9bef18ad7e6369c2f04ebec7b193eb0b7cd58ee8 | vgrankin1/ogl_tank | /src/elements.cpp | C++ | cpp | 1,581 | permissive |
#if defined _MSC_VER
#include <windows.h>
#define _USE_MATH_DEFINES
#else
#define _STDCALL_SUPPORTED
#define _M_IX86
#endif
#include <GL/gl.h>
#include <cmath>
void vector_mul( float *res, const float *v1, const float *v2)
{
res[0] = v1[1] * v2[2] - v2[1] * v1[2];
res[1] = v2[0] * v1[2] - v1[0] * v2[2];
res[2] = ... |
cc361f2f546e4bf3b6090cf3ad4cd403ec30109a | 7123dbf3ce2b7db09da2ad04ca0965e8c23c3b01 | resqs/RESQ-Chain | /src/test/miner_tests.cpp | C++ | cpp | 11,154 | permissive | // Copyright (c) 2011-2014 The Bitcoin Core developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2019 The RESQ developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "main... |
e8c8888abed77643283f6a60e30d578e39758ac7 | a6269085e21b18f820fc8c9eee8ff00b70d50bdf | Kangar000/KangIsaac_CSC5_Summer16_42576 | /Homework/Assignment7/Gaddis_7thEdition_Chapter8_Problem7_BinaryString/main.cpp | C++ | cpp | 2,076 | no_license | /*
* File: main.cpp
* Author: Isaac Kang
* Created on July 22, 2016, 10:42 PM
*/
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
/*
*
*/
const int SIZE = 20;
void sortS(string names[], int size){
int startS;
int minIndex;
string minValue;
... |
6efe85a5f798328376bf73beb9c81306a923adf5 | bc672c4ab75365b6b5742cf3238997b3bb12b603 | Vizionnation/chromenohistory | /chrome/browser/web_applications/web_app_database_unittest.cc | C++ | cc | 11,242 | permissive | // Copyright 2018 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/web_applications/web_app_database.h"
#include <memory>
#include "base/bind_helpers.h"
#include "base/run_loop.h"
#include "base... |
99f26e1d7c7b972c9eccb93858defd78ef0b8a2d | 3952d49b3d0e6dcdc01d34d440b4c12a92c006e0 | Brenda-t/VCtext | /Lib4/UsingLib4/UsingLib4View.cpp | C++ | cpp | 1,690 | no_license |
// UsingLib4View.cpp : CUsingLib4View 类的实现
//
#include "stdafx.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "UsingLib4.h"
#endif
#include "UsingLib4Doc.h"
#include "UsingLib4View.h"
#include "Lib4.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CUsingL... |
aeaab14a5e6a950b06f9ac9e73481cfcf54cd71a | 6ec98156e7cd4a1e9c55e8e5bd2aaa0298dab041 | fedetft/miosix-kernel | /miosix/arch/common/core/stm32f0_f3_os_timer.cpp | C++ | cpp | 5,301 | no_license | /***************************************************************************
* Copyright (C) 2021 by Terraneo Federico *
* *
* This program is free software; you can redistribute it and/or modify *
* it unde... |
ed1c8620b5d10278f80ded20e7e5748f068dca4f | 3a8884bda3df97a5ec37133634ae670f89fc156b | KDSBest/service-fabric | /src/prod/src/Store/AtomicOperation.cpp | C++ | cpp | 1,035 | permissive | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using nam... |
aa799739221ed73c18e29e421499c675655c30f5 | c23acce2e4d520a3dc97eaec6627f2c04bbf099e | KevinZhu5/oneDNN | /src/gpu/getenv_utils.hpp | C++ | hpp | 2,732 | permissive | /*******************************************************************************
* Copyright 2023 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.apache.o... |
08f7c2347d13dde9a9c15e0d2fa44ee9b6f25fd1 | bdbff93245064997c560e156b9a5670a4f47b98c | vkozhemi/CPP_Rush01 | /src/Display.cpp | C++ | cpp | 9,353 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Display.cpp :+: :+: :+: ... |
f96d4c62737b74a9a1e6a803829d02055356ae8c | 4bfc05829bc8137ad999d6595155a51b386a8625 | gargaditya/ProgrammingContest | /Grid Charachter Graph Insertion.cpp | C++ | cpp | 5,737 | no_license | //*********************SHOPON(CODEHEAD)- UNIVERSITY OF ASIA PACIFIC *************************//
//******************************************************************************************//
//************************************Header Files*****************************************//
#include<bits/stdc++.h>
using... |
f50c4a6ae9cd8e55e19b52de89c0ba2784bc37fd | 28f7a1829bdd8e12a74ab839c59e89481903c521 | zpiao1/CPP-Primer | /Exercise 13.15.cpp | C++ | cpp | 340 | no_license | #include <iostream>
using namespace std;
int i = 0;
struct numbered {
int mysn = 0;
numbered():
mysn(i++) {}
numbered(const numbered &s):
mysn(s.mysn + 1) {}
};
void f(numbered s);
int main()
{
numbered a, b = a, c = b;
f(a); f(b); f(c);
return 0;
}
void f(numbered s)
{
cout ... |
1c6174e03f7c9c9f6ee243d4eba82a1f54061990 | 10cb3c5d80c96a63b46375ad0bc4ee3e4588bfea | pg1770/kakoune | /src/keys.hh | C++ | hh | 1,768 | permissive | #ifndef keys_hh_INCLUDED
#define keys_hh_INCLUDED
#include "string.hh"
#include "unicode.hh"
#include <vector>
namespace Kakoune
{
struct Key
{
enum class Modifiers
{
None = 0,
Control = 1,
Alt = 2,
ControlAlt = 3
};
enum NamedKey : Codepoint
{
// u... |
1c7d6c5d75fad8e4526f4f01de98a1c3a9c072c2 | b6a6580172ccbbf2e904c774ae4a88ff5bd54400 | mhv75/sifteo-api-extended | /projects/text/loader.cpp | C++ | cpp | 3,052 | permissive | /*
* Sifteo SDK Example.
*/
#include "loader.h"
#include "assets.gen.h"
using namespace Sifteo;
MyLoader::MyLoader(CubeSet cubes, AssetSlot loaderSlot, VideoBuffer *vid)
: cubes(cubes), loaderSlot(loaderSlot), vid(vid)
{
assetLoader.init();
}
void MyLoader::load(AssetGroup &group, AssetSl... |
f76012c91e3b6faef7b5392f1d3035241af003ff | fc41db121ca72821538b4907e8ef9e10c73a27dc | mmitkevich/uri | /include/network/uri/uri_builder.hpp | C++ | hpp | 6,922 | permissive | // Copyright (c) Glyn Matthews 2012-2016.
// Copyright 2012 Dean Michael Berris <dberris@google.com>
// Copyright 2012 Google, Inc.
// 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)
/**
* \file
* \brief Contains... |
0321f3fd3f29ef37a098928afe96d118e048846b | cfd9abfaa589135cb2dbc56d87830af04a995eb1 | Wasrek/POSN15 | /MWITS 26-31.3.19/test/TT_Rich.cpp | C++ | cpp | 902 | no_license | /*
TASK:TT_Rich
LANG: CPP
AUTHOR: KersaWC
SCHOOL: REPS
*/
#include<bits/stdc++.h>
using namespace std;
int a[1000100],r[1000100],l[1000100];
int main(){
int n,i,ui,uj,mi,ma=0,ans=0,ii,ei,ej,maa;
scanf("%d %d",&n,&a[1]);
mi=a[1];ii=1;
for(i=2;i<=n;i++){
scanf("%d",&a... |
975212112b873bca846513f4d878af31c21ae58c | 02c4bab320f4145476bd1d5cee56bc02a45d1c21 | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | /content/child/worker_task_runner.cc | C++ | cc | 3,069 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/child/worker_task_runner.h"
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/... |
bb176f28691b1f6a6fe87170e06aab8002e48e66 | ccc96c7c8819380a2f43c6755ba4a04fec429c82 | Beisenbek/PP12017 | /Midterm/solutions/midterm2017_91/H/001263-midterm2017_91-H.cpp | C++ | cpp | 236 | no_license | #include <iostream>
using namespace std;
int main () {
int n ;
cin>> n;
int a [n];
for (int i=0; i<n; ++i){
cin>> a[i];
}
for (int i=0; i<n; i=i+2){
cout << a[i];
}
return 0;
}
|
5cc14910b4961617abf3c7dc37a21b7459b1fe63 | c208863b38c9d0ea4c7662aef31b00052282cbb3 | 34234344543255455465/aws-sdk-cpp | /aws-cpp-sdk-glue/source/model/GrokClassifier.cpp | C++ | cpp | 3,385 | 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... |
f61bedb7a808893c6275f8e6d35181a049f89b76 | 30c06962b3e28ad1059fa6b4d6ec64bb4fb6ae70 | LucaMac1/matplotlib-cpp | /src/eigen.cpp | C++ | cpp | 1,058 | permissive | #define _USE_MATH_DEFINES
#include "matplotlibcpp.h"
#include <Eigen/Dense>
#include <cmath>
#include <iostream>
namespace plt = matplotlibcpp;
int main() {
// Prepare data.
int n = 5000;
Eigen::VectorXd x(n), y(n), z(n), w = 2 * Eigen::VectorXd::Ones(n);
for (int i = 0; i < n; ++i) {
x(i) = i * i;
y(... |
bd93e3c55b173cc58df5fb2979e6189be892becb | b87808bb7c110f7453d1a14b825ec750efd3f9f3 | veloxid/RD42 | /diamond_analysis/include/RZEvent2006.struct.hh | C++ | hh | 3,227 | no_license | //*********************Diamond and Silicon Detectors Structure Header*****************//
#include <string>
//***Variables and Constants***//
const int DIAMOND_MEM2006 = 526; //263 appears to be the necessary number of 4-byte words that should be
//allotted for the diamond data so that the l... |
b068215987a82f01b84dc495cbbc2e0237374929 | 7f8f49246a17bb6f73fae766f010e227da1c59fa | chenhaohaochenlulu/iwant | /src/math/scalbln.cpp | C++ | cpp | 384 | no_license | #include "scalbln.h"
int Cscalbln::my_init(void *p)
{
this->name = "Cscalbln";
this->alias = "scalbln";
return 0;
}
Cscalbln::Cscalbln()
{
this->my_init();
}
Cscalbln::~Cscalbln()
{
}
#ifndef SCALBLN_TEST
#define SCALBLN_TEST 0//1
#endif
#if SCALBLN_TEST
#include "../all_h_include.h"
int main(int argc, char *a... |
8488c5a3bf94306e845755ea8d1148650a777609 | 12110ff7a6e158b7bffbc809ca7170b5082aba8e | RuixiongHu/Albany | /src/TDM/evaluators/rho_Cp_Def.hpp | C++ | hpp | 3,439 | permissive | //*****************************************************************//
// Albany 3.0: Copyright 2016 Sandia Corporation //
// This Software is released under the BSD license detailed //
// in the file "license.txt" in the top-level Albany directory //
//**************************************... |
f107f300171b7ce4ae2d4598fca86f72fb5665e0 | 174e2684272bdcd3866fce4f85ca8d85e39238be | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14233/function14233_schedule_10/function14233_schedule_10_wrapper.cpp | C++ | cpp | 939 | no_license | #include "Halide.h"
#include "function14233_schedule_10_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){
Halide::Buffer<int32_t> buf00(64, 128, 64, 128);
Halide::Buffer<int32_t> bu... |
c3b9af0bd68944d9e773df9d443aa3cdca7eb049 | 24ebd11be9be07d428431de6a2dd204e645188e0 | emilydolson/gptp_hackathon_2019 | /source/native/gptp_hackathon_2019.cc | C++ | cc | 7,655 | permissive | // This file is part of gptp_hackathon_2019
// Copyright (C) Emily Dolson, 2019.
// Released under MIT license; see LICENSE
#include <iostream>
#include "base/vector.h"
#include "config/command_line.h"
#include "config/ArgManager.h"
// This is the main function for the NATIVE version of gptp_hackathon_2019.
#incl... |
74d46b63e3827e322fa16e2efeb4b5bf6ff85851 | ba3f51a62292524d5b36dd62432cd3fe6a383045 | badboy3000/jpeg-turbo | /jni/jpeg/JpgEncoder.cpp | C++ | cpp | 1,427 | no_license | typedef unsigned int uint32_t;
#include "JpgEncoder.hpp"
#include<android/bitmap.h>
JpgEncoder::JpgEncoder(unsigned int prePadding, unsigned int postPadding)
: mTjHandle(tjInitCompress()),
mSubsampling(TJSAMP_420),
mEncodedData(NULL),
mPrePadding(prePadding),
mPostPadding(postPadding),
... |
0c7723e500450f195056decc59bfec0bae9b5cc9 | 4b6d5f1c20eb6ef7d42f4d75037bc0bbe24ba130 | adam-yang/DirectXShaderCompiler | /tools/clang/unittests/HLSL/OptionsTest.cpp | C++ | cpp | 14,488 | permissive | ///////////////////////////////////////////////////////////////////////////////
// //
// OptionsTest.cpp //
// Copyright (C) Microsoft Corporation. All rights reserved. //
... |
5a6d6525b3bbce8db8c9f81d2e443b78646c18b0 | 04b474b062c78224236f35b252043f114c5642df | Y2JB/Bittorrent | /Library/Network/Mail/LocalMailBox.cpp | C++ | cpp | 2,326 | no_license | // Jon Bellamy 13-08-2007
// Deals with storing mails on the local hard disk
#include "stdafx.h"
#include "LocalMailBox.h"
#include <assert.h>
#include "MiscLib.h"
#include "Global.h"
namespace net {
cLocalMailBox::cLocalMailBox(const char* userName)
: mUserName(userName)
{
Refresh();
}... |
0298c98b600668011286095c0f688190349050a7 | 76eeded31fcbfaf3388a1f98a7559a0d44dbcb86 | lanzhongwen/seastar | /include/seastar/core/future.hh | C++ | hh | 63,143 | permissive | /*
* This file is open source software, licensed to you under the terms
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. You may not use this file except in compliance with the License.
*
* You may ... |
d39f22dfeb2c67f1273a537e4f62ed1b6866bdd8 | a39ca5ebce222db1ad16ff9f291a7bb22e898c2f | ebulentzsx/PrivateBuStion | /readcomthread.cpp | C++ | cpp | 1,052 | no_license | #include "readcomthread.h"
#include <QDebug>
#include <QtCore>
readComThread::readComThread(QObject *parent) :
QThread(parent)
//readComThread::readComThread()
{
stopRead=false;
}
void readComThread::run()
//keep redding
//exit conditions: flagstop=true or COM is closed
{
// qDebug()<<"running";
qDebu... |
3aa813d7e69550536845f293a288085ed7887337 | 63c158240633c88bf78d510c98532bd3103322d0 | fangchen0257/VideoEditor | /Source/src/EUFilterTrack.cpp | C++ | cpp | 8,247 | no_license | #include "EUFilterTrack.h"
#include "EUTractor.h"
CEUFilterTrack::CEUFilterTrack(CEUTractor& tractor, FilterPriority priority)
: m_tractor(tractor)
, m_producer(tractor.producer())
, m_priority(priority)
{
}
CEUFilterTrack::~CEUFilterTrack ()
{
}
shared_ptr<Mlt::Filter> CEUFilterTrack::filter(int filter... |
3cb9f6cd25fc7ee21af7e16c3df9a3ff92187622 | 05bcf910ef888f27627afa518f2661b6332ee42e | cleanrock/CircuitAI | /src/circuit/task/builder/BigGunTask.cpp | C++ | cpp | 570 | no_license | /*
* BigGunTask.cpp
*
* Created on: Jan 31, 2015
* Author: rlcevg
*/
#include "task/builder/BigGunTask.h"
#include "util/utils.h"
namespace circuit {
using namespace springai;
CBBigGunTask::CBBigGunTask(ITaskManager* mgr, Priority priority,
CCircuitDef* buildDef, const AIFloat3& position,
... |
3c9168cb2e8c0dab3125b428d3bf4a7471a0eea2 | 04bfef5347016522bdc953014a18613095b96eeb | metashell/headers | /headers/boost/1.29.0/boost/graph/graph_test.hpp | C++ | hpp | 13,559 | no_license | #ifndef BOOST_GRAPH_TEST_HPP
#define BOOST_GRAPH_TEST_HPP
#include <vector>
#include <boost/test/test_tools.hpp>
#include <boost/graph/filtered_graph.hpp>
#include <boost/graph/iteration_macros.hpp>
#include <boost/graph/isomorphism.hpp>
#include <boost/graph/copy.hpp>
#include <boost/graph/graph_utility.hpp> // for c... |
4c04056371423615866a3f38674126b76ee2b6cb | 2320ef403e55963f02ef9ba7977239c940d071b6 | nmurray6/MathGame | /source/SpriteManager.cpp | C++ | cpp | 1,136 | no_license | #include "SpriteManager.h"
SpriteManager::SpriteManager(){}
SpriteManager::~SpriteManager() {
DeleteAllSprites();
}
void SpriteManager::Render() {
SpriteNode* itr = head;
while (itr != NULL) {
if(itr->sprite != NULL)
itr->sprite->Render();
if (itr->label != NULL)
itr->label->Render();
itr = itr->next;... |
474e83b3e7e2ff45c89e5e5e07e69be52a15900b | b2ee3c6d463ae45d3eec2314ec00d62b99546c6e | zenoalbisser/chromium | /chromeos/dbus/fake_system_clock_client.cc | C++ | cc | 779 | permissive | // Copyright (c) 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 "chromeos/dbus/fake_system_clock_client.h"
namespace chromeos {
FakeSystemClockClient::FakeSystemClockClient() {
}
FakeSystemClockClient::... |
079b5cd6241dee934c754c7684e434e2a2875b64 | de00327c3b78c4fdda718ed8fe596469f64abd44 | saurav1011/Practise_questions.CPP | /sum usin fn.cpp | C++ | cpp | 228 | no_license | //sum usinf function
#include <iostream>
using namespace std;
float sum(int a, int b)
{
return (a+b);
}
int main()
{
int a,b;
cout<<"enter 2 numbers"<<endl;
cin>>a>>b;
cout<<"The sum is "<<sum(a,b)<<endl;
}
|
11d2f4edf12e7a54bbf39467af60fe7989ccea55 | c879fcb755cf03330caed912fff195ee1be1297d | wyzyr/apka | /TestApp1.cpp | C++ | cpp | 573 | no_license | #include <iostream>
#include "C:/Users/heroe/Documents/ProjektKompetencyjny/opnCV/opencv2/opencv.hpp"
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
cout << "Hello World" << endl;
if (argc != 2)
{
printf("usage: DisplayImage.out <Image_Path>\n");
return -1;
}
Mat... |
c9f7f7a1aa0b1c20cf18793edfe1c14ed1fdc31a | 667c21d43840ee996d2bbc14909bfc02477dc6e5 | namtrungit/BigO | /blue/lecture_16/lesson_3/lesson_3.cpp | C++ | cpp | 1,185 | no_license | #include<bits/stdc++.h>
using namespace std;
const int MAX = 105;
int parent[MAX], ranks[MAX];
set<int> trees[MAX];
int findSet(int u) {
while(u != parent[u])
u = parent[u];
return u;
}
void unionSet(int u, int v) {
int up = findSet(u);
int vp = findSet(v);
if( up == vp ) {
return;
}
if(ranks[up... |
762e49a95863a34cb419f68721815879aae3cef1 | 5fb8687c0491f1099b7417875440407a6c0889f0 | jinmi80/ANDROID_MOSES_PORTING | /hello-jni/hello-jni/jni/boost/include/boost/test/utils/trivial_singleton.hpp | C++ | hpp | 2,397 | no_license | // (C) Copyright Gennadiy Rozental 2005-2008.
// 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)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
bfda2a529c6cab8017cd13562c5857f2b6b4bb08 | 03c933bc84f00d2b6ceb0d4df7180bb17563f873 | baiyang1827/test1 | /factory_workstation/factory_workstation/mes_zhuoyi_dll.cpp | C++ | cpp | 1,929 | no_license | #include "stdafx.h"
#include "mes_zhuoyi_dll.h"
int mes_zhuoyi_dll::Check_Station(CString sn)
{
#if MES_ZHUOYI_DLL
char mes_ret[1024] = {0};
int ret = 0;
MES_Init(mes_ret);
MES_LogReset();
if( !MES_CheckSerialNum(sn, mes_ret)){
ret = -1;
}
MES_Free(mes_ret);
return ret;
#endif
return -1;
}
CString mes_zhuo... |
c61b7df9af9bb4eb67fe55f8dfa881d3422a3fdf | 534dacc7c3a8e1cdbd4a3fbc475607085d08b7d1 | quildtide/ucx | /test/gtest/ucp/test_ucp_am.cc | C++ | cc | 36,085 | permissive | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2020. ALL RIGHTS RESERVED.
* Copyright (c) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
* Copyright (C) Los Alamos National Security, LLC. 2018. ALL RIGHTS RESERVED.
*
*/
#include <list>
#include <numeric>
#include <set>
#include <vector>
#include <math.h>
#inc... |
8fc1acd922735f1ca400a1839e9036a62501da29 | 1cab0b7abbcde4c6c0b8ef038673b5441db8207e | CyberSys/StarGateEmu-Projekt | /src/server/scripts/Kalimdor/LostCityOfTheTolvir/boss_high_prophet_barim.cpp | C++ | cpp | 8,869 | no_license | /*
* Copyright (C) 2010-2011 Project StarGate
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program... |
5fba8c70c13a0ad03c79a8d1ca4a3060eec9d8a2 | 4106e5c752f6e5b6acf5c7027b90ac1afe02c3de | Deepakku28/Leetcode | /297. Serialize and Deserialize Binary Tree.cpp | C++ | cpp | 1,031 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Codec {
public:
// Encodes a tree to a single string.
string serialize(TreeNode* root) {
if(root==NUL... |
1abe9a4ccd7cea3344d6f9b8bc70de5c72758dd0 | d0dd1aba926d3f40d65bcaeccabfd4afa7c8ec1c | HKarpenko/Cpp | /list7-szab/bst.hpp | C++ | hpp | 4,907 | no_license | #ifndef CLASS_BST
#define CLASS_BST
#include "treit.hpp"
namespace struktury{
template <class T, typename traits = first_type_traits<T> >
class Bst{
private:
class Node{
T elem;
Node *lt,*rt;
public:
friend void delete_all(Node *wezel);
frien... |
0b539a262211ae75e1367ebbf8f061f45cbcbb57 | 442d30be1935658265ea5279f2da96aea9145af0 | williamchoi7090/lab2-C- | /main.cpp | C++ | cpp | 2,065 | no_license | #include <iostream>
class Main{
public:
virtual void speak()= 0;
virtual void eat()= 0;
virtual void sleep()= 0;
virtual void mate(Mammal *x)= 0;
};
class Feline: public Main{
public:
void Feline::speak(){
cout<<"Meow";
}
void Feline::eat(){
cout<<"Felines are carnivores.";
}
void Feline... |
2bd85aa52bdb258125f5c1841a23be2f11249aec | f31dc036160875100cf11a9cca50ea7a6e7e74c8 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/3.2W+dmb.ld+po+po.c.cbmc_out.cpp | C++ | cpp | 33,577 | no_license | // 0:vars:3
// 3:thr0:1
// 4:thr1:1
// 5:thr2:1
#define ADDRSIZE 6
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) {
char ret = __get_rng();
ASSUME... |
0087eb1bf10bdcdb6a0b60d86ee5481e550a9cb8 | b6ed15b0a260bb9a56f7421153a68d99fc8cd497 | sunAtBit/Data_Struct | /4二叉树/4.29随机二叉树.cpp | C++ | cpp | 1,236 | no_license | //We assume the existence of a function RandInt(Lower,Upper),which generates a uniform random integer in the appropriate closed interval.
//MakeRandomTree returns NULL if N isnot positive,or if N is so large that memory is exhausted.
//我们假设一个函数randint存在(下、上),这在相应的闭区间上均匀分布的随机数产生。makerandomtree返回null如果N<0,或如果n过大,内存耗尽
/... |
6805fe50be761602b045ac9135a62d3dd667598f | 0c4f8a24c43be9b98ec7eb7385668d72b87cc1e6 | CL4P7R4P-97/DataStructures-Algorithm | /Queues/arrayCircularQueue.cpp | C++ | cpp | 1,081 | no_license | //Circular linked list
#include<bits/stdc++.h>
using namespace std;
struct Queue
{
int size;
int front;
int rear;
int *arr;
};
void create( struct Queue &q, int si )
{
q.front = 0;
q.size = si;
q.rear = 0;
q.arr = new int[si+1];
}
void enqueue(struct Queue &q, int val)
{
cout<<"Inserting.. "<<val<<"\... |
762f1ff5cb87f0536e170a4d3aba1709773df9f6 | 9e115d9e9cba9a24ce09f58649fcc19e74a96d5d | aharthcock/phantomjs | /src/qt/qtwebkit/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp | C++ | cpp | 2,217 | permissive | /*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
* Copyright (C) 2009 Jan Michael Alonzo
* Copyright (C) 2013 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* ... |
c299f098f5171e2c314d61064491fe0533ec517c | 5c298da522dd64fe15d98dc9cb52370f316218fe | Tencent/ncnn | /src/layer/riscv/packing_riscv.cpp | C++ | cpp | 61,124 | permissive | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
651b0030ddda3a42c0924fe09c04dd5c4fa221b5 | 5feb434dda9a66d861eae0eff3df825bdfdf8143 | Earthcomputer/libseedfinding | /test_cpp/test.cpp | C++ | cpp | 1,060 | permissive | // Copyright (c) The Minecraft Seed Finding Team
//
// MIT License
#include "../include/lcg.h"
#include "../include/version.h"
#include <iostream>
#define ASSERT(expr) if (!(expr)) std::cerr << "Assertion failed: " #expr " at line " __FILE__ ":" << __LINE__ << std::endl;
#define Abs(x) ((x) < 0 ? -(x) : (x))
#defi... |
cec870428fc6a8919222120a9201e8c141ddb905 | fcd7cabd9b6fea95a36952f41b4faeb08dec9c1a | aprz512/c-primer-execises | /exercises_5.3.2/exe_5_12.cpp | C++ | cpp | 1,473 | no_license | #include <iostream>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
int main()
{
int aCnt, eCnt, iCnt, oCnt, uCnt, spaceCnt, tabCnt, enterCnt;
int ffCnt, flCnt, fiCnt;
aCnt = eCnt = iCnt = oCnt = uCnt = spaceCnt = tabCnt = enterCnt = 0;
ffCnt = flCnt = fiCnt = 0;
char ... |
5f9417b3944871fac4477210c571c910998a867f | d2c173b31e793b93259c7f35bd4fce23c6ef4a78 | SiteView/ecc82Server | /Server/kennel/monitor/monitor/monitor/monitor/Utils.cpp | C++ | cpp | 34,516 | permissive |
#include "Utils.h"
#include "Base64.h"
#include "math.h"
#include <iostream>
using namespace std;
#include "base\funcGeneral.h"
HINSTANCE g_hInstance = NULL;
HINSTANCE g_hInstance2 = NULL;
#ifdef WIN32
#pragma warning (disable : 4267)
#endif
int WriteLog(const char* str);
bool WriteLog(CString strFileName,const ... |
8a17623ad9ad02fce28bfdd274c703610320518c | 34b70fdbd5adbc84909ed1645705f645906eb374 | rfernandes/nutshell | /core/Command.cpp | C++ | cpp | 1,108 | no_license | #include "Command.h"
#include <algorithm>
#include <type_traits>
#include <string_view>
using namespace std;
CommandStore& CommandStore::instance() {
static CommandStore instance;
return instance;
}
Segment::Segment(Segment::Type type,
std::string::const_iterator begin,
std::s... |
530ac083a35729aac0cf35985c591c31cb46eed6 | fa3021533b63fbfdf50f86539bccb4cae890a052 | wildmichael/ParaView3-enhancements-old | /VTK/TextAnalysis/vtkFrequencyMatrixWeighting.cxx | C++ | cxx | 5,365 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkFrequencyMatrixWeighting.cxx,v $
-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC... |
2c9b71c6673fa60b724eb02095451a2e582a675b | 48a4d3c286f5e12ec9c5dc0ea02bbede83e67e46 | Edlward/public | /Super/src/Super/DataStruct/List.cpp | C++ | cpp | 2,536 | no_license | #include "List.h"
#include <iostream>
using namespace std;
#ifdef UNIT_TEST
int Test_List()
{
#if 1
SeqList<int> test(15);
int array[15]={2,5,8,1,9,9,7,6,4,3,2,9,7,7,9};
for(int i=0;i<15;i++){
test.Insert(array[i],0);
}
test.Insert(1,0);
cout<<(test.Find(0)?"can't be found ":"... |
e063ca1139ff4766d741b297b8a3b2e3d20ae753 | 09d7d4033f53261d8422b6cccc201dd8b2dc2fbe | Ashod/webkit | /Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp | C++ | cpp | 37,184 | no_license | /*
* Copyright (C) 2011 ProFUSION Embedded Systems
* Copyright (C) 2011 Samsung Electronics
* Copyright (C) 2012 Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of sourc... |
907539b0bbd9866b22f326aba55cfd940d8b39cc | 841a33ccadc5bf057cd7ccf920ac5a2f2fa80829 | withu2018/infinitecoin | /src/qt/guiutil.cpp | C++ | cpp | 13,807 | permissive | #include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QTextDocument> // For Qt::escape
#inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.