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 |
|---|---|---|---|---|---|---|---|---|
bb5281413e67b11dcbd2481a09094627eca7ba9c | 41a56d48194b37facf482fc2ec6b9feb3565ffaf | svdmaar/Coop | /CoopUtils/Direct9dDemos/TextureDemo.cpp | C++ | cpp | 4,629 | no_license | #include "D3dDemos.h"
#include "VertexFormats.h"
#include "../../Coop/Bitmap.h"
#include <iostream>
using namespace std;
static IDirect3DVertexBuffer9 * g_pVertexBuffer = NULL;
static IDirect3DTexture9 * g_pVideoTexture = NULL;
static const int g_nVertices = 6;
static bool Init()
{
HRESULT hr;
hr = g_pD3dDevice... |
b4f796152bb2b694d8f1afd20e2df8b574daf02c | e6d3150652dc31e96bc28246e1338f0696bd5b38 | Echo12/e12_tools_ace3 | /Addons/e12_tools/actions/E12_Tools_SelfActionsAdmin.hpp | C++ | hpp | 2,453 | permissive | class E12_Admin {
displayName = "$STR_E12_Tools_Actions_Admin";
runOnHover = 1;
exceptions[] = {"isNotInside", "notOnMap"};
statement = QUOTE(true);
condition = QUOTE([_player] call FUNC(isAdmin));
icon = PATHTOF(UI\icons\tools_admin.paa);
class E12_Admin_AssignMedicSelf {
disp... |
4695f7bf55b4dd84412477c6d6ce6c7722d89a7e | bbc170e93218c33758187d9674d1d7e092c47155 | thomaskf/cmpMatrix | /cmpMatrix.cpp | C++ | cpp | 5,713 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <cmath>
#include <iomanip>
#define VERSION "1.1"
using namespace std;
long index(long i, long j, long n) {
long m = 0;
if (i > j)
return index(j, i, n);
// before i
if (i>0)
m += i*(n-1) - ... |
58111a2fa3e0de2dbee07b33151324025356c309 | 87dbddcaf87ec0aae3beb91f3b242ec8238cd731 | a100q100/ngui | /test/test-list.cc | C++ | cc | 2,315 | permissive | /* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2015, xuewen.chu
* 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... |
fe7e4aa2df18386111fef42c93113b00c1a83f5e | a116b20cb899855c1b431f1064c5b5b37ae63ec4 | metrumresearchgroup/Torsten | /cmdstan/stan/lib/stan_math/lib/boost_1.75.0/boost/geometry/geometries/geometries.hpp | C++ | hpp | 1,437 | permissive | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2020.
// Modifications copyright (c) 2020,... |
159f7817fa4a9f89c10c44ec0843ee5f1950d5b6 | e1bd00eb2433caeb49c902d3fd7f5a15eafeec9c | simhaonline/hypervisor | /kernel/test/dispatch_syscall_vp_op_failure/requirements.cpp | C++ | cpp | 1,736 | permissive | /// @copyright
/// Copyright (C) 2020 Assured Information Security, Inc.
///
/// @copyright
/// 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 limita... |
54352b4d055f14a1d1e444cb81e6cf1f4c81a309 | b0bdd470062d5281e55ba250d2086363d29d02bb | ismap1993/BitCrushers | /presidentumCentralizado/Plataforma.cpp | C++ | cpp | 3,532 | no_license | /*
* File: Plataforma.cpp
* Author: Aitor
*
* Created on 19 de abril de 2016, 17:52
*/
#include "Plataforma.h"
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
using std::cout;
using std::endl;
using std::ifstream;
Plataforma::Plataforma(int x, int y, int numMapa) {
pos... |
ad520215b09db11d78cd054319bf03df7a91b427 | 0becc1a2c21a0a35115d7dfa3570db2539727cf9 | stammen/libqi | /src/messaging/servicedirectoryclient.hpp | C++ | hpp | 3,780 | no_license | #pragma once
/*
** Copyright (C) 2012 Aldebaran Robotics
** See COPYING for the license
*/
#ifndef _SRC_SERVICEDIRECTORYCLIENT_HPP_
#define _SRC_SERVICEDIRECTORYCLIENT_HPP_
#include <vector>
#include <string>
#include <qi/signal.hpp>
#include <qi/trackable.hpp>
#include <qi/messaging/serviceinfo.hpp>
#include <qi/s... |
a842e69c72cb9f937f8b19f89415e184f9398ae8 | f68d3a8a95290096bbabb569512111eda6311247 | jwymah/453-a3 | /a3/renderer.cpp | C++ | cpp | 14,172 | no_license | #include "renderer.h"
#include <QTextStream>
#include <QOpenGLBuffer>
#include <cmath>
#include<iostream>
using namespace std;
const float tet_verts[] = {
1,1,1, 1,2,1, 2,1,1,
1,1,1, 1,1,2, 1,2,1,
1,1,1, 2,1,1, 1,1,2,
2,1,1, 1,2,1, 1,1,2,
};
const float tet_normals[] = {
0,0,-1, 0,0,-1, 0,0,-1,
... |
ecd4592bbf84b3480175d4e3ddb235d0a6b2f682 | 6c7e1f7bcdc11ff3000bc4282ea12c2c3c14ca10 | aditgoyal19/Artificial-Intelligence-Game | /GameEngineBase/powerup.cpp | C++ | cpp | 595 | permissive | #include "powerup.h"
PowerUp::PowerUp()
{
m_State = "IDLE";
}
PowerUp::~PowerUp()
{
}
void PowerUp::Update( float deltaTime )
{
if(m_State != "EQUIPED")
{
//Attach shield to Player
Vector3D distanceFromPlayer = delegator->getDistanceFromPlayer(this->getPosition());
float dist = distanceFromPlaye... |
37bc82a1e48d8fc11f11a73f0ef49b1ba10c7c0f | 38faa8a7670eb4541ef44e0c64f9a28ef387536a | gpudev0517/Fire-Simulator | /NVIS/Code/Render/Rendering/Utility/RenderSettings/NE3DeLightExport.cpp | C++ | cpp | 33,467 | no_license | #include "NE3DeLightExport.h"
#include "Rendering/Spatial/NECamera.h"
#include "Rendering/Spatial/NELight.h"
#include "Core/Physics/Spatial/Physical/Rigid/ParticleRigid/NESphRigid.h"
#if NE_DEFORMABLE
#include "Core/Physics/Spatial/Physical/Deformable/ParticleDeformable/NESphDeformable.h"
#endif
#include "Rendering/Mes... |
41fb5e5ab132f2cf87d0859efb92a1c8596a3137 | 13700fd8b522c3edc972af2c387ff1bcfdc6a71c | jivibounty/irrlicht | /tags/release-1.1/source/Irrlicht/CIrrDeviceLinux.cpp | C++ | cpp | 29,520 | permissive | // Copyright (C) 2002-2006 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CIrrDeviceLinux.h"
#ifdef LINUX
#include <stdio.h>
#include <stdlib.h>
#include <sys/utsname.h>
#include "IEventReceiver.h"
#... |
354fdd4b39812f3645560d28c580b17f8fd917be | 5263964a45b3c1d907dd77d32c8de5c4bdc10bee | foolcodemonkey/chromium | /content/browser/service_worker/service_worker_version.cc | C++ | cc | 87,176 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/service_worker/service_worker_version.h"
#include <stddef.h>
#include <limits>
#include <map>
#include <string>
#include "bas... |
fd728c814db7e93f942db6162f86cae62334d312 | 24344ed64785b478ecebb4ae24d5c1c96224f032 | phamtuan0946621237/FPT-Aptech | /FPT-ontap.cpp | C++ | cpp | 1,880 | no_license | #include <stdio.h>
int main(){
int h;
printf("số dòng");
scanf("%d",&h);
for( int i = 0; i < h ; i++){
for(int j=0;j<=i;j++){
printf("*");}
printf("\n");
}
return 0;
2.
int dong;
int cot;
scanf("%d",&cot);
scanf("%d",&dong);
for (int i=0;i <cot;i++ ){
... |
afb0cfbd8d3bb388ba8fa26437c7c9aa2cddabd4 | c4d112167d9bc8d005267e0b8897b368070a8466 | boostorg/geometry | /test/algorithms/append.cpp | C++ | cpp | 5,052 | permissive | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2014, 2015.
// Modifications ... |
57a6a517509ccbcd2f70ebf99bb77adeb067592d | f14d155022b8d13c5f0895186a421ac5dfff5a64 | Santana20/Programacion-Competitiva | /Concursos-online/CF661-D3/A.cpp | C++ | cpp | 1,500 | no_license | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define forin(i, n) for ( int i = 0; i < (int)n; ++i )
#define MAXN 100005
typedef long long ll;
const char nl = '\n';
multiset<int> sums;
int used[MAXN];
int suma;
void dfs(int nodo, vector<vector<pair<int... |
8aab0c80bcccd51e8d212b8464e9a8cf2379fe4d | 85f9fbdde4e0a7bf666c5ed3c805a3dc901fa48c | marcospqf/Roteiros | /Roteiro_8/pal.cpp | C++ | cpp | 1,405 | no_license | #include <cstring>
#include <iostream>
#include <bitset>
#include <cstdlib>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <utility>
#include <algorithm>
#include <iomanip>
#define sc(a) scanf("%d", &a)
#define sc2(a, b) sc... |
639528368ffbe094b1525e18f39e4efe3470eeff | 3ffbb51afda85272bdf30d39bc7db5080ee61e36 | zanzo420/zSoT-SDK | /External/SDK/BP_GH_Rank08_RankDesc_functions.cpp | C++ | cpp | 546 | no_license | // Name: SoT, Version: 2.2.0.2
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//----------------------------------------------------... |
68d82a2ea3c9091002847de0231f411dc4213c2b | 2442ad981d75b82d29f10d9f6a3e32d6e87e738d | Denticle/docker-base | /php/php-sky/grpc/third_party/abseil-cpp/absl/strings/str_split_test.cc | C++ | cc | 32,310 | permissive | // Copyright 2017 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable la... |
d04e3bb908448deda03092dc345ef1af0e52381c | acef7c4c50263cd0af965a5a8d9cc349644c91c7 | SohopGAS/PseudoGraphics | /PseudoGraphics/Control.cpp | C++ | cpp | 6,247 | no_license | #include "Control.h"
Control* Control::_focused_control = NULL;
Control*
Control::getFocus()
{
return _focused_control;
}
void
Control::setFocus(Control& control)
{
_focused_control = &control;
}
static bool
isValidPos(const int &size, const int &pos) {
if (pos < 0 || pos > size) {
return false;
}
return tr... |
dcecd8d365bce2d357938c51016bad3aef627af5 | 722af0ffaf9ffffc231d00d84a44f3164d879970 | jiadaizhao/LeetCode | /0701-0800/0762-Prime Number of Set Bits in Binary Representation/0762-Prime Number of Set Bits in Binary Representation.cpp | C++ | cpp | 470 | permissive | class Solution {
public:
int countPrimeSetBits(int L, int R) {
int count = 0;
vector<int> primes = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31};
for (int i = L; i <= R; ++i) {
int num = i;
int sum = 0;
while (num) {
++sum;
num &... |
24cdf9db0a885c066f595ca526bb65c1722d47f0 | ff8a32a2145e90a0cecf0b54f3d3d9eb9570fcb7 | BrookGotter/hello-world | /a.cpp | C++ | cpp | 1,973 | permissive | #include <stdio.h>
/*
int GetMax(int param1,int param2)
{
return param1>param2? param1:param2;
}
char GetMax(char param1,char param2)
{
return param1>param2? param1:param2;
}
*/
/*
两个重载函数仅仅是处理的数据类型不同,参数的个数
法都相同,可以用一个函数模板统一起来
注意:
1、形式类型参数列表中的参数个数与名称可以
任意,但是调用的时候,实际类型参数个数必
须与形式列表匹配;
2、函数的定义与实现,可以使用任何已知的数
据类型,也可以使用形式... |
137b5ce96f96197fd7719a13f37067eb4bf2478f | 32ddc31d650bb4a900fe00475bf4fb5be153e3f5 | FEKUBEU/info3_proj | /receipt.hpp | C++ | hpp | 577 | no_license | #ifndef RECEIPT_H
#define RECEIPT_H
#include <string>
#include "cart.hpp"
#include "article.hpp"
#include "menu.hpp"
const int max_articles_receipt = 100;
const int max_stores=2;
class Receipt
{
public:
std::string receipt_store_name;
Article articles_receipt[max_articles_receipt];... |
ecd64de12ee722eaae33cce3704a36d947802da1 | 67166178b0ac2d4988696cd13b794e6b384eefa8 | neo4reo/BansheeEngine | /Source/RenderBeast/Source/BsRenderBeast.cpp | C++ | cpp | 51,016 | no_license | //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
//**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************//
#include "BsRenderBeast.h"
#include "BsCCamera.h"
#include "BsCRen... |
ee2cffb0f965346e5f4991046a80d19cdcb0f230 | c63a0477c7ef8f88b6a803d5ddd2d8720ae8b9c4 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp | C++ | hpp | 3,137 | permissive |
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright Jaap Suter 2003
//
// 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)
//
// Preprocessed version of "boost/mpl/bitxor.hpp" header
// -- DO NOT modify by hand!
... |
51506c52b6ce97fbf7f8a66449ced566fe5eebe7 | 1aa65bdfbadab885c89925fc17a575b02ab0aa6e | zhenghaogithub/SAT-Solver | /src/Cdcl.cpp | C++ | cpp | 8,924 | no_license | //
// Created by jan on 21.11.17.
//
#include <queue>
#include "Cdcl.h"
extern int CERR_LEVEL;
CDCL::CDCL(CNF *_cnf) {
cnf = new CNF(*_cnf);
dependency_graph = new Graph();
parent_decision = nullptr;
}
bool CDCL::SATISFIABLE() {
DpllResult *res = CDCLAlgorithm(cnf);
cnf = res->model_cnf;
ret... |
6e55b337cfb79fd3ce257e454a958f72265b0159 | 222db1ea7753baa2d4ee6b7107edf7b61b5de346 | asbaker317/Parallel | /MST_CC/Bor_FAL.cpp | C++ | cpp | 3,877 | no_license | #ifndef btest_cpp
#define btest_cpp
//INPUT HEADERS
#include "translate_from_input.hpp"
#include "input_to_network.hpp"
#include"structure_defs.hpp"
#include "ADJ/traversal.hpp"
//OUTPUT HEADERS
#include "printout_network.hpp"
#include "printout_others.hpp"
//PERMUTE
#include "permute_elements.hpp"
#include "ADJ/pe... |
d3b36a6d5e1ec5e4391aa0af2d112464edc79a81 | a458a898d0a901ff99861f08079e0d317faefe1c | LincolnBartlett/AlgoPractice | /Final/main.cpp | C++ | cpp | 845 | no_license | #define SIZE 10
#include <iostream>
#include <fstream>
#include <vector>
#include "item.cpp"
#include <cstdlib>
#include "cartHelper.h"
int main()
{
vector<Item> cart;
Discount savings[SIZE];
int size = 0;
char answer = 'n';
if (fillCart(cart))
{
cout << "Displaying Cart\n";
d... |
b26b22fde3649016f1f5c001e036d0f7e186782c | 3b598e203ab9fa457fb7d09fde5f80f5179cd459 | yashpupneja/Coding-Problems | /Arrays/Subarray with given sum.cpp | C++ | cpp | 1,763 | no_license | // Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.
// Input:
// The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. The first line of each test case ... |
603d0812e4cb2c507a6a2c22b35fcb96cfb0f2a6 | e66ce85f694521abb06ff776f1e044b2530d0846 | otcshare/chromium-src | /chromeos/components/media_app_ui/media_app_guest_ui.cc | C++ | cc | 3,104 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/media_app_ui/media_app_guest_ui.h"
#include "chromeos/components/media_app_ui/media_app_ui_delegate.h"
#include "chromeos/c... |
9a4ed14ef014654246a6b9e73bd5b18602377483 | 22e7e3cb8ec7fc22a4d12d6c461cc742cf10c23b | siddhantmehta/Algorithm-Programs | /DSA/Graph-Traversal/dfs.cpp | C++ | cpp | 936 | no_license | /* Depth First Serach Traversal */
#include <iostream>
#include <list>
using namespace std;
class graph
{
public:
int vert;
list<int> *adjList;
graph(int vert)
{
this->vert = vert;
adjList = new list<int>[vert];
}
void addEdge(int u, int v)
{
adjList[u].push_back(v);
}
void DFSDisp(int i, bool *visit... |
82aaa7d5fecb8562e9378cc11edb970cb1e81265 | 53e1edda2f9336add9ee4587af92f2c088afaed0 | samdoiron/jeshim | /engine/enemy.hh | C++ | hh | 522 | no_license | #ifndef JESH_ENEMY_H_
#define JESH_ENEMY_H_
#include "geometry/dimensions.hh"
#include "physics/collidable.hh"
#include "entity.hh"
#include <sfml/Graphics.hpp>
namespace jesh {
/* abstract */ class Enemy : public Entity {
friend class EnemyView;
public:
Enemy(sf::Drawable&, Dimensions, int);
... |
f92674ef09e287da6f5f6f671f8f4f5082a67e7c | 7e8a73fa5f1d26c3ea5dc2ab2e86007d678e0283 | ugozapad/g-ray-engine | /externals/boost/boost/program_options/options_description.hpp | C++ | hpp | 9,214 | permissive | // Copyright Vladimir Prus 2002-2004.
// Copyright Bertolt Mildner 2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_OPTION_DESCRIPTION_VP_2003_05_19
#define BOOST_OPTION_DESCRIPTION_VP_2003_0... |
8e683de031df21fcddd53e00a2051b73a1d79652 | a6a7cb2e78124700f3d66bd230ad8051b64b760f | pratikdange999/GeeksForGeeks-cpp | /02. Flow Control, Functions & Loops/11_First_Digit_of_Number.cpp | C++ | cpp | 234 | permissive | #include<iostream>
using namespace std;
int firstDigit(int x)
{
while(x>10)
{
x=x/10;
firstDigit(x);
}
return x;
}
int main()
{
int x,y;
cin>>x;
y=firstDigit(x);
cout<<y;
return 0;
} |
5c40ae0d270c092eef9f6f9ac21f5713baaa1301 | 352ac32652cf8caf7696d5e6c46bf77a2e44dc6c | lawinse/AlgorithmExercises | /leetcode/solutions/279.perfect-squares/perfect-squares.cpp | C++ | cpp | 642 | no_license | class Solution {
public:
int numSquares(int n) {
if (n<0) return 0;
if (n == 0) return 1;
vector<int> vi(n+1,0);
queue<int> Q;
for (int i=1; i*i <=n; ++i) {
if (i*i == n) return 1;
vi[i*i] = 1;
Q.push(i*i);
}
... |
33bfc5bc72f94925966d8bed16dfcb6773ca943c | fcdaa1451316dd375ffaf76728d5413043bbf65a | fermi-lat/sane | /src/test/main.cxx | C++ | cxx | 844 | permissive | /**
* @file main.cxx
* @brief Driver for running the Science Tools system tests scripts
*
* @author J. Chiang <jchiang@slac.stanford.edu>
*
* $Header$
*/
#include <cstdlib>
#include <iostream>
#include <string>
#include "st_facilities/Environment.h"
int main(int iargc, char *argv[]) {
std::string command;
... |
d8750de50f812b3b014a7c3812dad3e24c807345 | 76d426c8d468bde1f8693dc3d7aed99c4018f3df | miurahr/Nixnote2 | /gui/nmainmenubar.cpp | C++ | cpp | 14,992 | no_license | /*********************************************************************************
NixNote - An open-source client for the Evernote service.
Copyright (C) 2013 Randy Baumgarte
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 F... |
b4233bb8a4279e6884fd1a1be9a62c38282ea091 | 976a0db4c3c9a7887d77feea4dc962e79ebc6655 | julianoes/ulog-receiver | /src/ulog_receiver_bin/main.cpp | C++ | cpp | 461 | permissive |
#include "mavlink_comms.h"
#include "ulog_receiver.h"
#include <iostream>
#include <thread>
#include <chrono>
int main(int /* argc */, char** /* argv */)
{
MAVLinkComms mavlink_comms;
mavlink_comms.connect(14540);
UlogReceiver ulog_receiver;
while (true) {
std::cout << (mavlink_comms.is_con... |
773feea52e5f02f088878b300099044abfdc01a8 | 0811eda03e9185408d04105a10d72563d8dc8132 | andycheng0617/AlgorithmQIUZHAO | /Week_02/104. 二叉树的最大深度.cpp | C++ | cpp | 1,450 | no_license | #include <vector>
#include <algorithm>
#include <iostream>
#include <stack>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
/*
递归
时间复杂度:每个节点仅遍历一次,O(n),n为二叉树的节点个数
空间复杂度:O(n... |
6675d0dd0d8bdf82cad120bd4ae253fab223c59b | fdea3970425ce8743e15da60a74e1f07c24316ef | baoxuezhao/GPU-suffixsort | /host/check_functions.cpp | C++ | cpp | 25,017 | no_license | #include "../inc/sufsort_util.h"
#include <omp.h>
void key_value_sort(uint32 *key, uint32 *value, uint32 size)
{
int x, y, i, j;
for (i = 1; i < size; i++)
{
x = key[i];
y = value[i];
for (j = i-1; j >= 0; j--)
if (key[j] > x)
{
key[j+1] = key[j];
value[j+1] = value[j];
}
else
break;
... |
f241ae385e300394757252775675b442926a4eae | 986f34c560d9d33d2f6787538946c22ca5f3d4c4 | wisehead/cpp_lib | /cpp11/align/8-1-1.offsetof.cpp | C++ | cpp | 630 | no_license | #include <iostream>
using namespace std;
struct HowManyBytes{
char a;
int b;
};
int main() {
cout << "sizeof(char): " << sizeof(char) << endl;
cout << "sizeof(int): " << sizeof(int) << endl;
cout << "sizeof(HowM... |
791929bd062b18acf54967fb368dfab4a357056c | d2c84a4954b9f8a627748b555b514a3f42e843d2 | cenariusxz/ACM-Coding | /vj/kb6La.cpp | C++ | cpp | 659 | no_license | #include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
struct seg{
int a,b,l;
bool operator <(const seg a)const{
return l<a.l;
}
}s[5000];
int n,fa[105];
void init(){
for(int i=1;i<=n;i++)fa[i]=i;
}
int find(int x){
return x==fa[x]?x:fa[x]=find(fa[x]);
}
int main(){
while(scanf("%d",... |
6eb7ec39a3ad001741556158cb01a79366f9176a | f10996df418dd30c13d71a3dda917cfee660782d | examyes/blogstuff | /qt/jumplist_example2/mainwindow.cpp | C++ | cpp | 2,629 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include "winutils.h"
#include <QDebug>
IShellItem* FilePath2ShellItem(QString path) {
HMODULE shell;
IShellItem *shell_item = NULL;
t_SHCreateItemFromParsingName SHCreateItemFromParsingName = NULL;
shell = LoadLibrary(L"shell32.dll");
if (shell... |
2fbfdf598697f53c4d2e20b6c44f380eb0e6981f | 63558f2187d534c703d5f51aaa92c4cf67de7f56 | meniossin/src | /ash/system/tray/tray_popup_utils.cc | C++ | cc | 14,960 | 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 "ash/system/tray/tray_popup_utils.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "ash/ash_view_ids.h"
#include "ash/publ... |
c2e82e094566672ba2fcd3b65f18289995634bc8 | 8dbb3a8c2867fdaf4ab5230601fc1c09cb338ef8 | roche-emmanuel/singularity | /sources/plug_osg/src/luna/bind_osg_TexGen.cpp | C++ | cpp | 22,526 | no_license | #include <plug_common.h>
class luna_wrapper_osg_TexGen {
public:
typedef Luna< osg::TexGen > luna_t;
// Derived class converters:
static int _cast_from_Referenced(lua_State *L) {
// all checked are already performed before reaching this point.
osg::TexGen* ptr= dynamic_cast< osg::TexGen* >(Luna< osg::... |
d0d49eedb6c1532d957a7e32519140f8694ec302 | c85e5d0c497dee6ebe1f4f633134ec5a06580129 | brandonyeoxg/cs3201-simple-spa | /source/pkb/relationshipTables/AffectsTable.cpp | C++ | cpp | 12,193 | no_license | #include "AffectsTable.h"
#include <algorithm>
///////////////////////////////////////////////////////
// Affects
///////////////////////////////////////////////////////
BOOLEAN AffectsTable::hasAffectsFromBounds(PROG_LINE t_startBound, PROG_LINE t_endBound, PROG_LINE t_targetStart, PROG_LINE t_targetEnd) {
MAP_OF_V... |
a27cbdb58f097a186407b1cb99bac0f13f4ceded | b36945823e0a19073fff8bbf5ca78965f36b8be4 | Pmwalo96/CS435Project1 | /bstsort.cpp | C++ | cpp | 1,119 | no_license | #include <iostream>
using namespace std;
struct node
{
node *l;
node *r;
int item;
};
node* anothernode(int value)
{
node* n = new node;
n->item = value;
n->l = n->r = nullptr;
return n;
}
void arrstor(int lis[], int &x, node* rt)
{
if(rt!= nullptr)
{
arrstor(li... |
73f23716f56c75c4f6c265e4738f17fddfa89cd9 | 7cd0748aaef62dadf247f03a917a749378cdbf17 | xbohov01/code_sample | /C++ Misc/SchemaLoader.cpp | C++ | cpp | 3,523 | no_license | /*FIT VUT ICP 2017/18
**Samuel Bohovic xbohov01
**Jakub Crko˛ xcrkon00
*/
/**
* @file
* @brief This is a source file with SchemaLoader implementation
*
* @author Samuel Bohovic xbohov01
* @author Jakub Crko˛ xcrkon00
*/
#include "SchemaLoader.h"
/**
* @brief Constructor
*/
SchemaLoader::SchemaLoader()
{
};
/**
* @b... |
41cf95d43e79484e4fb92cc822503b2d658b01c2 | 7d71c296bd49adc7852b8b6d65eed9bf0b4a28e7 | HodakaNiwa/TeamC-Graduate-work | /06_β版(12月20日〆)/12月19日(木)結合/character.cpp | C++ | cpp | 57,053 | no_license | // ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆
// キャラクター管理 [character.cpp]
// Author : Kobayashi_Sho-hei / 小林 将兵 & Hodaka Niwa
// ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆
// ---<<#include>>---
#include "character.h"
#include "model.h"
#include "motion.h"
#include "manager.h"
#include "renderer.h"
#include "collision.h"
#incl... |
945b654f9723c0f058c6de50ac0101f6a9bc5c19 | e056484ea3d0c23ae55a9ef5838bc07e816c3601 | ohm-ros-pkg/vrmagic_drivers | /vrmagic_ros_bridge_server/src/TCP/TCP.cpp | C++ | cpp | 5,046 | no_license | /**
* @file : TCP.cpp
*
* @date : 03.10.2012
* @author: m1ch1
*/
#include "TCP.h"
namespace apps
{
using boost::asio::ip::tcp;
using namespace std;
TCP::TCP(unsigned int port) //server
{
_choosenMode = server;
_port = port;
_delay = 2000000;
_requestNewConnection = false;
_server = new tcp::acceptor(... |
7d88cb8c7e8ef7bb2e3605a39a507b60d691d2cb | b396a216b79244b8caa3fd566c2c68518e50a138 | chumaknadya/KPI | /courseWork1/qwordcompleter.cpp | C++ | cpp | 2,495 | no_license | #include "qwordcompleter.h"
#include <QEvent>
#include <QKeyEvent>
#include <QAbstractItemView>
#include <QTextEdit>
#include <QTextCursor>
QWordCompleter::QWordCompleter(const QStringList &completions, QObject *parent):
QCompleter(completions,parent)
{
}
QWordCompleter::~QWordCompleter()
{
}
bool QWordComple... |
6794a1d153cd7040f31d4cb64803fdc898e6917a | 2cf9931c9479518e75ab5d1b2b094405294b50f3 | segafan/wme1_jankavan_tlc_edition-repo | /src/scite/scite/win32/DirectorExtension.cxx | C++ | cxx | 7,911 | permissive | // SciTE - Scintilla based Text Editor
/** @file DirectorExtension.cxx
** Extension for communicating with a director program.
**/
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#i... |
004f2993c8e7666f0b73e51da32ea05bd2ccfd5b | f38468301d947e68d10b79cfe14929bd1c957542 | sokanaid/ABS_HomeWork1_Sokolova | /plane.cpp | C++ | cpp | 1,090 | no_license | //
// Created by Diana on 23.09.2021.
//
#include "plane.h"
double IdealTime(plane &p) {
return ((double) p.distance) / p.speed;
}
// Вывод параметров самолета в поток
void Out(plane &p, ofstream &ofst) {
ofst << "It is a plane: flight range = "
<< p.flightRange << ", lifting capacity = " << p.lifti... |
cfb9be44beafbe3c1dbe2011777b1fcbdf731a88 | 9d576b1b629b8b58660f90556facf2b323a738da | pavankoka1/Competetive-Coding | /codes/gfg-Sorting Elements of an Array by Frequency.cpp | C++ | cpp | 902 | no_license | #include<bits/stdc++.h>
using namespace std;
bool func(const pair<int,int> &a,const pair<int,int> &b)
{
if(a.first==b.first)
return (a.second<b.second);
return (a.first>b.first);
}
int main()
{
// freopen("input.txt","r",stdin);
int t;
cin>>t;
while(t--)
{
int n,x;
cin>>n;
pair <int,... |
a3de9440526aa016dd8456afa93b02d2c147eccd | b3a62ade01483e0be2eb85dc5431563bc5ff6cbf | rivamazov/school | /240/vector/main.cpp | C++ | cpp | 3,225 | no_license | #include "vector.h"
#include "generator.h"
#include <iostream>
int main()
{
vector<int> vct;
generator gen(-35,40);
for (int i=0;i<45;i++)
{
vct.pushBack(gen());
}
std::cout << "max sum subarray = " << vct.maxSumSubArray()
<< std::endl;
/*
vector<double> vct;
vct.pushFront(1.1);
vct.p... |
89b38b0b2651552be287eaee4e5039a104edd4ad | b687f2a967826c4879461498b35b0973f2213a41 | sDeemm/dmedia-server | /lib/tests/main.cpp | C++ | cpp | 242 | no_license | #include "RessourceManager.h"
#include <iostream>
int main(int argc, const char** argv)
{
RessourceManager* m = RessourceManager::getInstance();
m->Start();
m->SetRoot("/home/deemm/Desktop");
m->Stop();
return 0;
}
|
687bd865200bf6a903768cd263f863091ce1deca | 0a2bf7ba4cad8126a9b2f7a77ccc1e386daeabca | Bang3DEngine/BangGraphics | /src/AspectRatioMode.cpp | C++ | cpp | 1,001 | no_license | #include "BangGraphics/AspectRatioMode.h"
#include "BangMath/Math.h"
#include "BangMath/Vector2.h"
using namespace Bang;
Vector2i AspectRatio::GetAspectRatioedSize(const Vector2i ¤tSize,
const Vector2i &targetSize,
AspectRati... |
aeb43be82476ef909b22e558e8f26bc24b7fb667 | f007947ac9c8138020cc17c454dc6a079a56ab36 | autumn-na/spelunker | /Classes/ending.cpp | C++ | cpp | 10,344 | no_license | #pragma execution_character_set("utf-8")
#include "ending.h"
Scene* EndingtScene::createScene()
{
auto scene = Scene::create();
auto layer = EndingtScene::create();
scene->addChild(layer);
return scene;
}
bool EndingtScene::init()
{
if (!Layer::init())
{
return false;
}
auto visible = Director::getI... |
051faad203546da13fb8ff2075c05784ff9a1bcf | a75f3c5bf357a6f59c4292f7650b2b4fe8095e00 | WhiZTiM/coliru | /Archive2/95/f3f51e17e4b96a/main.cpp | C++ | cpp | 297 | no_license | #include <iostream>
unsigned char t[] = "ي";
unsigned char m0 = t[0];
unsigned char m1 = t[1];
int main()
{
std::cout << t << std::endl;
std::cout << (int)t[0] << std::endl;
std::cout << (int)t[1] << std::endl;
std::cout << m0 << std::endl;
std::cout << m1 << std::endl;
}
|
3d884e6cf685ca301159a74f3456681ff0d165b4 | 7dfe713d3ab7e3dc0090f757c5dfd04be8af4f31 | Bustedblah/opencv | /modules/gpufilters/test/test_precomp.hpp | C++ | hpp | 2,627 | no_license | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
a1a56232d65ae7801f96d8c12f1b0dbd58eac7cc | a25ee199ffb221a9f26ea96cd46da0383da48755 | Samsung/Castanets | /net/nqe/network_quality_store_unittest.cc | C++ | cc | 16,421 | 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 "net/nqe/network_quality_store.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/simple_test_tick_clock.h"
#include "ba... |
a4c772f8938b7a4057154669b8c4cb7dc6bbb9ad | 9f4fc68cf6a9a8da79b26884602754d4ef7b1d70 | kohnakagawa/md_neighbor_list | /neighlist_cpu.hpp | C++ | hpp | 14,813 | permissive | #pragma once
#include <cassert>
#include <vector>
#include <numeric>
template <typename Vec>
class NeighList {
enum : int32_t {X = 0, Y, Z};
int32_t mesh_size_[3], number_of_mesh_ = -1;
Vec ms_, ims_;
double search_length_ = 0.0, search_length2_ = 0.0;
int32_t number_of_pairs_ = 0;
int32_t* particle_po... |
d5b2938d4e953e30ada6dc9a0e6d1d472147e506 | 461879f423b4368660cc3b14cb046f8046cc9756 | rushioda/PIXELVALID_athena | /athena/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorRegion.cxx | C++ | cxx | 4,097 | no_license | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
//## begin module%1.7%.codegen_version preserve=yes
// Read the documentation to learn more about C++ code generator
// versioning.
//## end module%1.7%.codegen_version
//## begin module%44957D640109.CLHEP::cm preserve=no
// %X% %Q%... |
305c8d3a717365325c4152e56cd289de7d326ac4 | 27c7f83fd5e9aa92e35316ad43fe1092953e6225 | qbolec/c | /ziomal.cpp | C++ | cpp | 798 | no_license | #include <iostream>
#include <map>
using namespace std;
long long int n,k;
map<long long int, long long int> m;
long long int calc(long long int n, long long int k) {
cout << "VIS" << n << " , " << k << endl;
long long int val, l;
map<long long int, long long int>::iterator poz;
if ((poz = m.find(n)) != m.end... |
27b11e3a3e2e4ff3246d739b5e791faaddc2ad13 | 1fdd351b3a63aea89df8b4eb6e78612550f9dc2e | ClarkMcGrew/edep-sim | /src/captain/CaptWorldBuilder.cc | C++ | cc | 5,163 | permissive | #include "EDepSimBuilder.hh"
#include "CaptWorldBuilder.hh"
#include "CaptCryostatBuilder.hh"
#include <globals.hh>
#include <G4Material.hh>
#include <G4LogicalVolume.hh>
#include <G4VPhysicalVolume.hh>
#include <G4PVPlacement.hh>
#include <G4VisAttributes.hh>
#include <G4VisExtent.hh>
#include <G4SystemOfUnits.hh>
#... |
c3fa0f7b69ae683c394750d89ee1fc69cc16798c | 6b32b4bf6ff0fc8ec8ee95213961bf4fc2b63ce0 | cris-ronaldo7/Competitive-programming | /HackerRank/C++/Introduction - Functions.cpp | C++ | cpp | 429 | no_license | #include <iostream>
#include <cstdio>
using namespace std;
int max_of_four(int a, int b, int c, int d)
{
if(a>b && a>c && a>d)
return a;
else if (b>a && b>c && b>d)
return b;
else if (c>a && c>b && c>d)
return c;
else return d;
}
int main() {
int a, b, c, d;
scanf("%d %... |
bcf3a18bdd76fe5bd12874fb953763acf8f6ea26 | 45f59619cfa0ecc9594ea889230f0093a08fa0ca | arpit353/DSA-Codes | /Bit Hacks/1.3 Add 1 to a given integer.cpp | C++ | cpp | 534 | no_license | #include <iostream>
#include <bitset>
using namespace std;
/*
The expression -~x will add 1 to a given integer. We know that to get negative of a number, we invert its bits and add 1 to it (Remember negative numbers are stores in 2’s compliment form). i.e.
-x = ~x + 1;
-~x = x + 1 (by replacing x by ~x)
*/
int ma... |
60af21a3bc95b342ae28e0941f101e7e724b0fc7 | 24ff1abf2e16e9f1a5ed3646fee8aedaf7abec7d | zekefromnextweek/Cse-100-Algorithms- | /lab 1/InsertionSort.cpp | C++ | cpp | 2,489 | no_license | #include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
void insertion(int *arr, int start, int end)//started with insertion because it was easier for me
{//also using the variables p q and r confused me so I made them start and end
for (int j = start; j < end; j++)
{
int key ... |
2a5057db71e8fdd4d191be365a46d10eee4aa51f | 2a2a68be7845c6dd92884f4a16baa4e8e819336c | XHXaiXXR/code | /数据结构/堆的应用/test.cpp | C++ | cpp | 1,181 | no_license | #define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
#define N 1000
#define K 20
//向下调整
void AdjustDown(int* a,size_t size,int parent)
{
int child = 2 * parent + 1;
while (child < size)
{
//建立小堆
if (((child + 1) < size)
&&(a[child+1] < a[child]))
{
child++;
}
if (a[child] < a[... |
f40c19c11680f5db1c08a2146e3a338fa7e1dc9b | 1998dd397c0c7ef645cf3a72c2666d6bce440cca | leafeonia/leetcode | /C++/code/1235_.cpp | C++ | cpp | 1,079 | no_license | class Solution {
public:
struct Job {
Job(int s, int e, int p): s(s), e(e), p(p) {}
int s, e, p;
bool operator < (Job& j) {return e < j.e;}
};
int jobScheduling(vector<int>& startTime, vector<int>& endTime, vector<int>& profit) {
vector<Job> v;
int n = startTime.... |
eefbc36b9aba025e8b9a8a93ee1091483367746e | d99fab7b552a1df9322f2226e044147b16b5d2cf | teresalasarow/DYOD_WS1920 | /src/lib/storage/table.hpp | C++ | hpp | 2,688 | permissive | #pragma once
#include <limits>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <utility>
#include <vector>
#include "base_segment.hpp"
#include "chunk.hpp"
#include "type_cast.hpp"
#include "types.hpp"
#include "utils/assert.hpp"
namespace opossum {
class TableStatistics;
// A table i... |
a6ba7bc8b51fe6c3571abe3b875d1d0e1407a192 | ec626da4dceeff78d9a6f418950c33a44e36b316 | grishutenkopavel/cpp-projects | /volleyball/include/player.hpp | C++ | hpp | 314 | no_license | #ifndef PLAYER_HPP
#define PLAYER_HPP
#include <SDL2/SDL.h>
#include "ball.hpp"
class Player : public Ball
{
public:
bool isJump = false;
bool isRight;
bool isLeft;
Player(float x, float y, float dx, float dy, float r);
void playerMove(float wl1, float wl2);
};
#endif |
219f9e227795faa6b922fe628180fbb786e3fd09 | 8ca86c1307020c76b3e95cf0817b4189332dcda9 | hodayasr/cpp-social_network | /Member.cpp | C++ | cpp | 1,794 | no_license | #include <iostream>
using namespace std;
#include <map>
#include <iterator>
#include "Member.h"
static int MemberID=0;
// Member : constructor
Member::Member()
{
MemberID++;
this->id=MemberID;
}
// Member : disturctor
Member:: ~Memb... |
e5fb3f5c603bd9c56ea9be11a5325b8b3d71d738 | e5bbb71603c6dad3dd84a694d225dc2c78155b0f | mariankh/disambiguation | /graph/rgraph_clustered.cc | C++ | cc | 1,164 | no_license | #include <iostream>
#include "rgraph.h"
namespace mico {
namespace graph {
rgraph_clustered::~rgraph_clustered() {
for(int i=0; i<clusters.size(); i++) {
delete clusters[i];
}
}
void rgraph_clustered::reserve_vertices(int re) {
rgraph::reserve_vertices(re);
clusters.reserve(... |
c95f953caac9b2a55654b329ab113792194c57c2 | ee5613edcb83afdac17e2154b052219747a86ea3 | LowikC/AlgoCpp | /src/QueueUTest.cpp | C++ | cpp | 349 | no_license | #include "gtest/gtest.h"
#include "Queue.hpp"
TEST(QueueTest, FIFOOrder) {
Queue<int> queue;
queue.enqueue(1);
queue.enqueue(2);
queue.enqueue(3);
queue.enqueue(4);
ASSERT_EQ(queue.dequeue(), 1);
ASSERT_EQ(queue.dequeue(), 2);
}
TEST(QueueTest, InitiallyEmpty) {
Queue<int> queue;
A... |
29e19450f63d4d1e2547de9fcdc24b7f0c024c0f | 6ca6a66841346655d65efb9a1cdc7ab18f9481bb | the-moisrex/webpp | /benchmarks/common_utils_pch.hpp | C++ | hpp | 1,293 | permissive | // Created by moisrex on 9/23/20.
#ifndef WEBPP_COMMON_URILS_PCH_H
#define WEBPP_COMMON_URILS_PCH_H
#include <algorithm>
#include <random>
#include <string>
template <typename StrType = std::string>
static StrType
str_generator(std::size_t size = 10000,
std::string_view chars = "abcdefghijklmnopq... |
eabeaaf3450da63fb0cdf26729fa29ffd1a3a7c8 | 2a456cbd24d5b8726f842d2582fc3b30fbc53f9d | gauravsaxena81/GraphIVM | /dbtoaster/dbt_c++/qJoinLength.cpp | C++ | cpp | 3,415 | no_license | #include "qJoinLength.hpp"
#include <chrono>
namespace dbtoaster{
class CustomProgram_1 : public Program
{
public:
void process_stream_event(const event_t& ev) {
//cout << "on_" << dbtoaster::event_name[ev.type] << "_";
// cout << get_relation_name(ev.id) << "(" << ev.data <... |
06e81465afab52d3c64b830e67fead4355d8fd2a | c671ef85a013a22c04ee43c38d3bd2db8d1d47b6 | warthan07/Nemaktis | /BeamPropagationSolver/src/UtilitiesLib/VectorField.cpp | C++ | cpp | 10,763 | permissive | #include <complex>
#include <algorithm>
#include <muParser.h>
#include "VectorField.h"
#include "error.h"
template <typename T>
VectorField<T>::VectorField(CartesianMesh mesh, int field_dim) :
n_vertex(mesh.Nx*mesh.Ny*mesh.Nz),
field_dim(field_dim),
mesh(mesh),
vals(n_vertex * field_dim),
interp_weigths(2*mesh.N... |
8d91d561fb46771e8408fbe83499736a20983a01 | 80f92e671a4c3767fe5b9fdebaa19722a44b080d | pqrs-org/BulletGBA | /bulletgba/generator/data/code/daiouzyou/round_1_boss.cpp | C++ | cpp | 29,263 | permissive | // XXX uniqID XXX 8c03e1e3ec43eff5090bf4ebc25e17fa XXX
#include <gba_types.h>
#include "bullet.hpp"
#include "fixed.hpp"
#include "daiouzyou/round_1_boss.hpp"
extern const BulletStepFunc bullet_45b986a5683067ed55c84ace35d36666_8c03e1e3ec43eff5090bf4ebc25e17fa[] = {
stepfunc_b3cbae910228c1889d877249b37afba0_8c03e... |
be843025a4e42b6e33194bfcf8ba58d265f2bcc9 | 3c6cf1c7f4fdf3f8d29ae5e2ddb52e2c2787e8b3 | jasveen18/CP-krle-placement-lag-jayegi | /InterivewBit/15 Graphs/4SnakeLadders.cpp | C++ | cpp | 1,257 | no_license | /******************************************
* AUTHOR : ARPIT *
* NICK : arpitfalcon *
* INSTITUTION : BIT MESRA *
******************************************/
// Problem Statement - Snake and Ladders
int Solution::snakeLadder(vector<vector<int> > &A, vector<vector<int> > &B) {
vector<int> arr(102, 0);
for (aut... |
55bad39ec97580b56bb9f4c3d9332b41a201f537 | ac37e90d44869daf3e548aa671449f02e2b03fb8 | ssyram/RulesTranslator | /RulesTranslator/core/TableGenerator.cpp | C++ | cpp | 20,668 | no_license | //
// TableGenerator.cpp
// RulesTranslator
//
// Created by 潇湘夜雨 on 2018/11/19.
// Copyright © 2018 ssyram. All rights reserved.
//
#include "TableGenerator.h"
#include "../object/ProductionWithDoc.h"
#include "../util/UtilFunctions.h"
#include "../object/CounselTable.h"
#include <unordered_set>
#include <sstream... |
3eb362ac25d937e1bdc8d26c6859af7e663a7547 | d1cca624766443498e41229fb9c7c0fa1d2aa4a6 | darwikey/PFA-2D-3D | /Prototype/Loaderv3/Prototype/Camera.hpp | C++ | hpp | 274 | no_license | #ifndef CAMERA_HPP
#define CAMERA_HPP
#include <QtOpenGL>
class Camera
{
public:
Camera();
GLfloat fRotationX;
GLfloat fRotationY;
GLfloat fRotationZ;
GLfloat fMoveUpDown;
GLfloat fMoveLeftRight;
GLfloat fMoveInOut;
};
#endif // CAMERA_HPP
|
bebdca4dffd85eb3c098c10d1c888ab85d46bf3b | 63134723f0c095691333644458322160cabaa951 | inada-s/procon | /atcoder/abc168/D/main.cpp | C++ | cpp | 1,428 | no_license | #include <bits/stdc++.h>
using namespace std;
#define loop(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < n; ++i)
#define dump(a) cerr << #a << " = " << (a) << "(L:" << __LINE__ << ")" << endl
const string YES = "Yes";
void solve(long long N, long long M, std::vector<long long> A,
... |
d62a4578ca4289397bdafa2febb10b1934c1c752 | 72515751799a9cef3c8c2335177941a8d2da690d | veldrinlab/ayumiEngine | /AyumiEngine/AyumiEngine/AyumiRenderer/SpotLight.hpp | C++ | hpp | 735 | no_license | /**
* File contains declaration of SpotLight structure.
* @file SpotLight.hpp
* @author Szymon "Veldrin" Jabłoński
* @date 2011-05-13
*/
#ifndef SPOTLIGHT_HPP
#define SPOTLIGHT_HPP
#include <string>
#include "LightType.hpp"
#include "LightSourceParameters.hpp"
namespace AyumiEngine
{
namespace AyumiRen... |
269a47e692d720bf4d8e467b691430c822186f27 | 022efaeb8bba0f278201550878cdb52e36ea0df1 | marco-c/gecko-dev-comments-removed | /third_party/libwebrtc/test/mappable_native_buffer.cc | C++ | cc | 5,720 | permissive |
#include "test/mappable_native_buffer.h"
#include "absl/algorithm/container.h"
#include "api/video/i420_buffer.h"
#include "api/video/nv12_buffer.h"
#include "api/video/video_frame.h"
#include "api/video/video_rotation.h"
#include "common_video/include/video_frame_buffer.h"
#include "rtc_base/checks.h"
name... |
0396d02eed5d5245e4934f9eca518d3ab01030b9 | f66e22f4276cc82bf5c0c69470ff850076410e63 | DavidTheFighter/StarlightEngine | /Engine/StarlightEngine.cpp | C++ | cpp | 20,264 | permissive | /*
* MIT License
*
* Copyright (c) 2017 David Allen
*
* 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, mo... |
fb045fbc96f3428dcf65976bed4a82a67d29a55f | fe350542a627f13a12697780489991b2b7c929fa | VolianTrains/AS | /src/ZeroCV2T.cpp | C++ | cpp | 7,180 | permissive | //**************************************************************************************
//CV to Trigger convenrter module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS
//
//
//**************************************************************************************
#include "AS.hpp"
#inclu... |
2fb7c47dee2adb99b8b7d4d15f98dbb14cb510a7 | f1f5435d4d5d5b23e9a2d5b7380d60086448f618 | dtbinh/sedgewick_cpp | /src/sparse_vector_main.cpp | C++ | cpp | 444 | no_license | #include "Sparse_vector.h"
#include "Std_out.h"
int main(int argc, char* argv[])
{
Sparse_vector a{10};
Sparse_vector b{10};
a.put(3, 0.50);
a.put(9, 0.75);
a.put(6, 0.11);
a.put(6, 0.00);
b.put(3, 0.60);
b.put(4, 0.90);
Std_out::print_line("a = " + a);
Std_out::print_line("b = ... |
644114155dd33192d7c9ec04de8d5b458b70bd0a | def41cf24cc1e84cc09075b3404010b6a826ec06 | chuxuantinh/C-PLUS | /FractionToRecurringDecimal.cpp | C++ | cpp | 806 | no_license | class Solution {
public:
string fractionToDecimal(int numerator, int denominator) {
if (!numerator) {
return "0";
}
string ans;
if (numerator > 0 ^ denominator > 0) {
ans += '-';
}
long n = labs(numerator), d = labs(denominator), r = ... |
0b910b666314576d6f4d757382f4dba7f149f48b | 2a9676202aa239f6bfafa529562d663ef1eb482c | Jyunpp/Algorithm | /Codeforce_Educational/Round29_ProbA.cpp | C++ | cpp | 619 | no_license | //20170922 ´ëȸ½Ã°£ 00:05 ~ 02:05
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#define xx first
#define yy second
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <memory.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <math.h>
using ... |
6d989f17230e92c259b0afee472680324297697b | 294b631966ee09d4782c23d4268fcdeea70ccd56 | TeamVault/tauCFI | /C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-1901.cpp | C++ | cpp | 2,495 | no_license | struct c0;
void __attribute__ ((noinline)) tester0(c0* p);
struct c0
{
bool active0;
c0() : active0(true) {}
virtual ~c0()
{
tester0(this);
active0 = false;
}
virtual void f0(){}
};
void __attribute__ ((noinline)) tester0(c0* p)
{
p->f0();
}
struct c1;
void __attribute__ ((noinline)) tester1(c1* p);
struct c1
{
bool ac... |
7f8d7da803fb1fa991ff1f8c86f0a8258eb21cde | 108e80448a06e89f43b6ee2ed5f10027bc0ede92 | luisfbgs/lego | /assembler/helpers/split.hpp | C++ | hpp | 1,208 | no_license | #ifndef SPLIT_H
#define SPLIT_H
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* INCLUDES AND DEFINES
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
#include <sstream>
#include <vector>
#include <iterator>
namespace... |
22517d8068ec291f33410f91044e904d675643fc | fb04b11b020b8a555c883d284223359310c0f360 | truong02bp/C- | /BTC++/bai103/bai103.cpp | C++ | cpp | 912 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void Display(vector<long long> a, long long n)
{
bool check[15];
vector<int> kq;
for (int i=0;i<=9;i++)
check[i]=false;
for (long long i=0;i<n;i++)
{
while (a[i]>0)
{
int temp = a[i]%10;... |
4ab44ed98cbe83c75b84203a56312b9721acd3ba | 4e19ef9946b1a82207686d50ce1c52351fdeee84 | wpilibsuite/allwpilib | /wpimath/src/main/native/thirdparty/gcem/include/gcem_incl/trunc.hpp | C++ | hpp | 2,598 | permissive | /*################################################################################
##
## Copyright (C) 2016-2022 Keith O'Hara
##
## This file is part of the GCE-Math C++ library.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance... |
90dc6caffe914b222db373ac288ae0401d746e95 | de4a87ae489b8ca01dee644df4200fc27874de21 | cramja/quickstep | /utility/textbased_test/TextBasedTest.cpp | C++ | cpp | 1,085 | permissive | /**
* Copyright 2011-2015 Quickstep Technologies LLC.
* Copyright 2015 Pivotal Software, 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... |
b9766c25dd860c15d00f21d3e6e5a59ff878e196 | f9dd9bb320a0f1ff55d6fe02a3a5774805e49ec5 | uel-dataexchange/Opencascade_uel | /inc/TopOpeBRepTool_SC.hxx | C++ | hxx | 1,090 | no_license | // File: TopOpeBRepTool_SC.hxx
// Created: Wed Apr 1 15:25:56 1998
// Author: Jean Yves LEBEY
// <jyl@langdox.paris1.matra-dtv.fr>
#ifndef _TopOpeBRepTool_SC_HeaderFile
#define _TopOpeBRepTool_SC_HeaderFile
#include <TopOpeBRepTool_define.hxx>
#include <TopOpeBRepTool_ShapeClassifier.hxx>
#include <TopOpe... |
2a525ca20d661a42f29f527f8b4dd49fc618d879 | 28c8a4d5463f322d73403ebca9fca8cc40e200d4 | trantorrepository/vixen | /src/physics/havok/physics.cpp | C++ | cpp | 13,731 | permissive | #include "vixen.h"
#include "physics/havok/vxphysics.h"
#include "physics/havok/vxcloth.h"
#include <Common/Base/KeyCode.h>
#include <Common/Base/KeyCode.cxx>
#define HK_EXCLUDE_FEATURE_CompoundShape
#define INCLUDE_HAVOK_PHYSICS_CLASSES
#define INCLUDE_HAVOK_ANIMATION_CLASSES
#define INCLUDE_HAVOK_CLOTH_CLASSES
#de... |
00261c3aca9d59d129966e04f1e6e39ed7e3e291 | 0f7c1253db03a90c1b900cac8f2e9b68a7a52f50 | Trisoil/Regards | /libextern/wxWidgets-master/src/gtk/spinbutt.cpp | C++ | cpp | 6,220 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/spinbutt.cpp
// Purpose: wxSpinButton
// Author: Robert
// Modified by:
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////... |
5f3a43723b6868b21735280b99db8d4445bc883f | bc2dedabf351268317d4eb23211b3ebc116fb4c6 | C2H6O/Quadcopter | /Arduino/sketchbook/libraries/Gyroscope/ITG3200.cpp | C++ | cpp | 3,805 | no_license | #include "ITG3200.h"
#include "Arduino.h"
#include "Device_I2C.h"
#include "GlobalDefined.h"
float gyroRate[3] = {0.0,0.0,0.0};
//float gyroRateDegrees[3] = {0.0,0.0,0.0};
int gyroZero[3] = {0,0,0};
long gyroSample[3] = {0,0,0};
float gyroSmoothFactor = 1.0;
float gyroScaleFactor = 0.0;
float gyroHeading = 0.0;
un... |
6ff673d165f6f9682fcb80be52c97ebcb78e0a6b | 806dde628a4410f01790379a62addd59a44c086d | PayvandH/Tonb | /TnbMarineBase/TnbLib/MarineBase/BooleanOps/Marine_BooleanOps.cxx | C++ | cxx | 13,638 | no_license | #include <Marine_BooleanOps.hxx>
#include <Cad2d_Boolean.hxx>
#include <Marine_SectTools.hxx>
#include <Marine_CmpSection.hxx>
#include <Marine_Section.hxx>
#include <Marine_Sections.hxx>
#include <TnbError.hxx>
#include <OSstream.hxx>
std::shared_ptr<tnbLib::Marine_Section>
tnbLib::Marine_BooleanOps::Union
(
const ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.