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
1cae5f13c4e69fa887ed15e28e8b5fc515e5c786
bf7d9920f3db931f90458cade67b80f0f9470e23
mishka1980/competitive-programming
/POJ/Chocolate Chip Cookies.cpp
C++
cpp
2,184
no_license
/* POJ 2693 - Chocolate Chip Cookies - http://poj.org/problem?id=2693 * * Author - Anish Shah * * Language - C++ */ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #i...
f7e8b209232c76663c1539bf1b37973b3e98ef7f
81125f1a426d5612d349cb43c71e58d7fec55436
bourbon3/.metadata
/ass6.cpp
C++
cpp
1,930
no_license
#include <iostream> #include<string.h> #define MAX 10 using namespace std; class djs { public: int i, j, k, a, b, u, v, n, ne; int min, mincost, cost[MAX][MAX], process[MAX]; void shortestpath(int ,int); void displayGraph(); void create(); djs() { for (int i = 1; i <= MAX; i++) for(int j = 1; j <= M...
e912ba92ef39e27882d09442c4021526cef8f993
39d6d28f50c9cdf221a1e6cd347598775a1982ab
ca2/app
/aura/operating_system2/aaa_file.cpp
C++
cpp
1,245
no_license
#include "framework.h" int_bool acmefile()->put_contents(const ::string & path, const ::string & contents) { return acmefile()->put_contents(path, contents, strlen(contents)); } CLASS_DECL_AURA bool _os_resolve_alias(::particle * pparticle, ::file::path & path, const ::string & psz, ::user::primitive * pintera...
cd1e6f6e369034cbd07fb7058e938042bcd02321
d229e02f80158f42a9afeddcf6ebf1110423cceb
BenjaminHCCarr/Collapse
/scripts/ADMB/ADMBn2/CSIRO47/CSIRO47.cpp
C++
cpp
4,566
no_license
#include <admodel.h> #include <admodel.h> #include <contrib.h> extern "C" { void ad_boundf(int i); } #include <CSIRO47.htp> model_data::model_data(int argc,char * argv[]) : ad_comm(argc,argv) { nobs.allocate("nobs"); maxB.allocate("maxB"); data.allocate(1,nobs,1,2,"data"); landings.allocate(1,no...
98f650c22e30c51c633006d19c09ccc53170fa6b
bed6ad92168cf5d6b10c57066ade6958d225efbc
MPS-UPB/10Team
/VBAM/VBAM/NoiseRemovalPass.cpp
C++
cpp
900
no_license
#include "NoiseRemovalPass.h" #include <opencv2/opencv_modules.hpp> #include <opencv2/opencv.hpp> NoiseRemovalPass::NoiseRemovalPass(void) { ImagePass::filterName = "Noise removal filter"; } NoiseRemovalPass::~NoiseRemovalPass(void) { } void NoiseRemovalPass::processImage(cv::Mat image, cv::Mat &confidence) { c...
0523b438934e13dcd9384c9cca5c7d7e99d681ab
5cb366df2dccee2260c6f407e992e73296712ccc
snuspl/tensorflow
/tensorflow/core/grappler/optimizers/layout_optimizer_test.cc
C++
cc
47,261
permissive
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
16031c16832232998fe8de62a2db841a98864a28
3b9b274941bfb83c17a8d3cf401554fa6bf6f272
nrfconnect/sdk-connectedhomeip
/src/platform/bouffalolab/BL602/CHIPMem-Platform.cpp
C++
cpp
4,064
permissive
/* * * Copyright (c) 2021 Project CHIP Authors * Copyright (c) 2019 Nest Labs, 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/li...
87ee0c84343695d8dc1ed44207a4825a67f5b073
3f0e341be74e5933698ded247d8dc5e2b3206f60
0xSombra/RED4ext.SDK
/include/RED4ext/Types/generated/world/CompiledEffectPlacementInfo.hpp
C++
hpp
600
permissive
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/REDhash.hpp> namespace RED4ext { namespace world { struct CompiledEffectPlacementInfo { static constexpr const char* NAME = "worldCompiledEffectPlacementInfo"; static con...
5f8f939559b03d846aaa419a3c833604e21b8863
f7f49a2811fb5cc4381ca05a4727f5906969bef5
cvra/serializer
/tests/messagepack_tests.cpp
C++
cpp
1,965
no_license
#include "CppUTest/TestHarness.h" #include "../serialization.h" #include <cstring> TEST_GROUP(MessagePackTestGroup) { cmp_ctx_t context; serializer_t serializer; char buffer[256]; void setup() { memset(buffer, 0, sizeof buffer); serializer_init(&serializer, buffer, sizeof buffer); ...
54ce9057c66d208d5b1156de71744084c38ef6ef
91dd091ac4908d286f6b070ae27eea5a3530037f
CapOM/chromium
/components/content_settings/core/common/content_settings.cc
C++
cc
5,661
permissive
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/content_settings/core/common/content_settings.h" #include "base/logging.h" ContentSetting IntToContentSetting(int content_setti...
4ad41fbe0336fa488e448871cb0c3186f4d87479
b715b6c48e9942db5f2376382164bd7399de65fd
pnchang/graphics
/PerspectiveTexture/demo.cpp
C++
cpp
2,910
no_license
/* Sources: Mikael Kalms, "Perspective Texturemapping using linear interpolation of 1/Z, U/Z and V/Z", http://www.lysator.liu.se/~mikaelk/doc/perspectivetexture/. ousttrue, "[2D][Triangle][C++]", http://d.hatena.ne.jp/ousttrue/20090218/1234974683, http://ousttrue.github.io/. Paul Nettle, "High Speed Software Rendering"...
977118fb6e4d3019a201b64a0c85fac15566e11c
03216e1c6929c4a0565bc46a8c4b72361587ef8b
HeRaNO/OI-ICPC-Codes
/Vijos/1379.cpp
C++
cpp
1,089
permissive
#include <stdio.h> int p1, p2, p3; char in[1000]; int i; int judge() { if (in[i] == '\0') return 1; if ((in[i] == '-' && (i == 0 || in[i - 1] >= in[i + 1] || in[i - 1] == '-')) || in[i] != '-' || (in[i] == '-' && in[i - 1] < 60 && in[i + 1] > 60)) return 2; if (in[i] == '-' && in[i - 1] < in[i + 1]) return 3;...
fca55a58a793b2d4540c09a1ae796ab410357309
1bb36041d9a7f42e4910e7d9466f7b71eda0a657
1whatleytay/scout-experiment
/src/cpu/memory.cpp
C++
cpp
4,965
no_license
#include <cpu/memory.h> #include <fmt/printf.h> bool MemoryRegion::supports(Intention intention) const { switch (type) { case Type::Empty: return false; case Type::Dummy: case Type::Mirror: case Type::ReadWriteData: case Type::ReadWriteDevice: return true; case Type...
87bc7f9926c44d026097fc1d3ee1717fb7107dca
1a33c08e7f0a786c1339f17ff41d818887a859de
dda410/Bproject
/src/dalvikTraceDroid4.4_filterTrace/vm/interp/Stack.cpp
C++
cpp
46,489
no_license
/* * Copyright (C) 2008 The Android Open Source Project * * 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 app...
a4a2d8ec058f934154df9ef08cf8e8d816e23ee6
4b554b32fb9cdb75c53fa244d75acc1bae5dc989
Iam5B/2017-DataStructureAlgorithm
/CCCC-GPLT/L1-005.cpp
C++
cpp
545
no_license
#include<iostream> using namespace std; typedef struct S{ string num; int id; }stud; stud arr[10000]; int main(){ int n; while(cin>>n){ int i; for(i=0;i<n;i++){ string num; int key; int id; cin>>num>>key>>id; arr[key].num=num; ...
5de10533c82e96a65599f96d8c9129b8dbadd10a
adc5e5059007fb61a28b848decc0bbd32e9c726b
FROL256/msu-opengl4-sdk
/C++/basic/sample_10_mrt/vsgl3/glHelperTexture.cpp
C++
cpp
7,394
no_license
#include "glHelper.h" #include <sstream> RenderableTexture2D::RenderableTexture2D(GLenum format, GLsizei width, GLsizei height) { m_colorTexture = TextureCreateEmpty(format, GL_RGBA, width, height); m_depthTexture = TextureCreateEmpty(GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, width, height); m_coordTexture = Tex...
c527a5d517bebe5b24807b05ff10460b46d9d02f
c316f4ad235a7bdb448f80e0b5c667dd784f6ba6
LucRyan/CS537-Assignments
/Assignment0-ModelView/example8_3nfg.cpp
C++
cpp
16,281
no_license
#include "Angel.h" #include <assert.h> typedef Angel::vec4 point4; typedef Angel::vec4 color4; const int NumVertices = 36; //(6 faces)(2 triangles/face)(3 vertices/triangle) point4 points[NumVertices]; color4 colors[NumVertices]; point4 vertices[8] = { point4( -0.5, -0.5, 0.5, 1.0 ), point4( -0.5, 0.5, 0.5...
8b1f8a1a7eae651d545a423814567f157c6ec2ad
96a18a596871d27ea69ecb77ce01801f81975540
studentkittens/Freya
/src/Glyr/Request.hh
C++
hh
2,683
no_license
#ifndef FREYA_GLYR_REQUEST_HH #define FREYA_GLYR_REQUEST_HH #include "../MPD/Client.hh" #include "../Utils/Singleton.hh" #include "UpdateInterface.hh" #include <gdkmm/pixbuf.h> #include <glyr/cache.h> namespace Glyr { class Stack { DEF_SINGLETON(Stack) public: /** * @brief Requets online metadata ...
472c3642eaa7f3c78423a83eed98a9d79c45603c
d92acc927b7355c3d5b65ffc749724538a195307
testAccountDeltas/xray-oxygen
/code/engine.vc2008/xrGame/console_commands.cpp
C++
cpp
60,823
permissive
#include "stdafx.h" #include "../xrEngine/xr_ioconsole.h" #include "../xrEngine/xr_ioc_cmd.h" #include "../xrEngine/customhud.h" #include "../xrEngine/fdemorecord.h" #include "../xrEngine/fdemoplay.h" #include "xrMessages.h" #include "xrserver.h" #include "level.h" #include "script_debugger.h" #include "ai_debug.h" #in...
b48181afa7df18a98a25d6e6a3af93323a39517e
6677f64ab1a861f9818f10fed7f2c8010e869f61
onurhuseyincantay/SpotixAPI
/venv/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/prim/scal/prob/poisson_lpmf.hpp
C++
hpp
3,108
permissive
#ifndef STAN_MATH_PRIM_SCAL_PROB_POISSON_LPMF_HPP #define STAN_MATH_PRIM_SCAL_PROB_POISSON_LPMF_HPP #include <stan/math/prim/scal/meta/is_constant_struct.hpp> #include <stan/math/prim/scal/meta/partials_return_type.hpp> #include <stan/math/prim/scal/meta/operands_and_partials.hpp> #include <stan/math/prim/scal/err/che...
c243798d4bf6be0d18fb73e727680728cfb61f8f
9761e2047fd1a3e56737be4ba37031ac96792dbd
schreibikus/nmPlayer
/MFW/voME/Component/AudioDoblyEffect/Core/voCOMXCoreDoblyEffect.cpp
C++
cpp
3,710
no_license
/************************************************************************ * * * VisualOn, Inc. Confidential and Proprietary, 2003 * * * ************************************************************************/ /******************************************************************...
14429094f70d180624814d37e114230546614f92
7608d928545b06408bbc4d5e9491ab10c0bb42d3
KingKiller100/Krakoa-Engine
/Krakoa/Source/Platform/OperatingSystem/FileDialog/FileDialogFilter.hpp
C++
hpp
2,628
permissive
#pragma once #include "../../../Util/Fmt.hpp" #include "../../../Core/PointerTypes.hpp" #include "../../../Core/EngineMacros.hpp" #include <string> #include <vector> namespace krakoa::os { template<typename T> struct BasicFilter { std::basic_string<T> name; std::basic_string<T> extension; }; template<type...
ea6848758e7ee965032c2069c11ab9db1d5824f1
ddbd5b77cbc5e8d41f9bf50df9097cb07f83c3e2
JDevlieghere/mull
/lib/MutangModule.cpp
C++
cpp
1,189
no_license
#include "MutangModule.h" #include "llvm/Transforms/Utils/Cloning.h" using namespace Mutang; using namespace llvm; using namespace std; /// FIXME: put into some proper place static string fileNameFromPath(const string &path) { std::string filename; auto lastSeparatorPos = path.rfind("/"); if (lastSeparatorPos ...
76eecc8b44674da67450bde6e85744f1e1a70084
3fc56d9a63d42a197b28caceb2adcd7f379d386b
serdzz/scmrtos-sample-projects
/samples/arm7/gcc/aduc70xx/1-event-flag/src/main.cpp
C++
cpp
3,829
permissive
//****************************************************************************** //* //* FULLNAME: Single-Chip Microcontroller Real-Time Operating System //* //* NICKNAME: scmRTOS //* //* PROCESSOR: ADuC70xx (Analog Devices) //* //* TOOLKIT: ARM GCC //* //* PURPOSE: Port Test File //* //* ...
b14561f33724a72982e8869ea2a1bdb09533b8be
2aa3db1d7ef4ee95e8b4878b8e0bb90407230b2e
nmoritani/Ct_Sample3
/Ct/Window/AREASETTING/CtWindowContentsAreaSettingConfirm.cpp
C++
cpp
806
no_license
#include "CtWindowContentsAreaSettingConfirm.h" CtWindowContentsAreaSettingConfirm::CtWindowContentsAreaSettingConfirm(const CtWindowID WindowID) : CtWindowContents(WindowID), m_AreaSetting(ContentsAreaSetting_AREA2) { } CtWindowContentsAreaSettingConfirm::~CtWindowContentsAreaSettingConfirm() { } Contents...
42089fb85d290c426fe9214a3aff77afcc8aa384
260bad533fbfcf61b8a31524319eccf1934132b9
funthing/osg3DViewer
/src/osg3DViewer/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp
C++
cpp
17,394
no_license
/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of a Qt Solutions component. ** ** You may use this file under the te...
b63c839120b28c8c05a5fb289ef757ce94187d16
094a414bf05c3b02968fab25d0a2987c2b283320
0xc0dec/solo
/vendor/assimp/4.1.0/code/CreateAnimMesh.cpp
C++
cpp
3,724
permissive
/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- Copyright (C) 2016 The Qt Company Ltd. Copyright (c) 2006-2012, assimp team All rights reserved. Redistribution and use of this...
67ddf9fd3bc1363e6733f820a770de6c8908bad7
fd96b1ba3d5bbb17ddb069303f706f91f56b813f
chyingp/blog
/demo/2022.03.20-node-api-examples/passing-callback-function-as-args/src/passing_callback_function_as_args.cc
C++
cc
686
no_license
#include <napi.h> using namespace Napi; Napi::String Method(const Napi::CallbackInfo& info) { uint32_t num1 = info[0].As<Napi::Number>().Uint32Value(); uint32_t num2 = info[1].As<Napi::Number>().Uint32Value(); Napi::Number result = Napi::Number::New(info.Env(), num1 + num2); info[2].As<Napi::Function>().C...
839b5c955fbff3f0162785fce1eb605233f15566
bfcb511d4c6cc0db68031f0b1edcb21156293d53
tyshaowen001/Tool_FunctionAssembly
/Tool_FunctionAssembly.cpp
C++
cpp
6,528
no_license
// // FunctionAssembly.cpp // XiaoXiaoLe2 // // Created by 欧阳佳乐 on 2017/7/27. // // #include "Tool_FunctionAssembly.h" /*int转换为string*/ string ToolFunctionAssembly::changeIntToString(int num) { stringstream ss; ss << num; return ss.str(); } /*两点的距离*/ float ToolFunctionAssembly::getTwoPointDis(flo...
07796a181f9e4b858497b32dc33eec6751a310c5
cb86c830794b40fa2a5b50e4710f0995c7922fce
SketchAlgorithm/17_Lee-hyojung
/2001.파리 퇴치.cpp
C++
cpp
827
no_license
//https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PzOCKAigDFAUq&categoryId=AV5PzOCKAigDFAUq&categoryType=CODE #include <iostream> using namespace std; //n:5~15 //m:2~n //각 칸 파리<=30 int T; int n, m; int map[15][15]; int fly = 0; int pro = 0; void fun(int x,int y) { ...
d23b68ff2705523873bae70ed1bbd71c768e8a01
7619a385549fe8508e25fcb2657ce6df5d1ac740
GhostofGoes/evo-comp
/4/tree.cpp
C++
cpp
20,128
permissive
// Initial code courtesy of Robert Heckendorn // It has been modified to suit my purposes for this course #include "tree.h" #define BADDOUBLE 666.66 // the list of possible operators int numOpsTotal; // total number of ops int numOps0; // number of nullary ops int numOps1; // number of unary ops int nu...
8dc723ecc43570cbf49bd5f5a468c8f3709eb282
e4f96b6e873e58db8b0b1bb3b3fb0e35c21fe0fe
liu3xing3long/inviwo
/modules/assimp/ext/assimp/code/GenVertexNormalsProcess.cpp
C++
cpp
8,447
permissive
/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- Copyright (c) 2006-2012, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, ...
f493bd7df237c60adca1462c41f7feb349c9a261
00049b54a30b8522fbc5320d2620aff9a93630df
ndeodhar/yugabyte-db
/src/yb/docdb/primitive_value-test.cc
C++
cc
17,667
permissive
// Copyright (c) YugaByte, 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 writ...
fdf2e56970b69809c15c1188d256a6f16136af87
37462cedc3e7f2c699c703a284e38ae80cbdcd1d
lhmouse/poseidon
/poseidon/easy/easy_deflator.hpp
C++
hpp
1,452
permissive
// This file is part of Poseidon. // Copyleft 2022 - 2023, LH_Mouse. All wrongs reserved. #ifndef POSEIDON_EASY_EASY_DEFLATOR_ #define POSEIDON_EASY_EASY_DEFLATOR_ #include "../fwd.hpp" namespace poseidon { class Easy_Deflator { private: shptr<Deflator> m_defl; shptr<linear_buffer> m_out; public: ...
ecc5721de6282b08db7dc45082e25d0ae65c9d12
511afbfb3665a550dc94222ab386a773ad0f46bf
EQ4/JamomaCore
/DSP/extensions/FunctionLib/source/TTCubicEaseInFunction.cpp
C++
cpp
1,093
permissive
/** @file * * @ingroup dspFunctionLib * * @brief #TTCubicEaseInFunction Unit for Jamoms DSP * * @details Modeled after the cubic y = x^3 @n * @n * Derived from Sam Hocevar's public domain C/C++ implementation of * Robert Penner easing functions * * @authors Trond Lossius * * @copyright Copyright © 2014 by ...
b18ef5a8853b7659f72abcafb54612794933ff4a
c2487109e560d0e4cc51020c9f613ec90e793a33
kushuu/competitive_programming_all
/love babbar series/Arrays/count_k_sum.cpp
C++
cpp
1,474
no_license
/********************************************** Author: kushuu File: count_k_sum.cpp Date: Wed Nov 04 2020 **********************************************/ #include <bits/stdc++.h> //shorts #define ll long long int #define sll stack<long long int> #define vll vector<long long int> #define ld long double #define pb...
b8f182b6059e33b94fd5f2a2c49c867f6a3cbc38
c32e706236d51c83aa877e3c733b56b7e52b22d9
lfxgroove/vhdl-gameboy
/src/tester/testfile.cpp
C++
cpp
4,697
no_license
#include "testfile.hpp" #include "test.hpp" void TestFile::generate_input() { //Makefix solution for addrs above 0x150 AddrDatas& addrs = m_test->get_prep_addr_data_vol(); addrs.sort(); for (AddrDatas::iterator it = addrs.begin(); it != addrs.end(); )//++it) { int to_addr = it->ge...
f216e8ac4ba851b4ae1a51b72bf4be88aa9270eb
233a5f6724e3db35382bbedbab80db3ead35d012
ninamanalo19/react-native-sliding-up-panel
/node_modules/react-native/ReactCommon/cxxreact/tests/methodcall.cpp
C++
cpp
4,725
permissive
// Copyright 2004-present Facebook. All Rights Reserved. #include <gtest/gtest.h> #include <cxxreact/MethodCall.h> using namespace facebook; using namespace facebook::react; TEST(parseMethodCalls, SingleReturnCallNoArgs) { auto jsText = "[[7],[3],[\"[]\"]]"; auto returnedCalls = parseMethodCalls(jsText); ASSER...
72254c0e4296e986d1bd3eb2f49d541de5cf6199
1b8ebe20878c44192755a49e207811e9917796cd
krinosuterio/progla2
/edpogi.cpp
C++
cpp
219
no_license
#include<iostream> using namespace std; int main() { for (int x=1;x<=100;x++) { if (x%3==0) { cout <<"Pogi"<<endl; } else if (x%5==0) { cout<< "Ed"<<endl; } else { cout <<x<<endl; } } return 0; }
5487aeddafeada5e97f7a1a382cc890894cda4ee
6eef75f8acbb8ba03aeceb9573d041ead0c18f61
gx-wind/leetcode
/88.cpp
C++
cpp
497
no_license
#include <iostream> #include <vector> using namespace std; void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int i = m-1, j = n-1, k; while (i >= 0 && j >= 0 ){ if (nums1[i] > nums2[j]) { nums1[i+j+1] = nums1[i]; i--; } else { nums1[i+j+1] =...
19fe08b725de52c02008beb94f85fd68597a6cd7
7afd6d2eda2d778e65ab5d06175413e59397fc69
pto2013ErasmusStudents/Image-Processing
/debug/moc_correction_dialog.cpp
C++
cpp
5,624
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'correction_dialog.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.1) ** ** WARNING! All changes made in this file will be lost! *********************************************...
d3f700674677e5afabf47cdb11ab769aacc46ff6
b65e2a4f744f9b351d5831177c614c27e390e949
michalaziz/IterTools
/Test.cpp
C++
cpp
28,727
no_license
/** * A test program for itertools. * * @author Many students. * @since 2019-05 */ #include <iostream> #include <list> #include <set> #include <string> #include <vector> using namespace std; #include "range.hpp" #include "chain.hpp" #include "zip.hpp" #include "product.hpp" #include "powerset.hpp" #include "ba...
ebe3c2c86c4bffbbb29a080faedde9fabba8d0b0
bcf4c826ae1ad097829abacee6138f99f2462a50
peichao01/test
/ios/RussiaBlock/RussiaBlock/Classes/Scene/Scene1Welcome.cpp
C++
cpp
1,930
no_license
// // Scene1Welcome.cpp // RussiaBlock // // Created by 裴超 on 13-7-12. // // #include "Scene1Welcome.h" #include "MainMenu.h" using namespace cocos2d; bool Scene1Welcome::init(){ if(!CCScene::init()){ return false; } CCSize size = CCDirector::sharedDirector()->getWinSize(); CCSprite* pBg = CCSprite::c...
c615143cc207a0c977f38335e9bf16a70be66d17
06f2e4d596dda92df98ff512b9bc018a29165d67
htyvv/2021-BaekJun
/1313/1213.cpp
C++
cpp
709
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { string input; cin >> input; vector<char> name(input.begin(), input.end()); bool isAlone = false; char alone = ' '; string result = ""; int i = 0; while(1) { if (i == name.size()) break; if (name[i] == ' ') { ...
bf381e774340895f7347a22b9ce6bb1356c7381d
b6bec705489dcfa6def5589e6a57482256f4c6b7
msdd13579/codeforces-problems
/C-Registration system.cpp
C++
cpp
823
no_license
#include <bits/stdc++.h> using namespace std; #define lli long long int #define ulli unsigned long long int #define li long int #define ff(i,a,b) for(int i=a;i<=b;i++) #define fb(i,b,a) for(int i=b;i>=a;i--) #define w(t) while(--t >= 0) #define l(s) s.length() #define c(n) cin>>n; #define fast ios_base::sync_with_std...
f3f2a526ff4bc0b24a86bd00b9ac51e4651a20ee
3f996fc740c6187864f5921c4d80d54d466eae29
jamiepg1/Sprout
/sprout/functional/hash/sscrisk/cel/utility.hpp
C++
hpp
1,117
permissive
/*============================================================================= Copyright (c) 2011-2014 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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.tx...
248fd1dfd3ad1429bed24f4ef4c62bc74098408e
5d873ecc1fbc070a768917da31309ae494e46481
JuyoungE/data_structure
/score.cpp
C++
cpp
788
no_license
#include<stdio.h> void Get_Score(int data[]); void Arr_Score(int data[]); void Prn_Score(int data[]); void main() { int score[10]; Get_Score(score); Arr_Score(score); Prn_Score(score); } void Get_Score(int data[]) { int i; for (i = 0; i < 10; i++) { printf("입력\n"); scanf_s("%d", &data[i]);...
e46c7de133d6b11d14643b21c5332f71c44d990d
7859d170f55d2397207968eb3c445b4378f4cc3e
MMOcoin/mmocoin
/src/qt/bitcoin.cpp
C++
cpp
10,980
permissive
/* * W.J. van der Laan 2011-2012 */ #include "bitcoingui.h" #include "clientmodel.h" #include "walletmodel.h" #include "optionsmodel.h" #include "guiutil.h" #include "guiconstants.h" #include "init.h" #include "ui_interface.h" #include "qtipcserver.h" #include <QApplication> #include <QMessageBox> #include <QTextCo...
7adc02ee87d0625fb03d7c8f3d94a342c87d442d
41faee7963752aaacf1e16a49d2547467ce28425
jimvae/Computer-Graphics
/Project Code/Lab4/Camera.cpp
C++
cpp
825
no_license
#include <cmath> #include <cassert> #include "Vector3d.h" #include "Camera.h" using namespace std; Camera &Camera::setCamera( const Vector3d &eye, const Vector3d &lookAt, const Vector3d &upVector, double left, double right, double bottom, double top, double near, int ...
5de1b3d28ccaccd9feaa4b4ef2a5d28db42c1841
b703006e0d6cd56bc55e090cc28a0afec5f8623c
quanta-bmc/phosphor-pid-control
/dbus/dbusactiveread.hpp
C++
hpp
787
permissive
#pragma once #include "dbus/util.hpp" #include "interfaces.hpp" #include <memory> #include <sdbusplus/bus.hpp> #include <string> /* * This ReadInterface will actively reach out over dbus upon calling read to * get the value from whomever owns the associated dbus path. */ class DbusActiveRead : public ReadInterfac...
c104c522cb80b6c3e5778ca71add3098787953d8
0b115360ae019cf74e93d6dbbf30420b91f87658
raph-m/ml_on_author_prediction
/KNN/distances.cpp
C++
cpp
2,542
permissive
// ----------------------------- #include "distances.h" #include <algorithm> // to use transform funtion #include <numeric> // to use accumulate function #include <math.h> // to use pow function #include <cmath> #include <vector> #include <functional> // ------------------------------ // Euclidean constructo...
451d95fd8bb434ac71fa8426e2a60008eae4969c
c2680cbfc261fd1efd96d130089e9fc7771ba1cc
xinzweb/gporca
/libnaucrates/src/CDXLUtils.cpp
C++
cpp
58,184
permissive
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2010 Greenplum, Inc. // // @filename: // CDXLUtils.cpp // // @doc: // Implementation of the utility methods for parsing and searializing DXL. // // @owner: // // // @test: // // //------------------...
5cce5899b02fe216e6673a255ee1e23d37db870b
7c65c2b17a125479e35abf47686a755402b50ab7
vtmp/teletest
/include/SerialInterface.hpp
C++
hpp
845
permissive
#ifndef SERIALINTERFACE_H #define SERIALINTERFACE_H #include <libserialport.h> #include <iostream> #include <unistd.h> #include <string> #include "ConfigManager.hpp" #include "TeleAssertion.hpp" #include "CrcUtil.hpp" const static int BUFFER_SIZE = 64; const static int MAX_ATTEMPTS = 10; class SerialInterface { pub...
652b78b274e51302a731884027fff6887bef9896
1c3a196a34067deab2a2d765a91a9f373f69d7c9
GIORGIO988/Play-
/Source/gs/GSHandler.cpp
C++
cpp
53,707
permissive
#include <stdio.h> #include <string.h> #include <functional> #include "../AppConfig.h" #include "../Log.h" #include "../states/MemoryStateFile.h" #include "../states/RegisterStateFile.h" #include "../FrameDump.h" #include "../ee/INTC.h" #include "GSHandler.h" #include "GsPixelFormats.h" #include "string_format.h" //Sh...
c1b37fda04a00d8906654d5fbf710bb149e8e891
1e67a10c591d7e970bcc581acbe38bbe97abfa4b
Professor322/Data-Structures
/week1_basic_data_structures/3_network_simulation/process_packages.cpp
C++
cpp
2,296
no_license
#include <iostream> #include <queue> #include <vector> struct Request { Request(int arrival_time, int process_time): arrival_time(arrival_time), process_time(process_time) {} int arrival_time; int process_time; }; struct Response { Response(bool dropped, int start_time): d...
0cf7bf4e52f18b40dedab6921f524886f3d0a70e
16d0f6fd1e9b0c06bdf81bea43a0880799e604cb
arled/dogecoin
/src/policy/policy.cpp
C++
cpp
8,314
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // NOTE: This file is intended to be customised by the end user, and includes onl...
faeed84e322fd4dbd8f12163cba78302fb18c027
98aa652a45085aefb94fba9e8961f1f6011d9373
fmoessbauer/LossyCountingModel
/examples/batch/main.cpp
C++
cpp
2,383
permissive
/** * Applies a Lossy Counting Model on a data stream. * This example uses a synthetic stream which contains * normal distributed ASCII letters * * As the creation of random numbers is a bottleneck, this implementation * pre-calculates them */ #include <iostream> #include <random> #include <chrono> #include <ut...
26371dcf4528af99ef0a6b22c0ce966865b9cf14
95177063da600273ca9091a7ebf7e54b0eb8d90e
lcccc/nfcjcodes
/g2.cpp
C++
cpp
967
no_license
/* * Author: FreePascal * Created Time: 2011-8-24 15:51:16 * File Name: f.cpp */ #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <vector> #include <queue> using namespace std; #define out(v) cerr << #v << ": " << (v) << endl #define SZ(v) (...
b6b86ad5b00a6ac1b6a3fff765594c95f984d8a1
97090b605a61a3ad7f208c84bec0836bb4fbec54
davidemoraschi/ahttpserver_019_src
/ahttplib/ahttp/http_server.cpp
C++
cpp
31,226
no_license
/* This file is part of [ahttp] library. Author: Artem Kustikov (kustikoff[at]tut.by) version: 0.19 This code is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this code. Permission is granted to anyone to use this code ...
8aa0be082f4af8135fccc6e9bcc10b19395b8b64
7b5469f9502aff4ac63824a7cc10b006dbdc7bcc
kasakhare/CPP-Practice
/structures.cpp
C++
cpp
495
no_license
#include<iostream> using namespace std; struct person { char name[20]; int age; double salary; }; int main(){ person p1; cout<<"Person details"<<endl<<"Enter the person Name"<<endl; cin.getline(p1.name,20); cout<<"Enter age"<<endl; cin>>p1.age; cout<<"Enter salary"<<endl; cin...
0781acdaae0c0a1c56162dde207374113dba1957
a58bfca20031a1a8af461d5bb33ca13108c44261
mgroovyank/SPOJ-Online-Judge
/JULKA - Julka.cpp
C++
cpp
1,623
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; void add(string a,string b){ string c=""; int i; int la=a.length(); int lb=b.length(); if(lb<la){ swap(a,b); } int carry=0,sum=0; for(i=0;i<la;i++){ sum=(a[i]-'0')+(b[i]-'0')+carry; c.push_back((sum%10)+'0'); ...
d6b9e0c1a64713cb6a4250232d873f9a8061efc0
d90631de1510cce09f08f49bcda74b6f861281d1
marlonwc3/cp-codes
/Uva/Uva10608==Friends.cpp
C++
cpp
1,514
no_license
#include <bits/stdc++.h> #define _ printf("\n"); #define sc1(a) scanf("%d", &a) #define sc2(a,b) scanf("%d %d", &a, &b) #define sc3(a,b,c) scanf("%d %d %d", &a, &b, &c) #define iz(b) if(b==0) { break; } #define pb(a) push_back(a) #define inf 0x3f3f3f3f #define mst(a, b) memset(a, b, sizeof a) #define fr(i,a,b) for(int ...
b2770ccabd665d3b7cd88634b81a4d33a90125d5
093af6a689ed0a46702b8724ed0cd76224513ed0
ping203/cc2dx_design_fw
/iwin/Classes/Network/JSONMessageHandler.cpp
C++
cpp
1,615
no_license
#include "cocos2d.h" #include "JSONMessageHandler.h" #include "IwinCommand.h" #include "Network/Core/JsonMessage.h" #include "Network/JsonObject/Game/GameList.h" using namespace iwinmesage; //namespace util_hash //{ // // typedef std::uint64_t hash_t; // // constexpr hash_t prime = 0x100000001B3ull; // constexpr ha...
66bba5dac248c18f2d045493b047c009a9314e1d
b88f70a54eec797f8f845808ba17069f6ab66d16
Cruyun/LeetCode
/data_structure/binary_search_tree/098_ValidateBinarySearchTree.cpp
C++
cpp
610
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool isValidBST(TreeNode* root) { return helper(root, LONG_MIN, LONG_MAX); } bo...
a9b56d2616673b2179796adf4638dc83cbb09f57
60adb12959b844fcf79f19ab2c875661d49bb165
gondel/mikron
/src/qt/aboutdialog.cpp
C++
cpp
1,112
permissive
// Copyright (c) 2011-2013 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 "aboutdialog.h" #include "ui_aboutdialog.h" #include "clientmodel.h" #include "clientversion.h" // Copyright year (...
a7a8f7cffef149b96b15f15b8b95b3f859958dcd
6eb4038f9b0a2151c69d1a5f6697dc2a993d41b9
Yhatoh/ProgramacionCompetitivaUSM
/soluciones/RPC/2020-5/C_Soviet_Union_Find.cpp
C++
cpp
1,693
permissive
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector< ii > vii; typedef vector< vi > graph; typedef vector< vii > graphw; int main() { long long int i,j,k,m,n,R,C,A,B,sumA = 0,sumB = 0, aux; cin >> R >> C >> A >> B; vi ai; vi bi; ...
f8c01e06f395abe2bda6597ad279d76a560b7838
70bd497bee534a76be59b9f5b82468e542adaba1
kelompok-oop-sekar/reimagined-octo-funicular
/Product/ChickenOmelette.cpp
C++
cpp
404
no_license
#include "ChickenOmelette.h" string ChickenOmelette::className = "ChickenOmelette"; string ChickenOmelette::getClassName() { return className; } const string ChickenOmelette::ingredients[] = { "ChickenEgg", "ChickenEgg" }; int ChickenOmelette::price = 0; int ChickenOmelette::getPrice() { return pric...
689bbdd49a416651675f067ef976b4472dd78b10
01848201285a3b83cae4cb126394c78fb5d1bc5d
loganjeon/CPP_DesignPattern
/20160218/2_책임의전가.cpp
C++
cpp
1,634
no_license
#include "ioacademy.h" #include <iostream> #include <map> #include <vector> using namespace std; using namespace ioacademy; class Window { int handle; static map<int, Window*> this_map; //-------------------------------- Window* parent; // 부모 윈도우는 하나이다. vector<Window*> children; // 자식 윈...
4d090f01b873285d3b5f0d255c6cda2b6e9b7f9d
c80158ae9fbc283ba14588e44a883c21042f5758
peercoin/peercoin
/src/hash.cpp
C++
cpp
2,720
permissive
// Copyright (c) 2013-2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <hash.h> #include <span.h> #include <crypto/common.h> #include <crypto/hmac_sha512.h> #include <string> inline uin...
2f7744dd05cdb883ad97078d73cc8b9e4ba6ef1c
c42cf6df66482ca5c9b99fdaf1b96a75f13a75e9
legacyrp/legacyojp
/source/game/sqlite3/Database.cpp
C++
cpp
6,080
no_license
/* ** Database.cpp ** ** Published / author: 2005-08-12 / grymse@alhem.net **/ /* Copyright (C) 2001-2006 Anders Hedstrom This program is made available under the terms of the GNU GPL. If you would like to use this program in a closed-source application, a separate license agreement is available. Fo...
10d7426da1f872967a36c23595cb1b529f96f7f8
f3e7703c5c98f1811612a5a47823caf7478f6e08
kevin-huet/OOP_arcade_2019
/src/games/pacman/Clyde.cpp
C++
cpp
1,264
no_license
/* ** EPITECH PROJECT, 2020 ** OOP_arcade_2019 ** File description: ** Clyde */ #include "Clyde.hpp" void Clyde::chooseDirection(std::vector<std::vector<mapPoint>> map, Mob player) { coord destination; if (_moves.size() == 0) { destination = {rand() % map[0].size(), rand() % map.size()}; whil...
46548e3d4509a0e7e11456113fff39c0ee6b2cc5
6ffe846e27974fa33f6610f8e5a4633398b3fb93
zhiiw/Learning
/GraphOfBJTU/main.cpp
C++
cpp
266
no_license
#include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
9275686d4e43292ffab332fb4be4322abe85117e
1c5ce458191d6ddd1b35d9a44501f59de5afcfdc
taget/taget_bin
/net/lin_socket.cpp
C++
cpp
3,126
no_license
#include "lin_socket.h" #include "lin_exception.h" linsocket::linsocket(const int nPort, const char* ch_server) { _ch_server = ch_server; _nPort = nPort; DEBUG(_ch_server); DEBUG(_nPort); } int linsocket::init() { DEBUG("linsocket init"); DEBUG(_ch_server); if(_ch_server == NULL) { _type = SERVER; SocketSe...
71ec1f02b0f9172519b301d8950362fbdde92721
59cec284069b4b7e67f2284fb39ddf9b8eca8034
Jenova7/electra-core
/src/test/zerocoin_coinspend_tests.cpp
C++
cpp
2,918
permissive
// Copyright (c) 2017-2018 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "libzerocoin/Denominations.h" #include "libzerocoin/CoinSpend.h" #include "libzerocoin/Accumulator.h" #include "primitives/z...
11a554b8cc5edbdfbd5fa7cde51a0fe890cf2320
5e3d49f95285c7e7a4685577937cce4ef95b6d09
ldehaudt/Rubik_Solver
/Display.hpp
C++
hpp
1,645
no_license
#ifndef DISPLAY_HPP # define DISPLAY_HPP # include <math.h> # include <OpenGL/gl3.h> # include <GLFW/glfw3.h> # include "rubik.hpp" # define ORANGE "\e[1;38;2;255;120;10m" # define RED "\e[1;38;2;225;20;20m" # define WHITESPACE " \t\n\r" # define PI 3.1415926 # define FAR 50 # define NEAR 0.1 # define nv 648 struct...
c437562213fcbe50e9b4a8fcc8b560b14f85c883
882257806880bbc839b21a1455949a97ca4ab83a
hoverzhao/CPlusPlus17-STL-Solutions
/Section06/Ex14/readable_error_msg.cpp
C++
cpp
559
permissive
#include <iostream> #include <fstream> #include <system_error> #include <cstring> using namespace std; int main() { ifstream f; f.exceptions(f.failbit | f.badbit); try { f.open("memes.txt"); int i; f >> i; cout << "integer has value: " << i << '\n'; } catch (cons...
5cca621c05046c289a6fce506df171c4e7345606
4914de02aa0a0d96f0a1fa959f08cd9993873d98
PyroFlareX/CraftGame
/src/Renderers/ComputeRenderer.cpp
C++
cpp
269
permissive
#include "ComputeRenderer.h" ComputeRenderer::ComputeRenderer() { m_shader.addShader("res/Shaders/Other/compute.glsl", GL_COMPUTE_SHADER); } void ComputeRenderer::render() { m_shader.use(); glDispatchCompute(1, 1, 1); } ComputeRenderer::~ComputeRenderer() { }
717913061512513842400de6d530557efa9acfa7
9f73a86083ad17f82386eeb82f928908259ce5fc
marstone/cloud9
/lib/Data/ExprDeserializer.cpp
C++
cpp
12,296
permissive
/* * Cloud9 Parallel Symbolic Execution Engine * * Copyright 2012 Google Inc. All Rights Reserved. * Author: sbucur@google.com (Stefan Bucur) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributio...
37bb0e8bceb6d98764efe2b1263aec6f7afd92e6
c053199665f943897c134af963af3205a3bf351e
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13816/function13816_schedule_5/function13816_schedule_5.cpp
C++
cpp
1,203
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function13816_schedule_5"); constant c0("c0", 128), c1("c1", 64), c2("c2", 64), c3("c3", 64); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i3("i3", 0, c3), i01("i01"), i02("i02"), i03("i03...
3fb63c5bf391709280ccebadfe7c538f1945c6a9
b4171cd6be28142f17ec753e68c9abe6ee8a632f
shashankatgit/practice-codes
/hackerrank/contest/divexplo.cpp
C++
cpp
3,204
no_license
#include <bits/stdc++.h> using namespace std; int countP=0; unsigned int* primes; void simpleSieve(int limit, vector<int> &prime) { // Create a boolean array "mark[0..n-1]" and initialize // all entries of it as true. A value in mark[p] will // finally be false if 'p' is Not a prime, else true. bool ma...
adfbc704aa0649d00b098f86f4823ec5fcf2a673
043a3348738824266fa6b7ddb07777b4133f5b57
jtendless/G8H_VisionAgent
/Module/Flow/InspectPpaFlow.cpp
C++
cpp
56,779
no_license
/****************************************************************************** * @file InspectPpaFlow.cpp * @date * @history * ******************************************************************************/ #include "stdafx.h" #include "InspectPpaFlow.h" #include "VisionAgentDlg.h" #include "Vision/Devs.h" ...
31e3d4cd92903f21217d75f502d5a7d6ff516f6a
485b838d1a090e220470a8b70e4457ea06b31cf0
nanoo-linux/test
/cpp/tango/StateScanner/StateScanner.cpp
C++
cpp
18,305
no_license
/*----- PROTECTED REGION ID(StateScanner.cpp) ENABLED START -----*/ static const char *RcsId = "$Id: $"; //============================================================================= // // file : StateScanner.cpp // // description : C++ source for the StateScanner and its commands. // The class ...
9bbca2ba38c58616be34ba5e087b7a9002c7b474
8a45446e1cac6f164643e2a80c98e06d3f68e808
VyankteshVyas/Competitve-Coding
/LeetCode Problems/Invert Binary tree.cpp
C++
cpp
715
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
95f2d75506b28b9a04bfff7b266ef575d5bf1a29
ad4bb34fe1922855028eca9c1b83639e93dc1ec2
facundososagonzales/pa-2021-lab6
/ctrl/CtrlEnvioMensaje.cpp
C++
cpp
2,859
no_license
#include "CtrlEnvioMensaje.h" #include "../handler/HandlerClase.h" #include "../handler/HandlerUsuario.h" #include "../class/Sesion.h" #include <time.h> CtrlEnvioMensaje::CtrlEnvioMensaje(){} list<int> CtrlEnvioMensaje::claseOnlineAsistiendo(){ this->idp=0; Sesion* sesion = Sesion::getInstancia();...
15f20e82f01098a2550589e3d48fe28c1886944b
96e9172b7134c62cff5f527c047fbd62bf9a1a11
finalspace/leetcode
/algorithms/reverseLinkedListII.cpp
C++
cpp
1,706
permissive
// Source : https://leetcode.com/problems/reverse-linked-list-ii/ // Author : Siyuan Xu // Date : 2015-08-14 /********************************************************************************** * * Reverse a linked list from position m to n. Do it in-place and in one-pass. * * For example: * Given 1->2->3->4->5->N...
e426be93792b58949a04de2e44e1f539da910a4a
d854d99d3ba6d2b0e30fe55b3c5046cb256b8394
Assumeru/mygui
/Tools/EditorFramework/FocusInfoControl.cpp
C++
cpp
2,620
permissive
/*! @file @author Albert Semenov @date 07/2012 */ #include "Precompiled.h" #include "FocusInfoControl.h" #include "CommandManager.h" #include "SettingsManager.h" namespace tools { FocusInfoControl::FocusInfoControl() : mMouseView(nullptr), mKeyView(nullptr) { } FocusInfoControl::~FocusInfoControl() { ...
7d5999d9a9e7ec62bd4ca3868e2ecdc279df2ab9
d4c77e4c25964527f9b6cd84bce1f9189deef2b6
gartuaden/AdvancedSoftware
/고소실_6주차과제/project6/program3_1.cpp
C++
cpp
6,047
no_license
#include "my_solver.h" #define SOLNUMS 4 #define MATCOLS SOLNUMS #define MATROWS SOLNUMS #define TOLERANCE 0.0000001 double p[4][5] = {}; double C = 0.0, b = 0.0; void f3_1_b(int* n, double* x, double* fvec, int* iflag) { /********************************/ fvec[0] = (x[0] - p[0][0]) * (x[0] - p[0]...
9042ba394d3902c9b28de7c0fe0591cd1383e6ea
bc8cc575a55e58019022489d9b7894ab3425491e
JTippetts/ANLEditor
/TerrainEdit.cpp
C++
cpp
83,518
permissive
#define ANL_IMPLEMENTATION #define ANL_LONG_PERIOD_HASHING #include "TerrainEdit.h" #include <Urho3D/Resource/ResourceCache.h> #include <Urho3D/Scene/Node.h> #include <Urho3D/Graphics/Material.h> #include <algorithm> #include <cmath> #include <Urho3D/IO/Log.h> #include <Urho3D/Resource/Image.h> #include <Urho3D/IO/De...
7010a77cf75709dc988e5de6555e830d80396bf3
148a6fd5cae4a9714529c182923177091501c7d0
reputationaire-github-sonarcloud/CompProg
/Codeforces/Solved/59A Word.cpp
C++
cpp
523
no_license
#include<bits/stdc++.h> using namespace std; int main(){ string badword; cin>>badword; int ucounter=0,lcounter=0; for(int i=0;i<badword.length();i++){ if(badword.at(i)>=97){ lcounter++; } else{ ucounter++; } } if(ucounter>lcounter){ for(int i=0;i<badword.length();i++){ ...
f6af43a7954f1a2f891f8cfb23f79773db348a12
5bbf8113e7cbc11cf78ca6109fbf37ed6232a4a8
Samsung/TizenRT
/external/iotivity/iotivity_1.2-rel/resource/csdk/security/provisioning/unittest/provisioningdatabasemanager.cpp
C++
cpp
11,427
permissive
/* ***************************************************************** * * Copyright 2015 Samsung Electronics 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 *...
614479abe6c66216da1b8731c7f33e5bdb965c81
a5345e2fa378a16e3ec6c2054be3dd242c3e460d
SushanBasnet/IndividualStudy
/BinaryTrees/InvertBinaryTreeRecursive.cpp
C++
cpp
613
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: void invertHelper(TreeNode* root) { if(root==NULL) return; TreeNode* tmp = root...
30d89f58d8055b264aea71598e6f359af13259fb
da00d8120248a9fc74e05470c4363145d7e26f0e
ms-darshan/Competitive-Coding
/HackerRank/HackerRank_Waver's_Flight.cpp
C++
cpp
1,932
no_license
/*~~~~~~~~~~~~~~~~~~* * * * $Dollar Akshay$ * * * *~~~~~~~~~~~~~~~~~~*/ //https://www.hackerrank.com/contests/indeed-prime-challenge/challenges/waver1 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include <time.h> #include <assert.h...
e0bc2afe7442db51caee3ed9b88f440dbb8a4f7d
f7d15b1ed1cb128e8e97228a417bee4244db92f9
hixfield/HixArduino
/src/HixAnalogJoystick.cpp
C++
cpp
2,341
permissive
#include "HixAnalogJoystick.h" #include <arduino.h> HixAnalogJoystick::HixAnalogJoystick(int nPinX, int nPinY, int nMinX, int nMaxX, int nRestX, int nMinY, int nMaxY, int nRestY ...
f0fed8434ada537db19aeec86ad326fbdc7ba468
1bf40623392de4fcfe9d032938129a42547ed7b3
DFChainLab/DFC
/contracts/dfciolib/public_key.hpp
C++
hpp
1,001
permissive
#pragma once #include <dfciolib/varint.hpp> #include <dfciolib/serialize.hpp> namespace dfcio { /** * @defgroup publickeytype Public Key Type * @ingroup types * @brief Specifies public key type * * @{ */ /** * DFCIO Public Key * @brief DFCIO Public Key */ struct public_...
9029735f0422cdeca8e7c353945d5619ae0c747f
667ca3158f2ecfa2fb25d989fc51c24a67e96888
ThalinsGenohan/CTGUI
/src/CTGUI/Widgets/Group.cpp
C++
cpp
1,491
permissive
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface // Copyright (C) 2012-2020 Bruno Van de Velde (vdv_b@tgui.eu) // // This software is provided 'as-is', without any express or implied warranty. /...
615c278726e25f2b5f3c7ec1ceeaf9e744ebe998
cd5ac67309b81728334452bcba38e4032450cd0b
InteractiveComputerGraphics/PositionBasedDynamics
/Demos/StiffRodsDemos/StiffRodsSceneLoader.cpp
C++
cpp
18,875
permissive
#include "StiffRodsSceneLoader.h" #include "Utils/FileSystem.h" #include "Utils/Logger.h" using namespace PBD; using namespace Utilities; void StiffRodsSceneLoader::parseStiffRodsData(const nlohmann::json &child, SceneData &sceneData, const std::string &basePath) { if (m_json.find("RodAnimators") != m_json.end()) ...
3205a2f24d41657ba22575cc57518fbc2f3d58fe
7d2d46f9f5ac871031cd35e1b48539e542edf997
kch1285/Algorithms
/SWEA/D3/SWEA11856.cpp
C++
cpp
522
no_license
#include<iostream> #include <set> using namespace std; int main(int argc, char** argv) { int test_case; int T; cin>>T; for(test_case = 1; test_case <= T; ++test_case) { string input; set<char> s; cin >> input; for(int i=0;i<4;i++){ s.insert(input[i]); } ...
a89589fcb93295e866921f3acc36216a398423b3
51ef8578e81b214d4e8ea7856c976a093d3b3c8f
cw100/SoT-SDK
/SDK/SoT_BP_TreasureChest_ItemInfo_Legendary_DVR_classes.hpp
C++
hpp
1,051
no_license
#pragma once // Sea of Thieves (1.4) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_TreasureChest_ItemInfo_Legendary_DVR_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //------------------------------------------------------...
1122f8f290e4a06576d1d972cb3cc1f5252a4877
ef0b5e200d7e2aa44be1380fc6bf853804ca3008
dipanshisurana/adalab
/coin.cpp
C++
cpp
1,060
no_license
#include <iostream> #include <cmath> #include <climits> using namespace std; int *C, *d, *S; /* d[] contains denominations; C[] contains the minimum coin change for an amount p, 0<=p<=A; S[] contains the coins selected to give minimum change */ void minCoinChange(int A, int n){ C = new int[A+1]; S = new int[A+1...
a406bb490ff683e1088a463fb83092fa90d070bd
1106ea377a2af2112214ca6d9fe7ab6db98e3029
rmbozhko/ComputorV2
/main.cpp
C++
cpp
575
no_license
#include "headers/main.hpp" int main(const int argc, const char* argv[]) { if (argc == 1) { char* str; int res; while ((str = readline("> ")) != nullptr) { if (*str) { scan_string(str); res = yyparse...