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 |
|---|---|---|---|---|---|---|---|---|
4fb946a69a26e9b258c98f93fa08f841f03a6f45 | 02bdc61d6a252888a151bc9e8843ed9b4eb31f4c | lasfar1008/inetmanet-2.0 | /src/networklayer/manetrouting/base/ManetRoutingBase.cc | C++ | cc | 45,215 | no_license | /***************************************************************************
* Copyright (C) 2008 by Alfonso Ariza *
* aarizaq@uma.es *
* *
* This pr... |
86a510db855bda2887637cc23bebb3d3377a63be | 6dba5996064cb2864573e2c6385e8801da79fc23 | Lawrenceh/AC_Monster | /Google/OJ - leetcode/322. Coin Change.cpp | C++ | cpp | 505 | no_license | /* dp */
class Solution {
public:
int coinChange(vector<int>& coins, int amount) {
int n = coins.size();
vector<int> dp(amount + 1, amount + 1);
dp[0] = 0;
for (int i = 1; i <= amount; i ++) {
for (int j = 0; j < n; j ++) {
if (coins[j] <= i) {
... |
c230b14aa101d07fe3cb3f54c81995641098ca35 | 784580f603c2c3f59a6778419635b30d6c0b6acc | Johniel/contests | /codeforces/720div2/B/main.cpp | C++ | cpp | 2,289 | permissive | // codeforces/720div2/B/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first... |
09943c0597f2cc2c801a992a624418b8d53e6e40 | c6ea216584d06f37820d51f20dbf9221dd9848c7 | monjurul0007/UVa-problem-solves | /UVa-11902 Dominator.cpp | C++ | cpp | 1,729 | no_license | #include <bits/stdc++.h>
using namespace std;
bool adj[100][100];
bool vis[100];
bool tempVis[100];
void dfs(int s, int n){
vis[s] = 1;
for(int i=0; i<n; i++)
if(adj[s][i] && !vis[i]){
vis[i] = 1;
dfs(i,n);
}
}
void dfs(int s, int target, int n){
if(s == target)
... |
9ce3c57a289b39df476b6adf7b279fd9cc00f434 | e97e84b8b537cbe99a380381a091504fbb9512fc | hanakita114514/RRMProject | /Project/RRMProjectR/RRMProject/FoodFactory.cpp | C++ | cpp | 4,474 | no_license | #include "FoodFactory.h"
#include "GraphicLoad.h"
#include "GeneralFood.h"
FoodFactory::FoodFactory()
{
GraphicLoad& gl = GraphicLoad::Instance();
_handleMap[FoodType::banana] = gl.LoadGraph("Resource/img/Food/banana.png");
_handleMap[FoodType::beaf] = gl.LoadGraph("Resource/img/Food/beaf.png");
_handleMa... |
f00f1b41d779d31a3534e7b6cfcfd8311f8eb71c | 379dcb67acf4fffda76250f512100d7407e8e835 | wso277/cgra-project1 | /src/Plane.cpp | C++ | cpp | 2,336 | no_license | #include "Plane.h"
#include "MyUnitCube.h"
#include <GL/glu.h>
Plane::Plane(void)
{
_numDivisions = 1;
delta = 0;
dominio = 1;
}
Plane::Plane(int n, double delta, double dominio)
{
_numDivisions = n;
this->delta = delta;
this->dominio = dominio;
}
Plane::~Plane(void)
{
}
void Plane::draw()
{
glPushMatrix()... |
e77bc5de897dfbc7e5dc957aca6389b69cdc59cd | 2c3a28de5a48ef01b5f84cf0ca79e469bc0e9be8 | frcepeda/Contest-Archive | /HackerRank/HourRank 17/C.cpp | C++ | cpp | 1,303 | no_license | #include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 100010;
int n, m, q;
int a[maxn], b[maxn];
bool ad[maxn], bd[maxn];
vector<int> ddd[maxn];
int d[maxn];
void ddds(int *s, int *e, bool r[maxn]){
for (; s != e; s++)
for (auto z: ddd[*s])
r[z] = true;
}
void go(int x){
if (!ddd[x].em... |
92ca8688c11c1d0ed64225dc55b7e47418c692b0 | 610d1c3d8988c31b580fa23dafca70744513a718 | Tosotada/android-8.0.0_r4 | /external/swiftshader/src/OpenGL/libEGL/libEGL.cpp | C++ | cpp | 29,863 | permissive | // Copyright 2016 The SwiftShader 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 b... |
a44205c0842b54064720971cc228a591ec893ee3 | f6dc926763fd0822722786f942d15305a69cfa04 | vmax77/Karabiner-Elements | /src/core/grabber/include/device_grabber.hpp | C++ | hpp | 15,596 | permissive | #pragma once
#include "apple_hid_usage_tables.hpp"
#include "console_user_client.hpp"
#include "constants.hpp"
#include "event_dispatcher_manager.hpp"
#include "event_manipulator.hpp"
#include "hid_system_client.hpp"
#include "human_interface_device.hpp"
#include "iokit_utility.hpp"
#include "logger.hpp"
#include "man... |
91e8acaff385202676fe8089a369437a83c1690a | 7bc2f0a06ba587210b2260cfec44f36b6602ff8b | Adriannguyen/LTNC | /BTVN/TEST01/AVeryBigSum2.cpp | C++ | cpp | 228 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
long long int sum=0;
cin >> n;
vector<int> a(n);
for (int i=0; i<n; ++i){
cin >> a[i];
sum += a[i];
}
cout << sum;
}
|
90ce94b7d689acea6a3bd0299b7a468498a1d79d | de6df6baed29e0cdf448d4246fd24c612f6ee4de | Featherlet/Algorithm_and_Leetcode | /Leetcode_Cpp/pro2.cpp | C++ | cpp | 1,381 | no_license |
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(nullptr) {}
};
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
ListNode *head;
ListNode *tail = nullptr;
head = tail;
int flag = 0;
while (l1 != nullptr || l2 != nullptr) {
if (l1 == nul... |
bf81b068af6f6e50f7c761389e95959140fd0b9f | c20a74fb7e615e04dc5ebed6947cb9d1c0e6877f | fireword/llvm | /lib/Target/ARM/ARMBaseRegisterInfo.cpp | C++ | cpp | 31,649 | permissive | //===-- ARMBaseRegisterInfo.cpp - ARM Register Information ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
c2eb9c6ec686016c334f4ad0fc7db5c88e67184e | b7e999caef8e7ecd345f49405f4f0f62ac116ac7 | anuragaryan/Competitive-Programming | /kattis/8queens.cpp | C++ | cpp | 722 | permissive | #include<iostream>
#include<string>
using namespace std;
int main(){
bool flag=true;
int queen=0;
string row[8];
for(int i=0;i<8;i++)
cin>>row[i];
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
if(row[i][j]=='*'){
queen++;
for(int a=0;a<8;a++)... |
871dd01b184d0185ad70baa4e419f0f2ee8eef74 | d33bba0b49976fd07518d87bfe248ef7a041951d | zepthro/CPSC3600 | /pinstats/density.cpp | C++ | cpp | 294 | no_license | #include<bits/stdc++.h>
#include <stdio.h>
using namespace std;
int main() {
string temp;
int sol = 0;
while (cin >> temp) {
if (string::npos != temp.find("time=")) {
sscanf(temp.c_str(), "time=%d", &sol);
cout << sol << endl;
}
}
} |
3f08bda543c16ae7982fd87d8d78b1d4f2a0ca62 | e05dbd5bfe9d26ee0adb5cd237489621588d4096 | RoyLab/dxsimhair | /CGALTest/main.cpp | C++ | cpp | 3,417 | no_license | #define _CRT_SECURE_NO_WARNINGS
#define CGAL_EIGEN3_ENABLED
#include <CGAL/Epick_d.h>
#include <CGAL/point_generators_d.h>
#include <CGAL/Kd_tree.h>
#include <CGAL/Fuzzy_sphere.h>
#include <CGAL/Fuzzy_iso_box.h>
#include <CGAL/Search_traits_d.h>
#include <list>
#include <boost/timer/timer.hpp>
#include <windows.h>
#... |
585f760e63425c111b718480e060617ae878ab4e | e5def5553a3570a461a67660ee965e9a174537e5 | carolinajimenez26/Competitive-programming | /Algorithms/radixSort.cpp | C++ | cpp | 1,064 | no_license | #include<vector>
#include<iostream>
#include<cmath>
#include<numeric>
#include<algorithm>
using namespace std;
vector<int> SortByDigit(const vector<int>& data, const int base) {
vector<int> freq(10);
for (auto it : data) {
freq[(it / base) % 10]++;
}
vector<int> pos_by_digit(10);
partial_sum(freq.begi... |
3605548b007c250844bf66aac7b6507fd2edd165 | 2dddf416e57fb97f978e9ed5b304dcdb27356a37 | timn/fawkes | /src/tools/beep_daemon/qa/qa_remote_beep.cpp | C++ | cpp | 2,034 | no_license |
/***************************************************************************
* qa_beep.cpp - Order beep via remote b
*
* Created: Sun Apr 11 22:21:58 2010
* Copyright 2006-2010 Tim Niemueller [www.niemueller.de]
*
****************************************************************************/
/* This progra... |
7ca589ee27217734133f2f950600d2202322aff2 | 21abd73c60ed4fd6f8550c13352fee719362ccec | mkoertgen/hello.wasm | /wasm/src/main.cpp | C++ | cpp | 204 | no_license | #include <iostream>
#include "fibonacci.h"
using namespace std;
int main()
{
cout << "Hello WebAssembly!" << endl;
cout << "Fibonacci of Number 11 is:" << fibonacci(11) << endl;
return 0;
} |
91b54077c6e1fec0accfd7aa39c3070ad6823579 | ec6f1b849f0ed5186dbcf1f08196183f99c176f2 | jiafenggit/cmpp-2 | /cmpp/active.cpp | C++ | cpp | 928 | no_license | #include "stdafx.h"
#include "active.h"
#include "serialization.h"
using namespace comm;
namespace cmpp {
//////////////////////////////////////////////////////////////////////////
// Active
uint32_t Active::commandId() const {
return CommandId;
}
void Active::serialize( StreamWriter& writer ) const {
// Ac... |
d7a3f9988baa43faf22394326361d9eba08f8293 | c667df296fe6708cba22b1d4c09c4dc5edfa2c6d | quora/qmf | /qmf/test/ThreadPoolTest.cpp | C++ | cpp | 994 | permissive | /*
* Copyright 2016 Quora, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
a7837f130cd09cf5246307aefcc5cf4098263058 | 728c086d265b6e28d38bb7d095097564175373bf | levensta/CPP-study | /05 – Exceptions/01 – Form up, maggots!/main.cpp | C++ | cpp | 4,221 | no_license | //
// Created by Lorent Evenstar on 8/21/21.
//
#include "Bureaucrat.hpp"
#include "Form.hpp"
int main() {
try
{
std::cout << "-------------------------------------" << std::endl;
{
Bureaucrat n("Nina", 10);
Form f("Document", 5, 5);
std::cout << "\033[1;33m" << n << "\n\033[0m\033[1;35m" << f << "\... |
8e20c551d015894247a57caffbff04e0a8c636c5 | 60bb780a99a1888d5981b8260cef24f14bc94f72 | ylkky/PreparePAT | /1033.cpp | C++ | cpp | 2,236 | no_license | #include<iostream>
#include<limits>
using namespace std;
#define MAXD cap * cost
#define INFINITY 999999999
struct sta {
double p;
double dist;
};
int cap, des, cost, N;
struct sta *s;
int findFirstMin(int v) {
int i = v, idx = -1;
double dist = s[v].dist, minp = INFINITY;
if (v + 1 < N && s[v + ... |
b63609a051e19466f6676674903bd97c652569d3 | 50d7ba85db855ef4340edf8a82cd48bebd15799d | dbuksbaum/FreeOrion | /FreeOrion/parse/Label.cpp | C++ | cpp | 661 | no_license | #include "Label.h"
namespace parse {
label_rule& label(adobe::name_t name)
{
static std::map<adobe::name_t, label_rule> rules;
std::map<adobe::name_t, label_rule>::iterator it = rules.find(name);
if (it == rules.end()) {
const lexer& l = lexer::instance();
labe... |
d251f252afd70bb2d9d45b5a0bd1f69409e1aa98 | b7037677e9e9bee0857dd2d441cb719874dad560 | AKarunakaran/CodeForces | /Lyft2018/B.cpp | C++ | cpp | 1,845 | no_license | #include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <cstdio>
#include <functional>
#include <num... |
0e9ed75f37fd1896e38b8c41e8162abd2239dfaa | b79ff462076f01a8e839a2edab223d8a6473ef8a | 13606625315/cpp_test | /graph/key_path.cpp | C++ | cpp | 2,234 | no_license | #include <iostream>
#include <queue>
#include <algorithm>
#include <string.h>
#define MAX 101
#define infinity 65535
using namespace std;
int g[MAX][MAX];
int N;
int V;
queue<int> que;
int indegree[MAX];
int early[MAX];
int late[MAX];
int main()
{
cin>>N>>V;
for(int i = 1 ; i <= N; i++)
for(int j = 1 ; j ... |
7f11ad4ea3a8ff3eb71fd9bff4f26855864f57bc | 44b7118bae195fcae25675104180618cc42b890a | fengxieye/Qt-item | /TcpClient/TcpClient.cpp | C++ | cpp | 3,077 | no_license | #include "TcpClient.h"
TcpClient::TcpClient(QObject *parent):
QObject(parent),
m_client(NULL),
m_bConnected(false),
m_bReconnect(false),
m_bChecked(false)
{
m_client = new QTcpSocket();
if(m_client==NULL)
{
qInfo()<<"create tcpsocket client wrong";
return;
}
conn... |
54c2bbc11d77f9fa9fd4eae556fc1f31efa881fd | 909ccdc3fe12b9b036e432d66d5a9c981af65bec | brunolauze/openpegasus-providers-old | /src/Providers/UNIXProviders/tests/UNIXProviders.Tests/UNIX_VirtualSystemManagementCapabilitiesFixture.cpp | C++ | cpp | 3,027 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
d6322c114294b774b1dc33c1221bd67969be65ed | 3e220a70e34bed88332a6a411bf5018b6e85e31e | ganchGra/OOP-Spreadsheet-project-2017 | /Project Speadsheets/CellFormula.cpp | C++ | cpp | 835 | no_license | #include"stdafx.h"
/// Default constructor
CellFormula::CellFormula()
:m_formula()
{}
/// Create new obj from String
CellFormula::CellFormula(const String rhs)
: m_formula(rhs)
{}
/// Create new obj from char array
CellFormula::CellFormula(const char * text)
: m_formula(text)
{}
/* Virtual function from the base... |
0855aedd592c6adadb18dfe965e33a562aa079d9 | 52ee314010aebb7bd159b2d3eef18a7b3750c4c4 | chrzmmr/Laser-interaction-in-fields | /Main Code/Stat_Molecule.cpp | C++ | cpp | 8,706 | no_license | /*
Name:
Copyright:
Author:
Date: 23/10/06 10:01
Description: Paramètres (température, positions, dispersion, moyenne des molécules) (utilisé dans Affichage_Mol.h)
*/
#include "Stat_Molecule.h"
#include <math.h> // Pour log
// sort le tableau nexc du nombre de molécule par niveau nexc[n° ... |
b0fd3fbc31af6d7d7d6452be942dd60b9111d752 | d6c1cb0fefccadfd05bcdd74ec3df8344c2ba3c6 | tesolberg/BusyBoard | /PowerModule.cpp | C++ | cpp | 299 | permissive | ////////////////////
// POWER MODULE //
////////////////////
#include "Arduino.h"
#include "PowerModule.h"
PowerModule::PowerModule()
{
powerOn = false;
poweringUpFinished = false;
}
void PowerModule::runPowerModule()
{
powerOn = true;
//powerOn = digitalRead(powerSwitchPin) == HIGH;
}
|
7dc3251daa9433ddca021ed2d7ac96814f0d3a00 | fadd425e669d29045382c04a114074379e5e5ed0 | aronpammer/swift-clang | /lib/Lex/HeaderSearch.cpp | C++ | cpp | 65,033 | permissive | //===- HeaderSearch.cpp - Resolve Header File Locations -------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
98326222d6115e654cddb743298e2ab81836f12b | d1de8470b064370d24225783bbdebc2cba97232f | galek/LumixEngine | /src/render_test/main.cpp | C++ | cpp | 5,578 | permissive | #include "render_test.h"
#include <QApplication>
#include <qdir.h>
#include "core/blob.h"
#include "core/crc32.h"
#include "core/FS/file_system.h"
#include "core/FS/ifile.h"
#include "core/log.h"
#include "core/profiler.h"
#include "core/resource_manager.h"
#include "core/resource_manager_base.h"
#include "editor/world... |
8c71338b14be1b4726c0b19e79e5809173c10e65 | 650a55bc9a1f357e344e1329932ab210be00485c | rodc87/CityBuilder | /Buildings/Objects/Cone.cpp | C++ | cpp | 1,380 | no_license | #include "Cone.hpp"
Cone::Cone(float r, float h, int q)
: radius(r), height(h), quality(q)
{
bv = new AABB(r*2, r*2, h);
bv->translateOf(-r, -r, 0);
build();
}
void Cone::rebuild(float r, float h, int q)
{
radius = r;
height = h;
quality = q;
build();
}
void Cone::build() const
{
glNewList(list, ... |
29e77ab1b9369f96d3e09f9ce612cb0c2825fa52 | 8cdc32ff3d0ddfc433aa2cb42b266006291d2dff | omassen/AliPhysics | /PWGCF/FLOW/GF/AliAnalysisDecorrTask.cxx | C++ | cxx | 79,796 | permissive | /**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
e24a28a06a5142a16035c68ea791a83686a8e055 | 106d1896e38056d34d8e9db87e619a982f366593 | ak-toktor/Source | /src/key.cpp | C++ | cpp | 6,879 | permissive | // Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2017 The Deviant developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "key.h"
#include "crypto/hmac_sha... |
b8dadf1af7ab0c0b920c2db7f434716f0da686cf | 187ff180f6bcac57d67b8cacb892b242557d28c0 | ivan-kits/skia-opengl-emscripten | /src/chromium/gen/gen_combined/third_party/blink/renderer/core/css/properties/longhands/background_repeat_y.cc | C++ | cc | 3,034 | 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.
// Generated from template:
// core/css/properties/templates/css_property_subclass.cc.tmpl
// and input files:
// ../../third_party/blink/renderer/cor... |
0f6963642f563b18216ff9b76e56398de54356cf | 072ee9f460a8427cb2a66ed37c277ddf72089f8f | ballisticengine/ballistic_lib | /src/core/builders/material/TextureMaterialBuilder.hpp | C++ | hpp | 519 | no_license | #include "AbstractMaterialBuilder.hpp"
#ifndef TEXTUREMATERIALBUILDER_HPP
#define TEXTUREMATERIALBUILDER_HPP
#include <vector>
#include "MaterialPolygon.hpp"
namespace Ballistic {
namespace Core {
namespace Builders {
class TextureMaterialBuilder : public AbstractMaterialBuilder {
... |
9a7f430bf429ed51a3eebbf3828ac4b6ad07326d | 1415f2edeb3c290f793197157518d9e6702b0fad | shashankNREL/amrex | /Src/GeometryShop/AMReX_PolyGeom.cpp | C++ | cpp | 24,303 | permissive |
/*
* {_ {__ {__{_______ {__ {__
* {_ __ {_ {__ {___{__ {__ {__ {__
* {_ {__ {__ {__ { {__{__ {__ {__ {__ {__
* {__ {__ {__ {__ {__{_ {__ {_ {__ {__
* {______ {__ {__ {_ {__{__ {__ {_____ {_... |
77886624c43f574a38ce35632273981d4b0187c7 | cc763d528c599afc51bf72e3b811830197243fa3 | shinjeongmin/Baekzoon-Online-judge | /cpp/문해기/Week13_1_12191619_ShinJeongMin.cpp | C++ | cpp | 3,128 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
void FailureFunction(string P);
bool KMPMatch(string T, string P);
int N, M;
string Puzzle[3000]; // 격자판
int F[3000]; // KMP 알고리즘 실패함수
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin ... |
5cefab14732bce9edbad8c7dd8b21e2114983f04 | 4745e087af7346f5aa7eaf47ca87a080080aa055 | yl3i/Retired | /Codeforces/CF696/C.cc | C++ | cc | 2,042 | no_license | /*************************************************************************
> File Name: C.cc
> Author: Riho.Yoshioka
> Mail: riho.yoshioka@yandex.com
> Created Time: Fri 15 Jul 2016 01:14:27 AM CST
*************************************************************************/
#include <bits/stdc++.h>
typedef long lon... |
e193513c427900140838dd635a8cade100f06eb9 | 113886e540533ee3434d3c585a5e0f0daae3cc30 | tanmay-sinha/cpsolution | /SGIFT.cpp | C++ | cpp | 1,682 | no_license | /*
AUTHOR : TANMAY SINHA
INFORMATION TECHNOLOGY
BIT MESRA ,RANCHI
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ld long double
#define ull unsigned long long int
#define ll long long int
#define SPEED ios_base::sync_with_stdio(fa... |
042fa93bd6374d34407388445acb877b89f2ab70 | f31075daf001437d6953914e7f6b524079f26b52 | unk-1/ElDorito | /ElDorito/Source/Blam/Math/RealMatrix4x3.hpp | C++ | hpp | 570 | no_license | #pragma once
#include "RealPoint3D.hpp"
#include "RealVector3D.hpp"
namespace Blam
{
namespace Math
{
struct RealMatrix4x3
{
float Scale;
RealVector3D Forward;
RealVector3D Left;
RealVector3D Up;
RealPoint3D Position;
RealMatrix4x3();
RealMatrix4x3(const float scale, const RealVector3D &for... |
d894340a2ca68657d8fbd10dff6ad6fa164def48 | ae112a76f9c1db98ada71b59356912431a53fac1 | cjsoft/inyuyao | /18/graph-chromatic/solution_bell.cpp | C++ | cpp | 4,201 | no_license | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <queue>
#include <tuple>
#include <vector>
const int N = 200000;
const int M = N + 11;
const int MOD = (int)1e9 + 7;
int result, n, c, edge_count, a[M], b[M], degree[N], head[N], to[M + M], next_edge[M + M], selected[N], same[N], di... |
269d84bb3a09cbebe5d53b7e4e44c84022c91e61 | 03a51556999f5cd8ed3446b4231abaf5938b147f | KubaM-97/React-native-template | /windows/react_project/MainPage.cpp | C++ | cpp | 415 | no_license | #include "pch.h"
#include "MainPage.h"
#if __has_include("MainPage.g.cpp")
#include "MainPage.g.cpp"
#endif
#include "App.h"
using namespace winrt;
using namespace Windows::UI::Xaml;
namespace winrt::react_project::implementation
{
MainPage::MainPage()
{
InitializeComponent();
auto app = App... |
dd962b7326cb8e0e3b5d40e21a64aae73b6a36b9 | 715772d888b2c94022d6dd7d4564a5e1a72c2521 | RoadoneP/Algorithm | /Baekjoon/LCM,GCF.cpp | C++ | cpp | 407 | no_license | #include<bits/stdc++.h>
#define endl '\n'
#define MAX 50
using namespace std;
int main() {
int m[2];
cin >> m[0] >> m[1];
sort(m, m + 1, greater<int>());
int num;
int gcf = 1; //최대공약수
int lcm = m[0] * m[1]; //최소공배수
while (1) {
if (m[1] == 0) {
gcf = m[0];
break;
}
num = m[0] % m[1];
m[0] = m[1];... |
f4c888102d5fb4fb80a4bb74c437ad7c5d143321 | c1cb3f08f05b0ec78d2c9bde23aa49db1a3ee21c | chinhhi102/GiaiThuat | /NTUcoder/75.cpp | C++ | cpp | 1,887 | no_license | #ifndef competitive_programming_H
#define competitive_programming_H
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <iomanip>... |
8cd263a278c67656ddd9b581ee980376b64b69e4 | 5e5d2eabbd0d6f659be6a5adcaa004b399556fae | alfowzan12/tests | /Player.hpp | C++ | hpp | 1,679 | no_license | //
// Player.hpp
//
#pragma once
#include <stdio.h>
#include <string>
#include "Die.hpp"
#include "GameBoard.hpp"
using namespace std;
class Player {
public:
// default constructor with no name
Player() : playerName("no name"), position(0), die() {
}
// parametrized constructor with name
// player's ini... |
11b3060280ee76c02eaf685fa27324769e10a38a | 30e9b29aca4c44e0b54e0aed6229e7e14f8ae408 | Anas-Salha/Cpp-Learning | /Section020/Challenge_3/main.cpp | C++ | cpp | 2,882 | no_license | // Section 20
// Challenge 3
// Maps and Sets
#include <iostream>
#include <fstream>
#include <sstream>
#include <map>
#include <set>
#include <string>
#include <iomanip>
// Used for Part1
// Display the word and count from the
// std::map<std::string, int>
void display_words(const std::map<std::string, int> &wor... |
7f03fc76fbeedb62871ce102e0a39019e568523c | f41a2621f31a1dfeabc1964cbaa4f95c8e274480 | sngvahmed/Problem | /solving problem/greedy/Stones on the Table.cpp | C++ | cpp | 1,486 | no_license | //http://codeforces.com/problemset/problem/266/A
//Stones on the Table
#include <cstring>
#include <string.h>
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include <sstream>
#include <bitset>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <fstream>
#include <cmath>
... |
3e8ba2b81edf722bc42520fbced61f64f2a5d82e | cd1243ebc53b174a355afe5837cf4955cc2dc88f | AlaoPrado/search_engine | /inverted_index/InvertedIndex.cpp | C++ | cpp | 9,049 | permissive | /* Copyright 2021 Alan Prado Araújo
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, s... |
bef6f374ad1fa9576b15973d80acac0986bfa8f5 | 33a08ac634071e24765ac406ca427c8d1ae0a126 | azhanali/Codeforces | /H. Game of Corners.cpp | C++ | cpp | 2,275 | no_license | /* -------------------------------- */
/* Name: MD. Khairul Basar */
/* Institute: HSTU */
/* Dept: CSE */
/* Email: khairul.basar93@gmail.com */
/* -------------------------------- */
#include <bits/stdc++.h>
/* all header files included */
#define fs first... |
d77471d080de176b29f05a50ed230dc2532a65fe | 1304145f1d98a4fef429ba9b455970413653c80c | CharlesE-233/aliyun-openapi-cpp-sdk | /outboundbot/src/model/QueryScriptWaveformsResult.cc | C++ | cc | 3,131 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
2b8453ee8f43c8ead68e42a3375db8bb662ed7f6 | 9247cb32ee47c93e4d34a4ae400afa4dce015196 | RcppCore/RcppNT2 | /inst/include/nt2/operator/include/functions/logical_not.hpp | C++ | hpp | 443 | no_license | #ifndef NT2_OPERATOR_INCLUDE_FUNCTIONS_LOGICAL_NOT_HPP_INCLUDED
#define NT2_OPERATOR_INCLUDE_FUNCTIONS_LOGICAL_NOT_HPP_INCLUDED
#include <nt2/operator/functions/logical_not.hpp>
#include <boost/simd/operator/functions/logical_not.hpp>
#include <boost/simd/operator/functions/optimize/logical_not.hpp>
#include <boost/si... |
6021ef2c26f99c991965c71bfa92bb905def5a9f | 9cd408c03c4b9dc93421cf7df0f9daadda15eb80 | NickPinkus/BankLab | /BankLab/Customer.cpp | C++ | cpp | 229 | no_license | #include "Customer.h"
Customer::Customer(string firstName, string lastName) : _firstName(firstName), _lastName(lastName)
{
}
Customer::~Customer()
{
}
string Customer::getFullName()
{
return _lastName + ", " + _firstName;
}
|
4cabe37bea0ebee1c42abfe06dcc45ab43eff3bc | ffd08a34bea49faba63a945ce3c0bf6c7ff70423 | z-x-z/leetcode | /tags/array/template.cpp | C++ | cpp | 310 | no_license | /// author: CagedBird
/// date: 2019/12/18
/// place: BeiJing
/// description: A code template of leetcode's array solution
#include<bits/stdc++.h>
#include<unordered_map>
#include<unordered_set>
using namespace std;
class Solution {
public:
///
};
int main()
{
Solution aSolution;
}
|
cb355bc68230ee2fe704b6ad24667aee20643cfa | ca3e555d39ebb4a2318270c0291c814bb181b39e | durgeshkmr/minicoin | /src/minicoin-tx.cpp | C++ | cpp | 29,754 | permissive | // Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/minicoin-config.h>
#endif
#include <clientversion.h>
#include <coins.h>
#include... |
c6f6e700b3b6a73a2ee8cffa6f37817f558f9ca6 | 100867f0e0596abb16d5e869ad1a7fa9a8d77fe6 | jim-leedham/RCN | /RCN001/RCN/RCNUtil.cpp | C++ | cpp | 1,533 | no_license | /*---------------------------------------------------------------------------*
Project: RCN
File: RCNUtil.cpp
Description: Provides simple utility functions.
*---------------------------------------------------------------------------*/
// -----------------------------------------
// INCLUDES
#include "stdhea... |
4c19e46aca5cf3c38780c6578a97f3914e2eed71 | 36b4175135d4b6ef93a0d632621a805d3ada74d3 | takeicoin/takeicoin | /src/rpcwallet.cpp | C++ | cpp | 53,033 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 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 <boost/assign/list_of.hpp>
#include "wallet.h"
#include "walletdb.h"
#include... |
63e14e447dd7577e2a02ce57ba858cc22b50f14f | e725eebf5edaa22135361e2ca9d38f10a9bd74fe | HandsomeRobert/CameraDriver | /Camera/HKCamera.cpp | C++ | cpp | 14,665 | no_license | #include "HKCamera.h"
bool PrintDeviceInfo(MV_CC_DEVICE_INFO* pstMVDevInfo)
{
if (NULL == pstMVDevInfo)
{
printf("The Pointer of pstMVDevInfo is NULL!\n");
return false;
}
if (pstMVDevInfo->nTLayerType == MV_GIGE_DEVICE)
{
int nIp1 = ((pstMVDevInfo->SpecialInfo.stGigEInfo.nC... |
4261af88cb77ca1236e8269ef716386a52904bfa | c69e2f123a5ee6afab5eb2018d48f2e0dd9daf3c | rmgoetz/sudofun | /c++/rando.cpp | C++ | cpp | 878 | permissive | // high_resolution_clock example
#include <iostream>
#include <ctime>
#include <ratio>
#include <chrono>
#include <string>
int main()
{
using namespace std::chrono;
high_resolution_clock::time_point now = high_resolution_clock::now();
int mod = 9;
std::cout << "Choose your modulus (integer): "; // co... |
03ca985d7d14f0b16352c39db7ddc03a5bde84e3 | 16a132a6a108ef76d226ef2a086763d939abfa63 | krhubbard2/CPPPostScript | /src/headers/interface.hpp | C++ | hpp | 1,268 | no_license | #ifndef INTERFACE_HPP
#define INTERFACE_HPP
#include "basic_shapes.hpp"
#include "complex_shapes.hpp"
#include "unique_shapes.hpp"
#include <fstream>
#include <iostream>
void setCursor(std::ostream &file, const double &x, const double &y);
std::shared_ptr<Circle> makeCircle(const double &radius);
std::shared_ptr<Polyg... |
491f0f8e31710bfede8ea56e1f8303b7f53d4c35 | a67cbd43c763dbba989042117eeb4419362b95d8 | leonard-lab/Beluga | /src/BelugaDynamics.cpp | C++ | cpp | 8,341 | no_license | #include "BelugaDynamics.h"
#include "BelugaConstants.h"
#include "MT/MT_Core/support/mathsupport.h"
double BelugaDynamicsParameters::m_dDt = 1.0;
double BelugaDynamicsParameters::m_dWaterDepth = DEFAULT_WATER_DEPTH;
double check_nan(double value, double predicted, double default_val)
{
double value_out = value... |
bd9d685d967cf2e8a202f5ef3821687f796caf79 | 1ad24472ef7987935e31c4cfe86d4294a1a687e9 | hernad/harbour_qtcontribs | /hbqt/qtgui/hbqt_init.cpp | C++ | cpp | 46,280 | no_license | /*
* $Id: hbqt_init.cpp 330 2014-08-09 01:13:05Z bedipritpal $
*/
/*
* Harbour Project source code:
* QT wrapper main header
*
* Copyright 2009 Marcos Antonio Gambeta (marcosgambeta at gmail dot com)
* Copyright 2009 Pritpal Bedi (pritpal@vouchcac.com)
* Copyright 2010 Viktor Szakats (harbour syenar.net)
* Co... |
e83bff8d81848ec156e55db6b1d3a3a7e3ee792c | cbe1a8e1fbf8e15b176bae1f60102cef03379dc9 | mrwonko/luabind | /src/function.cpp | C++ | cpp | 3,433 | permissive | // Copyright Daniel Wallin 2008. Use, modification and distribution is
// subject to 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)
#define LUABIND_BUILDING
#include <luabind/make_function.hpp>
namespace luabind { namespace detail {... |
d0cc028bc06bdc4e9a666dec044343507c3d3edb | 19d0f268a7d23bbddf06256f30a2f465efd44028 | nTopology/LTCX | /lib/source/Main.cpp | C++ | cpp | 4,975 | permissive | // This file is part of libNTLatticeGraph, a lightweight C++ library
// for reading/writing XML NTLatticeGraph (.ltcx) files.
//
// Copyright (C) 2016 nTopology inc. <www.ntopology.com>
// All rights reserved.
// The MIT License(MIT)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
//... |
1b52d4f3b380fb4213f64795c8f056f3c76602ea | 501230b01cb18375256b016b35c4223db7f83ec2 | Spontz/Phoenix | /Engine/src/sections/drawParticlesImage.cpp | C++ | cpp | 8,728 | permissive | #include "main.h"
#include "core/renderer/ParticleMesh.h"
#include "core/drivers/mathdriver.h"
#include "core/renderer/ShaderVars.h"
namespace Phoenix {
class sDrawParticlesImage final : public Section {
public:
sDrawParticlesImage();
~sDrawParticlesImage();
public:
bool load();
void init();
void war... |
c40a2f26bb32a40f2489dc80f4f75407453cf4d4 | 2d26cfcd5e17efdfc044e1984a59e5c9605283df | ltybc-coder/ClickHouse | /src/Compression/tests/gtest_compressionCodec.cpp | C++ | cpp | 48,919 | permissive | #include <Compression/CompressionFactory.h>
#include <Common/PODArray.h>
#include <Common/Stopwatch.h>
#include <base/types.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/IDataType.h>
#include <IO/ReadBufferFromMemory.h>
#include <IO/WriteHelpers.h>
#include <Parsers/ExpressionElementParsers.h>
#include... |
79e536e417348f39e42a72fd622c1e2794635aec | b6b2435cfe643f87c9d6aede2b731dcea7155e0d | Basofe/Community_Based_Repository_Traffic_Signs | /jni_build/jni/include/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc | C++ | cc | 2,552 | no_license | /* Copyright 2016 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 ... |
7a3d42916b2380d9248cb12b9cb47fa922c0cf5f | 330a20fed8e55b4d1f87f8bb209e43253608a4c1 | vincent-kwon/DataStructure | /DynamicProgramming/KthElement/kthElementSlower.cc | C++ | cc | 833 | no_license | /*
* =====================================================================================
*
* Filename: kthElementSlower.cc
*
* Description:
*
* Version: 1.0
* Created: 08/16/2016 04:42:42 PM
* Revision: none
* Compiler: gcc
*
* Author: Hobum (Vincent) Kwo... |
8dbda9c9300cdf509f030dce1e66449acb96ad12 | ae73546a306868e91579720c372379f696f0c668 | devadomas/cpp-piscine | /d01/ex08/Human.cpp | C++ | cpp | 835 | no_license | #include "Human.hpp"
#include <iostream>
void Human::meleeAttack(std::string const & target)
{
std::cout << "meleeAttack was made on " << target << std::endl;
}
void Human::rangedAttack(std::string const & target)
{
std::cout << "rangedAttack was made on " << target << std::endl;
}
void Human::intimidatingShout... |
9b4654afda71714019903a6a8214153aa6fff8a7 | a8c6f737b2e0155c3a0023454a5c75a95fddcbd8 | jfmherokiller/TheOuterWorldsSdkDump | /Indi/SDK/Indi_SC_BunchaNanners_Pickup_parameters.hpp | C++ | hpp | 370 | no_license | #pragma once
// TheOuterWorlds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "Indi_SC_BunchaNanners_Pickup_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//------------------------------------------------------------------------... |
3a1015c0530f3767063de4f8895a55fd9ba293b3 | fbbd94231caab6c0adc13bc721440bc326e8c260 | hdi-superuser/Codes | /Codeforces/CF 242/B.cpp | C++ | cpp | 1,374 | no_license | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <cstring>
#include <string>
#include <cmath>
#include <ctime>
#include <utility>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <sstream>
#define FOR(a,b,c) for (int a=b,_c=c;a<=_c;a++)
#de... |
482ea5266e4869d2f719f14a63f6c8493279f0ac | 6e0110f502be9f5ccb0f7b52ab7d87c52b8ac199 | ordavid90/ibverbs-tests | /tests/vxlan/smoke.cc | C++ | cc | 22,325 | permissive | /**
* Copyright (C) 2016 Mellanox Technologies Ltd. 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, thi... |
c5d2739e076dff9ea8ff956ca966d34fe2ee171a | 27906e686365a75faa33a1532b7b3254404803b6 | NutshellySima/llvm | /lib/IR/Core.cpp | C++ | cpp | 132,610 | permissive | //===-- Core.cpp ----------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
6a5c0446ef5772f970b9e4f63e50e33090a60d40 | a215f1984a3135baf932562bf4d9d453cbb01597 | momoliu88/leetCodePoj | /Regular Expression Matching.cpp | C++ | cpp | 838 | no_license | //匹配?和其他字符相同,而匹配*的时候,记录下*的位置,然后忽略掉*继续匹配,如果发现匹配出错,则退回*,把待匹配字符的指针往后移动。
#include <iostream>
using namespace std;
bool isMatch(const char *s, const char *p) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
if (*p == '\0') return *s == '\0';
if (*(p+1) != '*') {
if (*p == *s || *p == '.... |
4cf0f2b3d191660ad20867344ac0271577bb8ca8 | 2cd635637ddc4a0d2a633c00dd1ad2bcd6fb8add | trancaoviet7514/windev | /1512667_exlporer/1512667_exlporer/Disk.cpp | C++ | cpp | 1,112 | no_license | #include "Disk.h"
Drive::Drive()
{
cung = new WCHAR[3];
cung[0] = 0;
cung[1] = L':';
cung[2] = 0;
free = 0;
total = 0;
Loai = new WCHAR[15];
}
void Drive::Add(WCHAR ten)
{
cung[0] = ten;
Type();
Size();
}
Drive::~Drive()
{
delete[] cung;
delete[] Loai;
}
void Drive::Type()
{
int kieu = GetDriveType(cung)... |
9f35161322cfc09084206c6ce6d4f9b469c5c707 | b0e7cb9bdd5c7444dbfeb41e15020ce4002bc68f | a86792208/mantid | /Code/Mantid/Vates/VatesAPI/src/MDEWLoadingPresenter.cpp | C++ | cpp | 8,846 | no_license | #include "MantidVatesAPI/MDEWLoadingPresenter.h"
#include "MantidVatesAPI/MDLoadingView.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidGeometry/MDGeometry/NullImplicitFunction.h"
#include "MantidVatesAPI/VatesKnowledgeSerializer.h"
#include "MantidVatesAPI/MetaDataExtractorUtils.h"
#include "MantidVatesAPI... |
456d87f62cd8c5b812ad8095a38e700b043fd12c | aaeaa0eeeb4552f1ce0993da353467f5d8f7e9bc | PickXu/zero-xum | /tests/sm/test_ringbuffer.cpp | C++ | cpp | 1,209 | permissive | #include "ringbuffer.h"
#include "w_debug.h"
#include <cstdlib>
const char * rundir = "/tmp/archiver_test";
size_t bsize = 8192;
size_t bcount = 16;
int produce_count = 100;
AsyncRingBuffer * buf = new AsyncRingBuffer(bsize, bcount);
class producer_t : public smthread_t {
void run() {
for (int i = 0; i <... |
46445c8da310858ba8669363f401354222014ee0 | d11eea6c94140e26c0c2e8868392d1504bd84b06 | vothaosontlu/native | /library/Java/Lang/Object/Object.cpp | C++ | cpp | 2,200 | permissive | /**
* Copyright 2017 Food Tiny Project. 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 of condit... |
b07da1a68fddeb1aa4e1a589a641af7be5a9a50d | 46a55f53833f5f7917162c3a6d846e87a19cdbf3 | zhangqingqi/C_Practice | /LeetCodeOJ/SpiralMatrixII.cpp | C++ | cpp | 1,970 | no_license | // Spiral(螺旋形的; 盘旋的; 盘旋上升的) Matrix II
// Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
// For example,
// Given n = 3,
// You should return the following matrix:
// [
// [ 1, 2, 3 ],
// [ 8, 9, 4 ],
// [ 7, 6, 5 ]
// ]
#include <iostream>
#include <vector>
using na... |
bbbad1fd9dcbb845b546260c4a41f24a29fb097d | 5dea451dc264f6a3cf7f319a69a10319409d386d | buckeye-cn/ACM_ICPC_Materials | /solutions/kattis/ecna20/weightytomes_hcz.cpp | C++ | cpp | 1,475 | no_license | // https://open.kattis.com/problems/weightytomes
#include <cstdlib>
#include <cstdint>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <iostream>
using namespace std;
int poly[21][5001];
int level[21][5001];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
... |
f0e5cae280408f06a1128d3a93ffac23ae9d631b | 99c7eda46ac829de6aa83a584b9c7a0803f786d7 | blueprintmrk/hhvm | /hphp/compiler/statement/goto_statement.cpp | C++ | cpp | 3,306 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
6d1adc07624362c560d51351371ce54d4c489cef | e952b16ce7a3873e356c9a9d8781fb5b2bd529d5 | HubBucket-Team/genny | /src/cast_core/include/cast_core/actors/RandomSampler.hpp | C++ | hpp | 2,037 | permissive | // Copyright 2019-present MongoDB Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
dec49119fd94705a9804f485a0ded7a866f92c0c | 813a3851e0d24ee3e8964f44d7d80b3bf04e944d | linlinyeyu/C-C-Arithmetic | /指针数组.cpp | C++ | cpp | 948 | permissive | #include "stdio.h"
#include "stdlib.h"
#define CHOICES 6
int menu(char title[],int max,char*menu_list[]);
int main()
{
char *greeting="欢迎你的光临";
char *flavor[CHOICES]={"Empty","香草","巧克力","牛奶","脆皮","柠檬"};
double price[CHOICES]={0.00,1.50,1.80,1.20,2.00,1.80};
int choice;
choice=menu(greeting,CHOICES... |
a480552dd49f6c807e591503fabc8d8ff406be52 | d24caac18a40d6f62048bb56966ac5c2446527a6 | poshul/OpenMS | /src/topp/FeatureFinderMultiplex.cpp | C++ | cpp | 13,226 | permissive | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
364ece3f3d4442adc5601c4b110520b5b27a1172 | 594e521a3f810ffa2edbbfd1606bbb240b4376c4 | binsec/cav2021-artifacts | /unisim/unisim_lib/unisim/component/tlm/message/memory.hh | C++ | hh | 6,590 | no_license | /*
* Copyright (c) 2007,
* Commissariat a l'Energie Atomique (CEA)
* 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 copyrig... |
3d7376f78d0ac7a347269441c31cccb305bfb514 | 6c70b6c813dfef8a707afa6d6091505524367a4c | WopsS/RED4ext.SDK | /include/RED4ext/Scripting/Natives/Generated/game/data/UICondition.hpp | C++ | hpp | 489 | permissive | #pragma once
// clang-format off
// This file is generated from the Game's Reflection data
#include <cstdint>
namespace RED4ext
{
namespace game::data {
enum class UICondition : uint32_t
{
InEyesSubMenu = 0,
InHandsSubMenu = 1,
InSubMenu = 2,
IsIntroFinished = 3,
IsSetEquippingSubMenu = 4,
V... |
4c89ec9a48ffb2fe3c8d3288fd319ef933ab553e | 326ae0308666ebf947965a37ae57255e22b969b2 | yangyang14641/arrayfire | /src/backend/cpu/orb.cpp | C++ | cpp | 10,601 | permissive | /*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... |
f48dcb2c3130cd2c7dc9c1ea293c411575948c7a | aa0bb24e112fbe1a7c05044566c15b35c6ad382d | vcarluer/dev-2013 | /Tools/phonegap-phonegap-de1960d/lib/bada/src/CordovaEntry.cpp | C++ | cpp | 903 | permissive | /**
* This file contains the bada application entry point.
*/
#include "Cordova.h"
using namespace Osp::Base;
using namespace Osp::Base::Collection;
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
_EXPORT_ int OspMain(int argc, char *pArgv[]);
/**
* The entry function of bada application called by the oper... |
00978dfd230ddb541d5c939ba7aced770f627ff4 | fc77d195f4fdf02b52eb228b0ec632063de166f7 | k124k3n/competitive-programming-answer | /kattis/qaly.cpp | C++ | cpp | 306 | permissive | /*input
5
1.0 12.0
0.7 5.2
0.9 10.7
0.5 20.4
0.2 30.0
*/
#include <iostream>
#include <iomanip>
int inp_tot;
float a, b, total;
int main(){
std::cin>>inp_tot;
total = 0;
while(inp_tot--){
std::cin>>a>>b;
total += b*a;
}
std::cout<<std::setprecision(3)<<std::fixed<<total<<std::endl;
return 0;
} |
2a659c8fb470263279741972c0fd07b60518c8ec | d248bcffe6661db1347589128704688a31c4247f | SidHard/kdynamic | /deformationGraph.cpp | C++ | cpp | 12,774 | no_license | //author:wxb.tju@gmail.com
#include "deformationGraph.h"
#include "stdio.h"
using namespace cv;
void m_sort(int *p_ind, float *p_dist, float *dist, int num)
{
int current_ind, i, j;
int k = 4;
float curr_dist, max_dist;
int max_row;
p_dist[0] = dist[0];p_dist[1] = dist[1];p_dist[2] = dist[2];p_... |
190aefbacf3101976424c64825e425918fba2f2d | 40e4bfe4e279510cb9a8273187b85a80970e2b91 | shivangigoel1302/leetcode_solutions | /Best _time_to_Buy_and_Sell_Stock_with_Transaction_Fee.cpp | C++ | cpp | 300 | no_license | class Solution {
public:
int maxProfit(vector<int>& prices, int fee) {
int sell = 0,buy = -prices[0];
for(int i = 1; i < prices.size(); i++){
sell = max(sell,buy + prices[i] - fee);
buy = max(buy, sell - prices[i]);
}
return sell;
}
};
|
e91267e09efab8f6059304010f85bba0dee75074 | 15595c3acb50a3e64125a44da0082c0ccca976dd | mxuexxmy/2019HolidaysTrain | /ICPC/L1-011 A-B (20 分).cpp | C++ | cpp | 3,161 | no_license |
if(x == k){ //相等的时候
printf("Case %d: Today %d:%02d ",cnt, x , y);
cout << s1 <<endl;
}else if( k >= 0){
if(x == 12 && s1 == "AM"){
printf("Case %d: Today %d:%02d ",cnt, k % 12, y);
cout << s1 <<endl;
}else if(... |
778147939ac482176ff99d3d349af2bd12efaa21 | d16170c01beb2e304dd70ab44107a6699cd4ece9 | aricwang88/autosim | /Panda-src-modifications/panda/src/physx/physxShape.cxx | C++ | cxx | 16,834 | no_license | // Filename: physxShape.cxx
// Created by: enn0x (16Sep09)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should... |
80b97679a042bc08add648903b3d123027561039 | f4258d5a6a88975ba1f6d02c6f821ad324dbf574 | nihui/onnxruntime | /onnxruntime/core/framework/allocatormgr.cc | C++ | cc | 1,048 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/framework/allocatormgr.h"
#include "core/framework/bfc_arena.h"
#include "core/framework/mimalloc_arena.h"
#include <mutex>
#include <sstream>
#include <unordered_map>
#include <limits>
namespace onnxruntime... |
3453ee45b6d815f4220663bd2a90abcbb2bdc9e9 | 70847a508e6c637a6dfd7cf51f676ad08370e0b8 | HJWAJ/acm_codes | /CF/20111008/B.cpp | C++ | cpp | 630 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<map>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<vector>
using namespace std;
int main()
{
int n,i,j;
scanf("%d",&n);
for(i=0;i<=n;i++)
{
for(j=0;j<2*n-2*i;j++)printf(" ");
printf("0");
for(j=1;j<=i... |
592eb4946e6b35e60868e610513b88cc715aea81 | 0671ec78d6b962aae80d14feda3cbf90ef411cf1 | VasuGoel/codechef-problems | /easy/NUM239.cpp | C++ | cpp | 424 | permissive | //
// Created by Vasu Goel on 2/1/20.
//
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t, l, r;
cin >> t;
while(t--) {
cin >> l >> r;
int count = 0;
for(int i = l; i <= r; i++) if(i... |
175234a6294e7a930ad1ac71e2f2dddfd21aa518 | eb6389eebcec5b612864f8ccde0dbbd9a111ca69 | antiscam-ico/td | /tddb/td/db/detail/RawSqliteDb.cpp | C++ | cpp | 1,626 | permissive | //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022
//
// 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)
//
#include "td/db/detail/RawSqliteDb.h"
#include "sqlite/sqlit... |
96116b553252ba63a762f146b051c3e87f45e071 | dcc389682d645d03b678ebef7227cd01281da7b3 | WildFiretobee/20180423 | /rss/RssReader.cc | C++ | cc | 1,868 | no_license | ///
/// @file RssReader.cc
/// @author WildFiretobee(Danderous@email.com)
/// @date 2018-04-23 20:45:05
///
#include "tinyxml2.h"
//#include "Mylogger.h"
#include <boost/regex.hpp>
#include <boost/algorithm/string.hpp>
#include <iostream>
#include <string>
#include <regex>
using std::cout;
using std::endl... |
d0db03d2a53fc4ad152a33f5053ccd24b5a03b92 | 3b3e01403ff27ae3a466e51d87617a8fb9cbfd32 | ss1398736/Code | /C++/C++ primer plus/10.10/10.10-3/main.cpp | C++ | cpp | 528 | no_license | #include <iostream>
#include "golf.h"
int main()
{
const int GolfSize = 5;
Golf arr[GolfSize];
int n = 0, i;
while (n < GolfSize && arr[n].setgolf())
n++;
for (i = 0; i < n; i++)
arr[i].showgolf();
arr[0].setgolf("myset", 24);
arr[0].showgolf();
arr[0].H... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.