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 |
|---|---|---|---|---|---|---|---|---|
f6e099d7d9d76356bf21d6fa4508bf6528d29ebc | 60543d9612f562ca075c386734affe7631c768b9 | Ard2148810/skia | /bench/nanobench.cpp | C++ | cpp | 57,423 | permissive | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <ctype.h>
#include "bench/nanobench.h"
#include "bench/AndroidCodecBench.h"
#include "bench/Benchmark.h"
#include "bench/CodecBench.h"
#include "bench/CodecBenchPri... |
30db05ed27ecf6d2e1af493a630ff3c4adf0e0bd | dbdf840eef448dcd584afea9b7be20d6a5a7c666 | ccdxc/logSurvey | /data/crawl/squid/hunk_6917.cpp | C++ | cpp | 1,977 | no_license | inet_ntoa(from.sin_addr),
ntohs(from.sin_port));
}
+
+void
+icpConnectionsOpen(void)
+{
+ u_short port;
+ struct in_addr addr;
+ struct sockaddr_in xaddr;
+ int x;
+ int len;
+ wordlist *s;
+ if (Config2.Accel.on && !Config.onoff.accel_with_proxy)
+ return;
+ if ((port = Config.Port... |
7c6ae08207b1cdc5932c249078be15ed8ff72b95 | 5fcf1d2f9a3edb77db6d2d3790de42bed55dbf30 | AnryYang/cpp_algorithms | /sort/insertion_sort.cpp | C++ | cpp | 1,219 | no_license | /*************************************************************************
> File Name: insertion_sort.cpp
> Author: anryyang
> Mail: anryyang@gmail.com
> Created Time: Thu 29 Sep 2016 10:00:02 AM SGT
************************************************************************/
#include<iostream>
#includ... |
cc3075129d991f346d7115ef5a2db635ddc6410a | b5962937cb50b746391a2219f4af0c0425e49dd8 | dummas2008/chromium | /src/components/gcm_driver/crypto/gcm_key_store_unittest.cc | C++ | cc | 9,191 | 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/gcm_driver/crypto/gcm_key_store.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/files/scoped_temp_dir.h"
#in... |
af85a2dab8eea10623be7b575a9b2c4d174b9258 | 985446b3a5cb22d60fdf22b5f762c364bfaba8e4 | arvin505/bspatch | /app/src/main/cpp/native-lib.cpp | C++ | cpp | 265 | no_license | #include <jni.h>
#include <string>
extern "C"
JNIEXPORT jstring
JNICALL
Java_com_arvin_bspatch_MainActivity_stringFromJNI(
JNIEnv *env,
jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
|
e4c1d8d676507630df2e3b7daa9fc20c58cc081d | 8b7052abe0a2385ba95bd834b4f07b1b5e715b17 | html5cat/PhysX-3.4 | /PhysX_3.4/Source/GeomUtils/src/hf/GuSweepsHF.cpp | C++ | cpp | 20,826 | no_license | //
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in bin... |
d106a8687a8d7371f27d34ac2446ad5d90cda113 | 0e8808e4d903834ec9bda52491104d800cc01232 | opendistro-unlocked-for-elasticsearch/sql | /sql-odbc/src/IntegrationTests/ITODBCInfo/test_odbc_info.cpp | C++ | cpp | 14,356 | permissive | /*
* Copyright <2019> 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://www.apache.org/licenses/LICENSE-2.0
*
* or i... |
68685d3a4ead2be5efcde21caf6205cbc138b4f6 | 1cd6afb44904c4e2fb60ffe34e628b1c694147df | dukiedrew/WebKit | /Source/WebKit/chromium/src/LinkHighlight.cpp | C++ | cpp | 10,261 | permissive | /*
* Copyright (C) 2012 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 condit... |
bd3bb1fff8a9b6912de954ec586f39b5f16d1f91 | b576b82bc76f08fb90a988087308f53c10605f89 | callaway12/algoritm101 | /1001.cpp | C++ | cpp | 266 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
int main(void){
int a, b;
cin >> a >> b;
printf("%d \n", a + b);
printf("%d \n" ,a - b);
printf("%d \n", a * b);
printf("%d \n", a / b);
printf("%d \n", a % b);
return 0;
}
|
8078735a00c523c0a6a937ef9e867247d8939f75 | 99f387183afa6ad836aed9e08a331d0e36019eac | TimSC/libpqxx | /include/pqxx/connection_base.hxx | C++ | hxx | 36,151 | permissive | /** Definition of the pqxx::connection_base abstract base class.
*
* pqxx::connection_base encapsulates a frontend to backend connection
*
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead.
*
* Copyright (c) 2001-2017, Jeroen T. Vermeulen.
*
* See COPYING for copyright license. If you d... |
0c81064ad06ce1853ac3eb713ad6f996fae4d377 | c227064a83d266a93375cd17fb0cc3f0513cbcd5 | Zifeng-ZZF/cAlgorithm | /LinkedList/myLinkedList.cpp | C++ | cpp | 2,425 | no_license | // #include <iostream>
// using namespace std;
// // // A linked list node
// // struct Node
// // {
// // int data;
// // struct Node *next;
// // };
// struct Node
// {
// int data;
// struct Node *next;
// };
// void displayList(struct Node *node)
// {
// while (node != NULL)
// {
// ... |
5f147f8329b5e312c8acbdbfab934ecc6676de6b | 293eebb7d12f53bd505cface8bc83fc223788947 | AdamLenda/tome2 | /src/q_thief.cc | C++ | cc | 5,064 | no_license | #include "q_thief.hpp"
#include "cave.hpp"
#include "cave_type.hpp"
#include "dungeon_flag.hpp"
#include "game.hpp"
#include "hook_quest_finish_in.hpp"
#include "hooks.hpp"
#include "init1.hpp"
#include "monster2.hpp"
#include "monster_type.hpp"
#include "object1.hpp"
#include "object2.hpp"
#include "object_type.hpp"
... |
fcf93240ac8de93785c3e5cb2e1598ea8e2f0936 | 48ae90b40b5725b1a9f5de2366b945e378cd881d | iborko/fmindex | /src/test.cpp | C++ | cpp | 481 | permissive | // Copyright 2015 iborko
// Distributed under MIT license
// See file LICENSE for detail or copy at
// https://raw.githubusercontent.com/iborko/fmindex/master/LICENSE
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
// include all test files
#include "../include/test/T... |
298e492a09eda7a7389cf3962423fe7013cfdc7e | 53c1a15b190a6d088f52f0ce4a869f995fd8c8fc | novakale/openvino | /src/core/src/op/experimental_detectron_detection_output.cpp | C++ | cpp | 3,444 | permissive | // Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "ngraph/op/experimental_detectron_detection_output.hpp"
#include <experimental_detectron_detection_output_shape_inference.hpp>
#include <memory>
#include "itt.hpp"
#include "ngraph/attribute_visitor.hpp"
#include "ngraph/... |
9edccf20c6de6f6617f0d9c3c1631e2e92f4a1c7 | 737852e868e72abe7a1672bd5e8d0fabeefc804f | Kyslik/biometrics-02 | /biometrics-02/lib/BayesNaiveClassifier.cpp | C++ | cpp | 1,430 | permissive | //
// BayesNaiveClassifier.cpp
// biometrics-02
//
// Created by Martin Kiesel on 19/03/16.
// Copyright © 2016 Martin Kiesel. All rights reserved.
//
#include "BayesNaiveClassifier.hpp"
ReturnStat BayesNaiveClassifier::classify()
{
ReturnStat return_stat;
map<char, double> classifier;
using clasifier... |
9dd335059527d294ea4d27fb98bf40fa9380e437 | 96ebb9eadadd85aa1506f1e71b5f072c1a14c54e | adityamatt/cryptopal-solutions | /Set1/6.break_repeating.cpp | C++ | cpp | 5,699 | no_license | #include <bits/stdc++.h>
using namespace std;
int convert(char c)
{
if (c>='0' && c<='9') return c-'0';
if (c>='a' && c<='z') return c-'a'+10;
if (c>='A' && c<='Z') return c-'A'+10;
}
char convert(int i)
{
if (i<=9 && i>=0) return i+'0';
return i+'a'-10;
}
int do_xor(char c1,char c2)
{
return (... |
c910072456f58c7048c3e9d620eca7195eff29b6 | 61d2e6c8c63e636cd9a9a4aab8663e114ceb3d6c | itoru257/FontDraw | /FontDraw/TextureData.cpp | C++ | cpp | 3,949 | no_license | /*************************************************
* Copyright (c) 2017 Toru Ito
* Released under the MIT license
* http://opensource.org/licenses/mit-license.php
*************************************************/
#include "TextureData.hpp"
TextureData::TextureData()
:m_VertexArrayObject(0)
,m_VertexBufferObject(... |
f7056859dfe6c01bd17f63df7ae840338181e5fe | 714ffc0a505b9bb0435f8aee9af47517b01d16c6 | Kneelawk/HelloFractals | /src/program/variable.cpp | C++ | cpp | 1,880 | permissive | /*
* Copyright (c) 2018 Jedidiah Pommert <email>
*
* 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... |
a0f08bf084d605ba94c56c9845724e98668ea5c3 | de8ddfe160699edefa77c319a4cf0c7fa7c9746d | hobby10/problems-solution | /codeforces/contest/378/c/53030621.cpp | C++ | cpp | 1,541 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define all(v) ((v).begin()),((v).end())
#define clr(a,b) memset(a,b,sizeof(a))
void debug() {
#ifndef ONLINE_JUDGE
freopen("input.in", "rt", stdin);
// freopen("output.txt", "wt", stdout);
#endif
cout << fixed <<... |
bf30bab90b440af4cbee3285d26293f48a2ae7c1 | ace87783a0bac4caed536cf031b84fd681a099e4 | laekov/akg | /src/pass/auto_pragma.cc | C++ | cc | 10,194 | permissive | /**
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
f7f49d93123908a8f3311155f1c3795d84dcbd5b | 25556ee948af64dd4eeac5ec8cb6af57585ab258 | crosslore/moos-ivp-aro | /releases/moos-ivp-4.1/ivp/src/lib_geometry/LinearExtrapolator.cpp | C++ | cpp | 3,509 | no_license | /*****************************************************************/
/* NAME: Michael Benjamin and John Leonard */
/* ORGN: NAVSEA Newport RI and MIT Cambridge MA */
/* FILE: LinearExtrapolator.cpp */
/* DATE: May 2nd, 2007 ... |
f29d6fbebc88452d3016d8b8cfebbea168118ba4 | a26f8e5d6c5e0c2f7756156a9b949a3e3ab920e2 | EventideX/PAT | /PAT Advanced Level Practise/1004/Counting Leaves.cpp | C++ | cpp | 458 | no_license | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
int i,j,k,n,m,s,t,a[101]={0},b[101]={0},c[102]={0};
cin>>n>>m;
for (i=0;i<m;i++)
{
cin>>s>>t;
b[s]=1;
for (j=0;j<t;j++)
{
cin>>k;
a[k]=s;
}
}
s=0;
for (i=1;i<=n;i++)
if (b[i]==0)
{
t=a[i];
... |
c173a9c94a071c20d2dc7ecd41365a37210dc994 | 75fe98ccec2c09d601f6138081d4fe32912e8fda | imGretaas/Antlr4 | /translate.cpp | C++ | cpp | 1,232 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include "antlr4-runtime.h"
#include "tinyrexxLexer.h"
#include "tinyrexxParser.h"
#include "MyListener.h"
using namespace std;
using namespace antlr4;
int main(int argc, char* argv[]) {
if(argc != 2) {
cout << "Usage: translate filename.rexx" << en... |
35549e0b9f84c2dc363cda5480e390d4e16598c8 | bb88a679801241d4fae2fc691d3e5cfa7798048c | zengxiaosen/DataSecurityPlatformProyotypeSystem | /Test/stl/d3/distanceAg.cpp | C++ | cpp | 1,021 | no_license | #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
//distance
void test01(){
vector<int> v;
for(int i=10; i< 20; i++){
v.push_back(i);
}
for(vector<int>::iterator it = v.begin(); it != v.end(); it++){
int index = distance(v.begin(), it);
... |
33a6ef0f721947eda4325c594e6cdaff6fb7a9ae | aa32f2cc94bea8bd2d083fb24e367900592b92e5 | LasDesu/gens-gs-ii | /src/libgens/IO/IoMasterTap.hpp | C++ | hpp | 3,274 | no_license | /***************************************************************************
* libgens: Gens Emulation Library. *
* IoMasterTap.hpp: Sega Master System custom multitap adapter. *
* *
* Copyright... |
8b4495855bfc3d4027b8a5a3c46f288924e04c60 | 359b4d6fabc85c614339cc2616a368589f6d4e18 | Michnic120/Cpp_projects | /Simple_matrix_calculator/Simple_matrix_calculator.cpp | C++ | cpp | 4,259 | no_license | #include<iostream>
#include<windows.h>
#include<conio.h>
using namespace std;
class Matrix
{
public:
int rows, cols;
double** mat;
Matrix(int s1 =1, int s2=1)
: rows(s1), cols(s2)
{
mat = new double*[rows];
for(int i=0;i<rows;i++)
mat[i] = new double[cols];
c... |
703e905045cb18ccf740aceb85788623200b28db | e47d3203007980ecbab920a0cc3f683555096679 | felipesdias/Extractor-URI-Online-Judge | /URI-ES/PARADIGMAS/1029 - Fibonacci, ¿Cuántas Llama....cpp | C++ | cpp | 715 | no_license | // Autor: Felipe Souza Dias <felipe.s.dias@outlook.com>
// Nome: Fibonacci, ¿Cuántas Llama...
// Nível: %d
// Categoria: PARADIGMAS
// URL: https://www.urionlinejudge.com.br/judge/es/problems/view/1029
#include <stdio.h>
int main () {
long long int fibo[40], chamadas[40];
int n, x, i;
fibo[0] = 0;
fibo[... |
93f0cd6672837c821636d372e2ee2cb494623cf5 | a37759ed73d2c01e662ba9af9f20fae1e602f3fb | pyaramada/fpv | /src/camera_factory.cpp | C++ | cpp | 3,804 | no_license | /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list ... |
a10c65db6af8b64f43e4b06acf92ea8dba488b63 | bf3eecc443d7d24aa5235cfc438ba8ed6d281f9c | KhronosGroup/VK-GL-CTS | /external/openglcts/modules/common/glcTestSubcase.cpp | C++ | cpp | 6,743 | permissive | /*-------------------------------------------------------------------------
* OpenGL Conformance Test Suite
* -----------------------------
*
* Copyright (c) 2014-2016 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with ... |
75a654c4c8e76b38a13dcf1e2f025732c6a64b51 | bcb570f8b0470f5f0ee287428532d4a695bfe39d | niuxu18/logTracker-old | /second/download/git/gumtree/git_repos_function_6085_last_repos.cpp | C++ | cpp | 485 | no_license | static int read_from_tree(const struct pathspec *pathspec,
struct object_id *tree_oid,
int intent_to_add)
{
struct diff_options opt;
memset(&opt, 0, sizeof(opt));
copy_pathspec(&opt.pathspec, pathspec);
opt.output_format = DIFF_FORMAT_CALLBACK;
opt.format_callback = update_index_from_diff;
opt.format_c... |
0fc8b0e9333566d09b2287162a42b17e338dbb6b | 1d826dbe22da06bcb1fe654277516d37761553ee | otcshare/chromium-src | /tools/traffic_annotation/auditor/traffic_annotation_exporter.cc | C++ | cc | 16,984 | permissive | // Copyright 2017 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 "tools/traffic_annotation/auditor/traffic_annotation_exporter.h"
#include <ctime>
#include "base/files/file_util.h"
#include "base/logging.h"
#... |
7b700437202ffe6d783aee4d4f1d4836af6256a8 | 1e10e4fffa8e1470b02c41017872967487cb858e | cedarz/directx-sdk-legacy-samples | /Direct3D10/MeshFromOBJ10/MeshFromOBJ10.cpp | C++ | cpp | 24,470 | permissive | //--------------------------------------------------------------------------------------
// File: MeshFromOBJ10.cpp
//
// This sample shows how an ID3DXMesh object can be created from mesh data stored in an
// .obj file. It's convenient to use .x files when working with ID3DXMesh objects since
// D3DX can create and ... |
c6c496f6067b5084d73aae6d33fa8c1480f51d8d | 77307d7d4e20856edf0beb90b92698fa151b4c33 | yingjerkao/Cytnx | /src/linalg/linalg_internal_cpu/Exp_internal.hpp | C++ | hpp | 969 | permissive | #ifndef __Exp_internal_H__
#define __Exp_internal_H__
#include <assert.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include "Storage.hpp"
#include "Type.hpp"
namespace cytnx{
namespace linalg_internal{
/// note type can be 'd' or 'f', indicating the return is casting as double or float
... |
90caafecb825229b7ddc16a05aea2ab5574cb013 | 139c56a6d97f21abce66600ee0d621b910d48159 | fbaro/AudioXCFrameworks | /taglib/taglib-src/tests/test_aiff.cpp | C++ | cpp | 5,464 | permissive | /***************************************************************************
copyright : (C) 2009 by Lukas Lalinsky
email : lukas@oxygene.sk
***************************************************************************/
/*******************************************************************... |
5a04d88c1cfcccfa269971487057c42db89d1dff | 0c81510b35e7f01c65867c296e145abc718c75a8 | unhammer/mosesdecoder | /moses/Sentence.cpp | C++ | cpp | 11,832 | no_license | // $Id$
// vim:tabstop=2
/***********************************************************************
Moses - factored phrase-based language decoder
Copyright (C) 2006 University of Edinburgh
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License a... |
49524faf2977295c38bebe8d4de086cebf2d2efc | 1267ad1343ee961046e04edd76c5eeeefdcb4224 | JiangSir857/C-Plus-Plus-1 | /Object Oriented Programming(C++)/例题及训项目代码/chapter7/prog1.cpp | C++ | cpp | 13,510 | no_license | //图书借阅管理系统第二版
#include <iostream.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#include "fstream.h"
#include "ex0.h"
Book::Book()
{
strcpy(Title,"");
BarCode = 0;
// Next = NULL;
}
Book::Book(char *title,long code)
{
strcpy(Title,title);
BarCode = code;
// Next = NULL;
}
void Book::Show()
{
... |
b674cbf8807abaef1318c61288f82fa5770bff78 | 89b0f21e9fbb155ca797b14ccbd6d6ffea560d49 | iridium-browser/iridium-browser | /chromeos/components/cdm_factory_daemon/content_decryption_module_adapter.cc | C++ | cc | 19,660 | permissive | // Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/cdm_factory_daemon/content_decryption_module_adapter.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr... |
9383c8fde8bb1837560b5704587b80d807650842 | 001b88fc8fcb12060ac23d089c7f0ec9bfca7885 | Sovsekongen/RL | /Exercise1/gradientBandit.cpp | C++ | cpp | 3,469 | no_license | #include <iostream>
#include <stdlib.h>
#include <time.h>
#include <cmath>
using namespace std;
//#define seed time(NULL)
struct bandit1{
public:
int val;
bandit1(int value) : val(value){}
int operator()(){
return val;
}
};
struct bandit2{
public:
int lb;
... |
3fbde5de3dd8b81bc77d9356dc9496f2d36da387 | e1adae2d5cb40ba14d0f9233fa515a2aa8507e5c | tactop/AtCoder | /agc033/agc033-a.cpp | C++ | cpp | 1,706 | no_license | #include <iostream>
#include <queue>
#include <string>
#include <vector>
#define rep(i, x, n) for(int i = x; i < n; i++)
using namespace std;
const long long INF = 1LL << 60;
template <class T> inline bool chmin(T &a, T b) {
if(a > b) {
a = b;
return true;
}
return false;
}
template <class T... |
8c90450b6b89ac543e3b7a643227a05d662206a4 | 6dd28847187b32b35ef08ffcfde1ff23d399ef3c | cpswarm/swarm_functions | /collision_avoidance/src/collision_avoidance.cpp | C++ | cpp | 6,151 | permissive | #include "collision_avoidance.h"
/**
* @brief Callback function to receive the goal position of this CPS.
* @param msg Current goal position sent to the position controller.
*/
void sp_pos_cb (const geometry_msgs::PoseStamped::ConstPtr& msg)
{
ca.set_sp_pos(msg);
}
/**
* @brief Callback function to receive th... |
a0442c774585ea2a1cd964642862437cde2ae1c7 | cd858c73c32a6f75c98049b6c88f24354f95259f | wzyy2/chromium-browser | /ash/system/bluetooth/bluetooth_power_controller.cc | C++ | cc | 11,770 | permissive | // Copyright 2017 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/system/bluetooth/bluetooth_power_controller.h"
#include <memory>
#include "ash/public/cpp/ash_pref_names.h"
#include "ash/session/session_... |
e5bc61f8e69fe1f5e693044779e193bf19aa60ef | 1f81c0701572fa8d3ea9eab02418288cdd633853 | adeiorio/fit_Vtsd | /ttDM/stat/bin/datacards.cc | C++ | cc | 7,267 | no_license | #include <iostream>
#include <fstream>
#include <iomanip>
#include "common.h"
using namespace std;
void datacardHeader(bool syst, ofstream& datacard, unsigned int iMin, unsigned int iMax) {
datacard << "imax " << iMax - iMin << " number of channels (" << catName[iMin];
for(unsigned int i = iMin + 1; i < iMax; ++i... |
b4339fba4685b30ea4583ad32baf9e10ebe669cc | e5a08903a647900a9d442040749026dba0705894 | dhyanid13/Hack-CP-DSA | /Leetcode/Dungeon Game/solution.cpp | C++ | cpp | 4,365 | permissive | /*Solution for Dungeon Game:
this problem is similar to Minimum cost path probelm. We can not use Greedy approach to solve it. We can solve it either by recursion, Binary search or by dynamic programming approach.
let us go with the DP approach because it is optimal and through this problem, if you have any doubts abo... |
0ffb0c86c3a7b2d4971d9256d8b289e359dfb356 | 19e174846872b828f9f914d23cc981229368a0d1 | Underdog-113/3D_portfolio | /Client/Code/SickleBornPattern.cpp | C++ | cpp | 886 | no_license | #include "stdafx.h"
#include "SickleBornPattern.h"
#include "FSM_SickleC.h"
#include "FSMDefine_Sickle.h"
#include "MO_Sickle.h"
#include "StageControlTower.h"
#include "Valkyrie.h"
#include "DynamicMeshData.h"
#include "PatternMachineC.h"
CSickleBornPattern::CSickleBornPattern()
{
}
CSickleBornPattern::~CSickleBor... |
9ce44ad706589d42cf368b10a4141f7c6723d5ba | 87e6cd5469d4145be51ce17b22a3da8082147d2c | shubham-theway/ConEmu | /src/ConEmuDW/ConEmuDw.cpp | C++ | cpp | 62,442 | permissive |
/*
Copyright (c) 2009-2017 Maximus5
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the followin... |
2365f1329e09e47744e6ac647daa20f5aa3e4e3a | 8b9155a592ef18a61d16ab647d2c3e7e1c6194ca | sometester007/cpp-base | /task2/included/src/hw.hpp | C++ | hpp | 273 | no_license | #pragma once
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <sstream>
#include <cctype>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <fstream>
#include <random>
class HW
{
public:
virtual int service() = 0;
};
|
118b8c6e486e0ee3c97482827901bd7c61ef73ee | 7cba97ffbac9eb049dd629b80bbd8bf098958840 | 1the-Ji/Algorithm | /doc/트리에서의거리.cpp | C++ | cpp | 858 | no_license |
#include <stdio.h>
#include <vector>
using namespace std;
const int MAX = 1000;
int main(){
vector<int> arr[MAX];
int check[MAX] = {0,};
int distince = 0;
int n,findA,findB;
scanf("%d%d%d",&n,&findA,&findB);
check[0] = 1;
for(int i=0;i<n-1;i++){
int a,b;
scanf("%d%d",&a,&b... |
e9b859dc9fe1b5af3f8f23cf5e484fdb0b33335e | fb93089ba2d735bb2d9f585f3d817d3bf218c48c | JaredYeDH/raytra | /tests/test.cc | C++ | cc | 3,327 | no_license | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "../raytra.h"
#include "../triangle.h"
#include "../BVHTree.h"
using namespace Raytra;
TEST_CASE ("detect blank strings correctly") {
REQUIRE(!is_blank("asdad"));
REQUIRE(is_blank("\n"));
REQUIRE(is_blank("\t"));
REQUIRE(is_blank(" "));
}
TEST_... |
6a7f38efcf2c1a12fec1780019b3743d8351fe35 | d59fdc6bec990be81e48434d44c2e861059006f5 | bchretien/CMake | /Source/cmLocalVisualStudio10Generator.cxx | C++ | cxx | 3,592 | permissive | /*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This softwa... |
773b5f342c506d9d292c9e1bc808e848d38d2ba7 | 176599565516830887caf6b88f48d3bbbaeb79d8 | majthehero/iso | /OglRender1/OglRender1/src/Main.cpp | C++ | cpp | 1,660 | no_license | #include <iostream>
#include <GL\glew.h>
#include <GLFW/glfw3.h>
struct Vertex {
float x; // position
float y;
char p; // probability (alpha for dither)
char r; // red, green, blue
char g;
char b;
};
int main(void)
{
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())
return -1;
/* Cre... |
ed699e053be18c1646218dd1283e5c096c8c74b8 | 2a62d6768058ebd7987f6e069b1aad62bfe45260 | nxxm/gh | /gh/auth.hxx | C++ | hxx | 256 | permissive | #pragma once
#include <string>
namespace gh {
/**
* A structure to authenticate against github.
*/
struct auth {
//!
std::string user;
//! password or token (in case your account is setup to use 2FA.
std::string pass;
};
}
|
91ce17aee5dc8e6aaf927606c77834ed0cbbc7f1 | 0e8bf6add52da8c44eacfae4825cf648239f4271 | michelle19l/compiler | /lab5_2/src/field.cpp | C++ | cpp | 1,315 | no_license | #include "field.h"
//先遍历得到作用域表
//再增添符号表项添加
table* table::scoperoot = new table;//生成根,用于存储全局变量和静态变量(静态变量待实现)
table* table::keyword = new table;//存储关键字
table* table::scope = table::scoperoot;
//string table::lexms="";//存储id名
//int table::lexmspointer=0;
int checkID(string yytext,table*scope)//若当前作用域不能声明则返回0,否则... |
b273054c82abc4b04bbc0c1a72ea4ecd4ae2526d | c467c4bbebc835e8335e30aa1fc84960dbac2197 | gitter-badger/peloton | /src/catalog/catalog_util.cpp | C++ | cpp | 3,725 | permissive | //===----------------------------------------------------------------------===//
//
// Peloton
//
// catalog.cpp
//
// Identification: src/catalog/catalog_util.cpp
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===-----------------------------------------------------... |
fc6edc1b18744c0a4fbe9350644b6af7f153889f | d7f5c6dec44a96ce27aaf127f985ed335ed83c04 | RazvanRotaru/EGC | /Framework-EGC-master/Source/Laboratoare/Laborator3/Laborator3_Vis2D.cpp | C++ | cpp | 5,563 | no_license | #include "Laborator3_Vis2D.h"
#include <vector>
#include <iostream>
#include <Core/Engine.h>
#include "Transform2D.h"
#include "Object2D.h"
using namespace std;
Laborator3_Vis2D::Laborator3_Vis2D()
{
}
Laborator3_Vis2D::~Laborator3_Vis2D()
{
}
void Laborator3_Vis2D::Init()
{
auto camera = GetSceneCamera();
came... |
bcdad164b23ceda4f802f997cd2e2d458fc94799 | cd8962d5b7e294b233fc22fe3b4a143d11bd9afe | shilogilor90work/iter_c | /Test.cpp | C++ | cpp | 6,781 | permissive | #include "doctest.h"
#include <iostream>
#include <vector>
#include "range.hpp"
#include "accumulate.hpp"
#include "filterfalse.hpp"
#include "compress.hpp"
using namespace itertools;
using namespace std;
struct lessThan3 {
bool operator()(int i) const { return i < 3; }
};
struct moreThan10 {
bool operator(... |
cc23b5c8f1c0a6bfc4975c49ad1e6911435ef213 | 436743a8905fd75fdb6a1ac1134a041878e9f2be | philip-luk-tangent-anim/OpenColorIO | /src/OpenColorIO/ops/Log/LogUtils.cpp | C++ | cpp | 11,929 | permissive | // SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#include <algorithm>
#include <cmath>
#include <OpenColorIO/OpenColorIO.h>
#include "ops/Log/LogOpData.h"
#include "ops/Log/LogUtils.h"
OCIO_NAMESPACE_ENTER
{
namespace LogUtil
{
void ConvertFromCTFToOCIO(const CTFParams... |
59e87a15d4c06b95cae96e1f12301ccca3eaec32 | 1f3c2e3e5d6e38e56ce6e3b8a9058e4b5c2feccc | jmpechem/sm_n_vis | /rt_dynamixel/src/dxl_lists.cpp | C++ | cpp | 7,285 | no_license |
#include "dxl_lists.h"
using namespace DXL_PRO;
// Defines (Debug, Test, ...)
// #define DXL_TEST_SET
#ifdef DXL_TEST_SET
dxl_pro_data dxlLists[4][10] = {
{
// Index: 0
{1, H54},
}, {
// Index: 1
}, {
// Index: 2
}, {
// Index: 3
}
}; // Max 4ch... |
1f5748035e1645368a1e5dd93f1e7b1d27e2c1a2 | 1b717187aa5cd99a07064a48616b7b7c0db96ee8 | KatsuyaKikuchi/ProgrammingContest | /AtCoder/AtCoder Beginner Contest/ABC147/C.cpp | C++ | cpp | 1,196 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(10)
const ll MOD = 1000000007;
const ll INF = (ll) 1e15;
struct Data {
vector<pll> x;
};
Data A[30];
... |
e9496a63105ccc68e0ea89fbd3d5a6d84f58ef75 | d20ff25639f5f0b897957ff8f3982fc0deabbc85 | AlisonAO-RV/Algoritimo_II_UNIRV_2020 | /Lista_02_Vetor/Exercicio_10.cpp | C++ | cpp | 675 | no_license | /*
* ALGORITMOS PARA ENGENHARIA II - 2020/2
* Aluno: Alison Alain de Oliveira
* LISTA 02 - Vetor
* EXERCICIO 10
*/
#include <stdio.h>
int main()
{
int vetorF[20];
int vetorG[20];
printf("| Digite valores do VetorF\n");
for (int i = 0; i < 20; i++)
{
printf("| %d/20: ", (i + 1));
... |
73d896035ee483c5887e13c955027fda6fbea880 | ff992e7917be1efc33e1092b08fe48fd79483a3a | spaske00/RG113-virus-defender | /src/SlowSpell.cpp | C++ | cpp | 1,656 | no_license | #include "SlowSpell.hpp"
#include <GL/glut.h>
namespace vd {
GLuint SlowSpell::m_draw_list;
Material SlowSpell::m_material;
SlowSpell::SlowSpell(GLfloat x, GLfloat y, GLfloat z)
: Spell(x, y, z, SlowSpell::TICK_DURATION, RADIUS) {}
void SlowSpell::init() {
m_material.set_ambient(0, 0, 1, 1);
m_material.set_di... |
7de4aedc2c3ea66a4f25b263f7eac20aa3b983a6 | 32ca44304f29561da74ef62f3df2196539f92415 | spokoynj/OSU-Projects | /CS 475 - Intro to Parallel Programming/Project 3/project3.cpp | C++ | cpp | 1,805 | no_license | /**********************************************
* Jessica Spokoyny
* CS 475 - Project 3
* May 8, 2017
*********************************************/
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#define NUMTRIES 100
struct s {
float value;
int pad[NUMPAD];
} Array[4];
int main()... |
cb6753a7360863a68e10817d4096714c65595635 | 0ba3418a1459b0d5e738791ee8db0fef1a61c1db | shenmishajing/816---Abbott-s-Revenge | /816 - Abbott's Revenge.cpp | C++ | cpp | 3,417 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <stack>
using namespace std;
struct pos
{
int x, y, dir;
pos(int x = 0, int y = 0, int dir = 0) :x(x), y(y), dir(dir) {};
};
bool searched[10][10][4];
pos parent[10][10][4];
stack<int> route[2];
queue<int> position[3... |
2139fa7afbd2fe304fba2f220f21eb2c5d70435a | 126007de97d04c04f2313033f5bf5183d8d643f7 | ivanlipko/Tutorial_OpenCV | /opencvTest2/main.cpp | C++ | cpp | 201 | no_license | #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
printf("0");
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
|
c8b31f38b7c781a4333e79027f691d01cd943917 | 08688315df52945903b86f29d1b1111a5a3fd34e | xusl/android-wilhelm | /modem_proc/modem/datamodem/interface/dss/src/DSS_NetworkIPHandler.cpp | C++ | cpp | 2,920 | permissive | /*======================================================
FILE: DSS_NetworkIPHandler.cpp
GENERAL DESCRIPTION:
Implementation of DSS_NetworkIPHandler functions
=====================================================
Copyright (c) 2008 - 2012 QUALCOMM Technologies Incorporated.
All Rights Reserved.
Qualcomm Confiden... |
efe76a6772630c655ca0f47979359cdbe75360d9 | 0c9450343f4ed91a68a85e7f68b0b7226ae3850b | alexpolt/trash | /cpp-tests/result1.cpp | C++ | cpp | 1,244 | permissive | #include <cstdio>
#include <cassert>
#include "../config.h"
#include "../testing.h"
#include "../heap.h"
#include "../result.h"
using namespace alexpolt;
struct Dummy {
int a = 0;
Dummy() { printf("%s()\n", __func__); }
Dummy(const Dummy&r) { printf("%s copy\n", __func__); }
Dummy(Dummy&&... |
d267150e44b3ec0c91843193441289826f693abc | 1c67f5407fb151c8c67fd186c8abd9c982e3731f | Jacobzwh/All-CPP | /LISt paixu/LISt paixu/list paixucpp.cpp | C++ | cpp | 776 | no_license | #include<iostream>
#include<ctime>
#include<string>
#include<list>
#include<set>
#include<algorithm>
using namespace std;
#include <set>
class MyCompare
{
public:
bool operator()(int v1, int v2)const {
return v1 > v2;
}
};
void test01()
{
set<int> s1;
s1.insert(10);
s1.insert(40);
s1.insert(20);
s1.insert(... |
b7ccfb2cacc6b93941c7918d36879284f73092e9 | c050a5dacc07ce5b2e8cbf95f579ccf3cf878a89 | drcaramelsyrup/snow-pbrt | /src/core/film.cpp | C++ | cpp | 10,190 | permissive |
/*
pbrt source code is Copyright(c) 1998-2016
Matt Pharr, Greg Humphreys, and Wenzel Jakob.
This file is part of pbrt.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redi... |
d692fcff82f189e2886d80fad825321d3b86f17f | 15de628807bec9ffa2941506153e5d5a0dd59e64 | sudoconf/hhvm | /hphp/runtime/ext/asio/gen_array_wait_handle.cpp | C++ | cpp | 9,099 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
8d5b7465243e3372e4eee0db0c95dade4e45eb93 | 036cc5cfa556070527b500a0b516e905ed3a79ce | berry8192/Atc | /abc192/A.cc | C++ | cc | 528 | no_license | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep3(i, n, m) for (int i = m; i < (int)(n); i++)
#define repr(i, n) for (int i = n-1; i >= 0; i--)
#define all(v) v.begin(), v.end()
#define SP << " "
#define LLi long long int
using namespace std;
int imax=2147483647;
LLi llimax=... |
cd58153b67ebdbf9f88cf7ce05eb7fe691c03e23 | 8f3b3e8afc945de5dafed28f2bc8300263d42630 | K-Wu/libcxx.doc | /test/std/utilities/time/time.traits/time.traits.duration_values/min.pass.cpp | C++ | cpp | 1,717 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
7e4965b0c1d48e0471d8466fae1068fba3b52f63 | 6d29b0520cfb42dff4242835630440e27b1f8f84 | lutfullahillabib/ACM-SOLUTION | /lightoj solutions/1134 - Be Efficient.cpp | C++ | cpp | 4,476 | no_license | /*
~~~ BISMILLAH HIR RAHMANIR RAHIM ~~~
Problem Name: 1134 - Be Efficient
Platform: LightOj
Algorithm: Math + DP
Author's Name: RC Tushar
~~~~~ MY DEDICATION TO SOME FRIENDS ~~~~~
Kim: Whenever you start to believe yourself, people also start to believe in you.
Oshy: Every ... |
48c93c49d8438865b34e2c187830ee83ac222640 | 9bdd6bed5fe1da6492cd2042fa6bffa9224625dd | mamun4122/My-Online-Judge-Submission | /UVALive/3816.cpp | C++ | cpp | 1,096 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<cmath>
using namespace std;
int main()
{
//freopen("file.txt","r",stdin);
int t,a[405],f=1;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
for(... |
49440f3af707c3a182947c1d4746ceb6b4d5c112 | a7a07cd101d44e6271f81effa5208fbd96e3a792 | playbar/AndroidUtils | /androidboost/src/main/cpp/tools/quickbook/src/actions.cpp | C++ | cpp | 67,050 | permissive | /*=============================================================================
Copyright (c) 2002 2004 2006 Joel de Guzman
Copyright (c) 2004 Eric Niebler
Copyright (c) 2005 Thomas Guest
http://spirit.sourceforge.net/
Use, modification and distribution is subject to the Boost Software
License,... |
ef48d4fed71bdb398e8aaf33ec0916e939a7ba12 | e0fbeb8facdb93a67b16da70116c592fc0c0a562 | almoreir/algorithm | /cd3/정보올림피아드관련/정보올림피아드관련/문제들/문제/문제모음2/12월13일-4문제/kim/oldmap/atan2.cpp | C++ | cpp | 623 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
double v[10];
int main(void)
{
// 0
// -pi*1/4 | pi*1/4
// o | o
// |
//-pi*2/4 | pi*2/4
// -o--------+---------o-
// |
// |
// o | o pi*3/4
//... |
a626eb4d534a22da7ef9f307702bb1c6998b2899 | 1aa30a74d13166564ed88c983174fea5a37a7f3c | sandexp/Pat-Algorithm | /Example/BellMan.cpp | C++ | cpp | 3,388 | no_license | #include <iostream>
#include <math.h>
#include <vector>
using namespace std;
const int MAXN=10010;
const int INF=999999;
bool vis[MAXN]={false};
int d[MAXN];
struct Node{
int v;
int dis;
};
vector<Node> Adj[MAXN];
int find(int line,int x){
int index=-1;
for (int i = 0; i < Adj[line].size(); i++)
{
... |
f8abea0401cc4cb3bad0d339eb8bfbccad9e19a0 | 1f2e67fc485f38b0588f8241fa95eec2e8666eaf | szh-bash/ACM | /ICPC2018/牛客网暑期ACM多校训练营(第5场)/D2.cpp | C++ | cpp | 1,422 | no_license | #include <map>
#include <queue>
#include <cmath>
#include <ctime>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#define N 1000000
typedef unsigned long long ull;
typedef long long ll;
using namespace std;
int c[N], w[N], n, m, a[N], b[N];
ll ans;
int ... |
a1fc1c2dc0fa7878a0eb023218703e58772d55ec | 938a2b35827cbbcc0c3af03497ac3a62d7068711 | gopcoin/gopcoin | /src/init.cpp | C++ | cpp | 45,493 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "walletdb.h"
#include "bitcoinrpc.h"
#include "net.h"
#... |
d195e8a14bdc232bc2a5069d867e629ae8cafa64 | c26a3e66d2c1265fb327085a295b1f5f02626a93 | Csineneo/Vivaldi | /chromium/components/viz/service/frame_sinks/compositor_frame_sink_support.cc | C++ | cc | 30,990 | permissive | // Copyright 2016 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/viz/service/frame_sinks/compositor_frame_sink_support.h"
#include <algorithm>
#include <utility>
#include "base/bind.h"
#include "b... |
d8243bc412c7644680ca1d366137cf88da9a187a | cc8bec98c5a1f2354ad92088ca8cff3ddf5a37da | zhaili/Project-Euler-Solution | /p111.cpp | C++ | cpp | 1,552 | no_license | /*
g++ -o p111 -O2 p111.cpp -Ie:/gmp/include -Le:/gmp/lib -lgmpxx -lgmp
*/
#include <stdio.h>
#include <time.h>
#include "gmp.h"
typedef unsigned __int64 int64;
int64 sum = 0;
int rep_lim;
int dep_lim;
bool found = false;
void mpz_set_uj(mpz_t x, int64 y) {
mpz_import(x,sizeof(int64),-1,1,0,0,&y);
}
void d... |
eb99bc3e54240c5adba40464b89ad2bb5ab0460e | d0463b5f555dccaa292bc4b26dce9707ccc9cee6 | haptics-nri/nri | /crates/drivers/bluefox/mvacquire2.17.2/mvIMPACT_acquire-2.17.2/apps/mvPropView/DrawingCanvas.cpp | C++ | cpp | 1,685 | no_license | #include "DrawingCanvas.h"
//=============================================================================
//================= Implementation DrawingCanvas ==============================
//=============================================================================
BEGIN_EVENT_TABLE( DrawingCanvas, wxScrolledWindow )... |
73199328f86ab51be67d389bed6c4612835dbfc7 | 16ae5520f5607899e56bf06c2c7a05ab8facdc63 | HarshavardhanNetha/ds | /Stack/1_Stack_Structure_array.cpp | C++ | cpp | 853 | no_license | //done
//program to demonstrate stack with structure and array
//b171325
//Harsha
#include <stdio.h>
#include <stdlib.h>
struct stack{
int a[20];
int top;
int max;
};
int main(){
struct stack s;
s.max=20;
s.top=-1;
int option,ele;
do{
printf("1.Push\n2.Pop\n3.Exit\nEnter your option:... |
92d7b8ffee11d232f1ddea795829a3daeef3e59f | 315ab8a4667a64aee87f8fe02d318afa6ef1f734 | roche-emmanuel/sgt | /sources/plug_osg/src/luna/bind_osg_ConstValueVisitor.cpp | C++ | cpp | 66,965 | no_license | #include <plug_common.h>
#include <luna/wrappers/wrapper_osg_ConstValueVisitor.h>
class luna_wrapper_osg_ConstValueVisitor {
public:
typedef Luna< osg::ConstValueVisitor > luna_t;
inline static bool _lg_typecheck_getTable(lua_State *L) {
if( lua_gettop(L)!=1 ) return false;
return true;
}
stat... |
2ef9f64c88b6a7c6277d3b0eca3d59658d8abe56 | 98a16274ce8d8c5311c9127c22c80c8f95d8d8c0 | ryantpfr/tensorflow | /tensorflow/lite/micro/micro_allocator.cc | C++ | cc | 22,132 | permissive | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
42a3f9417b6892d33672e2d25d96db1490c152e1 | e5dfb84922441144afad9f91ef93d25027b603aa | DottieDot/gta5-additional-nativedb-data | /usages/0x113750538FA31298.cpp | C++ | cpp | 222 | no_license | // am_mp_arcade.ysc @ L25507
int func_312(int iParam0)
{
if (iParam0 != 0)
{
if (!HUD::IS_NAMED_RENDERTARGET_LINKED(iParam0))
{
HUD::LINK_NAMED_RENDERTARGET(iParam0);
}
return 1;
}
return 0;
} |
8663e1ce39de9f3fdf6e0d29298e84640a75f79f | 69b0227f4015e6d73086d6490201ab02f5321af8 | haiaimi/PuzzlePlatforms | /Source/PuzzlePlatforms/PlatformTrigger.cpp | C++ | cpp | 1,160 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "PlatformTrigger.h"
#include "Components/BoxComponent.h"
// Sets default values
APlatformTrigger::APlatformTrigger()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't nee... |
7709c37e7a7d690cbad11cd2930020f63452e0f6 | 3640611609aeda394a30a7b5466a916f977eb1d6 | algoriddle/cp | /uva/10443.cc | C++ | cc | 1,242 | permissive | #include <iostream>
using namespace std;
char m[2][101][101];
int r, c;
char b[4] = { 'S', ' ', 'P', 'R' };
bool match(int mi, char bt, int y, int x) {
return x >= 0 && y >= 0 && x < c && y < r && m[mi][y][x] == bt;
}
int main() {
ios::sync_with_stdio(false);
int t;
cin >> t;
bool first = true;
while (t... |
1d6c5732cfa6169a966fea9b2ef7ea73ca417064 | 9ca58c076a2c901ae0515151b8fdcfbb74d9cae7 | linyunhe/hypothesis_test_PG_for_CRISM | /Algorithm1/compute_logcosh_penalty_H_mex.cpp | C++ | cpp | 34,933 | no_license | #include "mex.h"
#include <omp.h>
#include <iostream>
#include "Matrices.h"
#include "PenaltyParams.h"
#include "ompThreader.h"
#include "crism_mex_defines.h"
// Uses OpenMP. Compile from Matlab prompt with:
// mex -v compute_new_image_logcosh_prior_mex.cpp -largeArrayDims CC=g++ COMPFLAGS="/openmp $COMPFLAGS" CFLAGS=... |
7eac9a86dbfe7760cb8a632a0a5b3b5773464e03 | 326c331bce868fd395ae6a52e7a7b233cf0bd8c5 | LauraDiosan-CS/lab04-isaisebastian | /Bank.cpp | C++ | cpp | 654 | no_license | #include "Bank.h"
#include <iostream>
using namespace std;
Bank::Bank() {
this->type = NULL;
}
Bank::Bank(char* type)
{
this->type = new char[strlen(type) + 1];
strcpy_s(this->type, 1 + strlen(type), type);
}
Bank::Bank(const Bank& b) {
this->type = new char[strlen(b.type) + 1];
strcpy_s(type, 1... |
f034ba893fb020d9b0ee7c2264d830585e1c43f2 | fb8fff700f2aae9e46fc22d30a2720c47c532d7f | liang0/chromium | /chrome/browser/extensions/crx_installer.cc | C++ | cc | 48,678 | 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/extensions/crx_installer.h"
#include <map>
#include <set>
#include <utility>
#include "base/bind.h"
#include "base/command_... |
60c378155978087309b52bb751278ed8841bfb5d | 54a171825db7fe369901ad4c158f8113ee72a14d | diegoximenes/icpc | /judges/uva/done/10245.cpp | C++ | cpp | 1,702 | no_license | #include<cstdio>
#include<cmath>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
#define INF 1e9
#define EPS 1e-9
struct Point
{
double x, y;
Point(double x = 0, double y = 0): x(x), y(y) {}
bool operator<(Point other) const
{
return x < other.x;
}
};
double dist(Point p1, Point p2)
{
... |
6dab2d2cfef9a7fc45d73bc7b68cbf1cd030c827 | 5e499664f90f45ce09e8ee1e023686b20244c80b | team-astro/graphics | /src/renderer.cpp | C++ | cpp | 1,935 | permissive | /**
* Copyright 2015 Team Astro. All rights reserved.
*/
#include <astro/graphics/renderer.h>
#include "renderer_imp.h"
namespace astro { namespace graphics
{
// typedef render_driver* (*driver_create_func)();
// typedef void (*driver_destroy_func)();
#define ASTRO_GFX_RENDER_DRIVER(ns) \
namespace ns \
{ \
... |
33230d8e59c7e7762d9194082c893a2f39a6d0c3 | f1657451683fc01d07280bdadb54cf36f93b0a2c | borjaportugal/MemoryAllocators | /src/InlineAllocator.cpp | C++ | cpp | 1,003 | permissive | /*!
\author Borja Portugal Martin
GitHub: https://github.com/borjaportugal
This file is subject to the license terms in the LICENSE file
found in the top-level directory of this distribution.
*/
#include "InlineAllocator.h"
#if DEBUG_INLINE_ALLOCATOR_ENABLED
std::ostream & operator<< (std::ostream & os, const ::me... |
4c6b7844e3def2bebec640f4c05183419ad08710 | 22a43b4dfa621eb261cef904d37b306c28f34d45 | dooka75/pal | /src/core/hw/gfxip/gfx9/gfx9AcquireReleaseBarrier.cpp | C++ | cpp | 127,420 | permissive | /*
***********************************************************************************************************************
*
* Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
0fc3bac0c9c225a51d6aceaecd0f144847238243 | 392fcfe860f148477f5c9d3be9dcc37de65d97b6 | smeenai/llvm-project | /clang-tools-extra/test/clang-tidy/checkers/modernize/use-bool-literals-ignore-macros.cpp | C++ | cpp | 5,112 | permissive | // RUN: %check_clang_tidy %s modernize-use-bool-literals %t -- \
// RUN: -config="{CheckOptions: \
// RUN: {modernize-use-bool-literals.IgnoreMacros: \
// RUN: true}}"
bool IntToTrue = 1;
// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: converting integer literal to bool, use bool literal inst... |
859890fb6b59363ae69f087626d84169a5cdb327 | 5fc22439ccaccfe142b045415f4bdf47d62250ae | CoralGao/hw7212 | /finalProject/src/main.cpp | C++ | cpp | 6,021 | no_license | /*
Author: Minsheng Zhang
Shanshan Gao
*/
#include "parserInput.hpp"
#include "tileToSetCover.hpp"
#include "dancinglink.hpp"
#include <iostream>
#include <vector>
#include "def.h"
#include <algorithm>
#include <mpi.h>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <stack>
using namespace std;
int d... |
565e6f8a8783de6436068e3648cc308a6b36a40c | 7bc0f52656e8fc929f0064f87d5ca9128427cd1c | mdakram09/C-and-Cpp-Practice | /Mathematics/areas.cpp | C++ | cpp | 1,340 | no_license | #include<iostream>
#include<math.h>
using namespace std;
int main()
{
int choice;
cout<<"Enter your choice \n 1. Triangle \n 2. Square \n 3. Rectangle \n 4. Parallelogram\n";
cin>>choice;
switch(choice)
{
case 1:
int a,b,c;
float s, areaT;
cout<<"Enter the sides of Triangle one by one \n";
cin... |
20372bea498fb990a7a1373af770be8e0affd87e | 15bac2e75528a1ff81ca39a21bbb60885233b757 | NazaraEngine/NazaraEngine | /tests/UnitTests/Engine/Math/QuaternionTest.cpp | C++ | cpp | 8,739 | permissive | #include <Nazara/Math/Quaternion.hpp>
#include <catch2/catch_approx.hpp>
#include <catch2/catch_test_macros.hpp>
SCENARIO("Quaternion", "[MATH][QUATERNION]")
{
GIVEN("Two quaternions (0, 1, 0, 0)")
{
Nz::Quaternionf firstQuaternion(Nz::DegreeAnglef(180.f), Nz::Vector3f::UnitX());
Nz::Quaternionf secondQuaternion... |
0997de9099e17c1de598eb140ae802a756e26c4a | 22ca3a832db1736914ad7f1db99bbf02fba8d077 | hamfirst/StormBrewerEngine | /Lobby/Lobby/Game.refl.cpp | C++ | cpp | 28,491 | no_license |
#include "HurricaneDDS/DDSResponderCall.h"
#include "Game.refl.meta.h"
#include "User.refl.meta.h"
#include "UserConnection.refl.meta.h"
#include "GameList.refl.meta.h"
#include "ServerManager.refl.meta.h"
#include "GameServerConnection.refl.meta.h"
#include "Matchmaker.refl.meta.h"
#include "LobbyLevelList.refl.h"
... |
6d73f98f8612b9aea7d9f5eb3fbab202704955f1 | c18599798856dc073b7773d2c0635191f8f709a6 | Wang1995/trafodion | /core/sql/arkcmp/cmpmod.cpp | C++ | cpp | 1,818 | permissive | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// 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. ... |
0b9343242373508f250a79e9396cab90c1b561cc | 53e1c6e0f651339b23a06e45e519cf2c9cc30f18 | mkkaufmann/Vex4911A2019 | /include/okapi/api/control/iterative/iterativeController.hpp | C++ | hpp | 2,163 | no_license | /*
* @author Ryan Benasutti, WPI
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "okapi/api/control/closedLoopController.hpp"
#include ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.