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 |
|---|---|---|---|---|---|---|---|---|
2b24231e803170cc550effe62dac65de35e707a4 | 65ed7323842fac2865b67e6d2cdabea3e29eb6d7 | tangjz/acm-icpc | /codeforces/gym/101385A.cpp | C++ | cpp | 1,515 | permissive | #include <bits/stdc++.h>
typedef long long LL;
typedef double DB;
const int maxn = 51, maxd = 1 << 16 | 1, maxt = (int)1e6;
int n, k, m, bits[maxd];
LL sum, c[maxn][maxn], msk[maxn];
DB ans;
char buf[maxn];
inline int randL() {
return RAND_MAX == 0x7FFF ? rand() << 15 | rand() : rand();
}
inline LL randLL() {
return ... |
fa0f9eeeb9faecf536743461a3ca70dbaa8863aa | 1c3e2cad83c6e10445ee11d02646f1fea15c7028 | mehadi-trackrep/ACM_Programming_related | /Others/...CHECK/++++Algorithm====/articulation point.cpp | C++ | cpp | 1,957 | no_license | /*
BISMILLAH HIR RAHMANIR RAHIM
###########################################################################
# #
# // // ////// // // /\ //////\\ ///////// #
# // / / // // // // ... |
e6e07847b4bc1829e20bceb5955cf00d597f58a6 | dcd3352e3cce0316ebbd808a1ec9de300a0e5a33 | tgockel/json-voorhees | /src/jsonv-tests/stopwatch.cpp | C++ | cpp | 336 | permissive | #include "chrono_io.hpp"
#include "stopwatch.hpp"
#include <ostream>
namespace jsonv_test
{
std::ostream& operator<<(std::ostream& os, const stopwatch::values& x)
{
os << "{\"total\": \"" << x.sum << '\"';
os << ", \"count\": " << x.count;
os << ", \"mean\": \"" << x.mean << '\"';
os << '}';
... |
354af368bb299ace64f6ce821de626c4819c63fd | 49672c32001a8a96e51237a47351cfc27065659f | dreamboy9/fuchsia | /src/media/drivers/amlogic_decoder/h264_utils.cc | C++ | cc | 1,744 | permissive | // Copyright 2020 The Fuchsia 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 "h264_utils.h"
#include <cstring>
namespace amlogic_decoder {
std::vector<std::vector<uint8_t>> SplitNalUnits(const uint8_t* start_data, uint32_... |
56c8b6b1dd3960379aabd63b7c1f7000162b8d49 | 5701b78219f304eee91ccabc5f03152811da4e92 | MalcolmWilliams/Umbrella | /src/main.cpp | C++ | cpp | 1,835 | no_license | /*
* Only ESP plus small LED:
* Average power consumption: 32.5mW
* Max: 240mW
*/
#include "ESP8266WiFi.h"
#include "BrightnessMap.h"
unsigned long start_time; // = micros();
unsigned long end_time; // = micros();
int nets;
int LEDpin = 0;
void setBrightness(int val);
void printScanResult(int networksFound);
... |
debbf67cfba89f6374d29ca73a3f7aed8393e5e7 | 58b3affe54cd076db37d0a3b80aaeaed4920ceb1 | Beth-Hanson/University-Work-Cpts122 | /PA-8/PA-8/main.cpp | C++ | cpp | 334 | no_license | /*Programmer: Beth Hanson
Class: CptS 122, Fall 2018
Programming Assignment: Project 8
File: main.cpp
Date: 11/15/18
Description: */
#include "Node.h"
#include "TransactionNode.h"
#include "BST.h"
#include "DataAnalysis.h"
int main() {
DataAnalysis program;
program.runAnalysis();
system("pause");
... |
fdffeaa8c1e048902efb0bbc8f1dd0c864c403ef | 8a5aa40bc7f20b644df557e74fb90062f668d4e9 | AndyAyersMS/llvm | /lib/Target/X86/X86WinEHState.cpp | C++ | cpp | 16,869 | permissive | //===-- X86WinEHState - Insert EH state updates for win32 exceptions ------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
c22767b16609f87d645f6a0c132824387c16edb4 | b075cdecf3e814301b6022a093ee00392e291950 | kgwong/2DPlatformEngine | /Test_Game/GameObject.cpp | C++ | cpp | 1,707 | no_license | #include "GameObject.h"
GameObject::GameObject()
:width_(0), height_(0)
{
}
GameObject::~GameObject()
{
}
void GameObject::setPos(int x, int y)
{
position.x = x;
position.y = y;
}
void GameObject::setPos(Point newPosition)
{
position = newPosition;
}
void GameObject::setPosX(int x)
{
position.x = x;
}
void ... |
3ca6b1876bb4a4d330ef7e801060d9f60f527400 | 2c773da17c268b6a79c8a1aa0e1ff68e80fa20a7 | manuLlanos/TicTacToe | /src/Random.cpp | C++ | cpp | 282 | no_license |
#include "../headers/Random.h"
unsigned Random(unsigned m, unsigned M)
{
return m + rand()%(M-m);
}
unsigned Random(unsigned M)
{
return Random(0,M);
}
double RandomPorcentaje() // return a percetage [0;1) with 4 precission digits
{
return (double )Random(10000)/10000;
}
|
7ea04ba08793362e7f1bd86f250a3a1475ef8611 | 63d1d252a07488dcaf0cedee1002dc9a5900a581 | MaximeFarrugia/CPE_Corewar_2018 | /bonus/corewar/src/error_handling_parameter.cpp | C++ | cpp | 2,079 | no_license | /*
** EPITECH PROJECT, 2019
** corewar
** File description:
** error_handling_parameter
*/
#include "../../include/vm.hpp"
int add_in_save(int nb)
{
static int save[4] = { 0, 0, 0, 0 };
int j = -1;
if (nb <= 0 || nb > 4) {
std::cout << "-n argument " << nb << " is invalid." << std::endl;
... |
c626ab3169e047355e9ee856af771ad119b16977 | fe52e15080d5b9bada74f906e6a0fcd5fb6493d2 | KirillFurtikov/OrionUO | /OrionUO/Managers/FontsManager.cpp | C++ | cpp | 71,221 | permissive | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/***********************************************************************************
**
** FontsManager.cpp
**
** Copyright (C) August 2016 Hotride
**
********... |
37033e12cecc74cefd991403a141e1fbf669f82a | 8cd7152d784380ac2aec2a0b473db5decd66e958 | makaisson/BansheeEngine | /Source/RenderBeast/Source/BsLightRendering.cpp | C++ | cpp | 9,828 | no_license | //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
//**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************//
#include "BsLightRendering.h"
#include "BsMaterial.h"
#include "Bs... |
d233f13ed753b2ad96e005f57585d88617a786d4 | 404210d8fe64dcaf652556e6d7beeca283de18ea | tutidap/Chunicoin | /src/test/scheduler_tests.cpp | C++ | cpp | 4,926 | permissive | // Copyright (c) 2012-2013 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 "random.h"
#include "scheduler.h"
#if defined(HAVE_CONFIG_H)
#include "config/chunicoin-config.h"
#else
#define HAVE... |
5e4060ef8e7930f7be8b883921813886a9126e73 | 0ef2b72c0196b4c9cd57f3475507a028e040859a | fsps60312/old-C-code | /C++ code/Uva Online Judge/Q1489.cpp | C++ | cpp | 609 | no_license | #include<cstdio>
#include<map>
#define LL long long
using namespace std;
const LL MOD=1000000003;
int N,K,V[50];
map<int,LL> SET;
int main()
{
while(scanf("%d%d",&N,&K)==2&&(N||K))
{
for(int i=0;i<N;i++)scanf("%d",V+i);
int hn=N/2;
for(int s=(1<<hn)-1,v=0,i;s>=0;s--,v=0)
{
for(i=0;i<N;i++)if(s&(1<<i))v^=V[... |
08c4c7927b607e60ae79255ec520318239f96c8f | 482eb94debed60846776c881c9e55477441ffebf | janjongboom/mbed-js-http | /source/mbed-js-httprequest.cpp | C++ | cpp | 9,372 | no_license | /* Generated by https://github.com/janjongboom/mbed-js-wrapper-generator */
#include "jerryscript-mbed-util/logging.h"
#include "jerryscript-mbed-library-registry/wrap_tools.h"
#include "mbed.h"
#include "http_request.h"
#include "mbed-js-httpresponse.h"
/**
* HttpRequest#send (native JavaScript method)
*/
DECLARE... |
a20fc4112f83b11e6d901de32829dfa5a34bd33c | 902ec91b71f0b0691d4e1b3b9e440047f902a3ab | aws/aws-iot-device-sdk-cpp | /src/jobs/Jobs.cpp | C++ | cpp | 13,586 | permissive | /*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "lice... |
035bad94814b825db14cc2532e0f859b382a82c6 | c6637f30b6d659061adedfb284c32b30f2b13ea6 | dotnfc/abao_Good-Display | /Raspberry Pi/12.48/bcm2835_1248T3/epdif.cpp | C++ | cpp | 1,818 | no_license | #include "epdif.h"
#include <bcm2835.h>
EpdIf::EpdIf() {
};
EpdIf::~EpdIf() {
};
void EpdIf::DigitalWrite(int pin, int value) {
bcm2835_gpio_write(pin, value);
}
int EpdIf::DigitalRead(int pin) {
return bcm2835_gpio_lev(pin);
}
void EpdIf::DelayMs(unsigned int delaytime) {
bcm2835_delay(delaytime);
}
v... |
a57b6e56815232cc495201283eac148321495c2e | 7c33df2d6c0b25d27124c6f5e0c7c9ead31b92a1 | wphu/SmileiSE | /src/Smilei.cpp | C++ | cpp | 22,069 | no_license | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// ... |
ac8b504a1e015beb0624613914891b136071e5be | 45faf75494e282ab4ebc027e77142ae9ebef189c | IvanAli/CP | /UVa/12189.cpp | C++ | cpp | 1,287 | no_license | /*
* 12189.cpp
*
* Created on: Aug 16, 2015
* Author: Ivan
*/
// 12189 - Dinner Hall
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
typedef vector<int> vi;
struct Card {
int t;
char e;
Card(int time, char event): t(time), e(event) {}
int E() { return e == 'E' ? 1 : 0; }... |
67146a87302e3415247017540a006bfbd4c04d66 | a0efa223566b89a6795cc60b9f2990fae8c2895b | Noctis-AKM/leetcode101 | /book_leetcode101/ch7/279.cpp | C++ | cpp | 412 | no_license | //
// Created by akio on 2020/10/30.
//
#include <vector>
#include <climits>
using namespace std;
class Solution {
public:
int numSquares(int n) {
vector<int> dp(n + 1, INT_MAX);
dp[0] = 0;
for (int i = 1; i < n + 1; ++i) {
for (int j = 1; j * j < i; ++j) {
dp[i]... |
71a4739a3ddd56f593ea9bc11ab1a19804019915 | e7bfbfa932da183a3be06b4460d57101d22a91b5 | wsczq1/straid | /code/src/trace_st.cc | C++ | cc | 11,201 | no_license | #include <iostream>
#include <fstream>
#include <thread>
#include <vector>
#include <string>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <assert.h>
#include <atomic>
#include <cds/init.h>
#include <cds/threading/model.h>
#include <cds/container/feldm... |
dd273eada63e9a1ec7430ff9f80e64debc6d85b3 | c7bd6df159a22d509f7e0972f7cc933231fa3d5d | sailfish009/lfortran | /src/lfortran/ast_to_openmp.cpp | C++ | cpp | 28,762 | permissive | #include <lfortran/ast_to_openmp.h>
using LFortran::AST::expr_t;
using LFortran::AST::Name_t;
using LFortran::AST::Num_t;
using LFortran::AST::BinOp_t;
using LFortran::AST::operatorType;
using LFortran::AST::BaseVisitor;
namespace LFortran {
namespace {
std::string op2str(const operatorType type)
{
... |
d6c842898581427b8cb5112a65a1ea294ec50185 | 315caaac4167d183d2b6696db4f53ce3abc1fb33 | bendell02/nowCoder | /01_code/prj171_diffOfTwoDates.cpp | C++ | cpp | 1,058 | no_license | #include <iostream>
#include <cstdlib>
using namespace std;
int cumMonthLeapYear[12] = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};
int cumMonthCommonYear[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
bool isLeapYear(int &year)
{
if((year%4==0 && year%100) || year%400==0) {
r... |
449c5ea6028d1da4c04b63eb6788092ff5d860c7 | 98d47ac114d1d8f74a5638cb28cc00aa36439a13 | iDang3r/MyGraphicLib | /Engine_protocol.cpp | C++ | cpp | 1,274 | no_license | #include "Engine_protocol.hpp"
int Engine_protocol::init() {return 1;}
int Engine_protocol::terminate() {return 1;}
int Engine_protocol::is_run() {retu... |
4d1733cc13f2c791c661ef7b77b72677955206bd | 92280d475b60ecf76866f95f67848c04dbfaf663 | opsopsops1/cpp | /CompetitiveProgramming/atcoder/abc197e.cpp | C++ | cpp | 1,126 | no_license | // https://atcoder.jp/contests/abc197/tasks/abc197_e
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
using vi = vector<int>;
#define rep(i,n) for(int i=0; i<(int)(n); ++i)
const int INF = 1001001001;
const ll IINF = 1ll<<60;
int main() {
ios::sync_with_stdio(false);
ci... |
831a3836acb31e83e89bb8d9d84256700d45baa7 | 67933baa811cacd352f3ae3a309477a3d4c9a27d | sshyran/v8 | /src/compiler/access-builder.cc | C++ | cc | 39,265 | permissive | // Copyright 2014 the V8 project 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 "src/compiler/access-builder.h"
#include "src/compiler/type-cache.h"
#include "src/contexts.h"
#include "src/frames.h"
#include "src/handles-i... |
bcfd09ef2b91918b600d55acccb7fcb2c7b0a319 | 7c75c4baf6684926d9fd0208a74928ec3c4c0a6f | lyapple2008/SpeakerVerification_based_on_Kaldi | /kaldi/src/kwsbin/print-proxy-keywords.cc | C++ | cc | 4,392 | permissive | // kwsbin/print-proxy-keywords.cc
//
// Copyright 2014-2016 Johns Hopkins University (Author: Guoguo Chen,
// Yenda Trmal)
//
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
//... |
268ff88fb9bc7a3f17413f72b80a62d95041f472 | 90c2e41961365cd193914c8cb39dd2f9074d74ea | metashell/headers | /headers/boost/1.31.0/boost/signals/connection.hpp | C++ | hpp | 7,955 | no_license | // Boost.Signals library
// Copyright Doug Gregor 2001-2003. 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)
// For more information, see http://www.boost.org
#ifndef BOOST_SIGNA... |
870b3bd57d12c0f2f548c92ca0c3de445c76a818 | afa6e3d740540eb8ae781b77cf1daf924068bfea | swagggpickle/etl | /test/test_overload.cpp | C++ | cpp | 4,974 | permissive | /******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2015 John Wellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and asso... |
efa5ee9357daf539744756f3b280a959eae92ff0 | 81a51151a5c2b787353e235f9ddd64a553c6eade | hdi-superuser/Codes | /HackerRank/Hacker Earth ACM Practice 2015/E.cpp | C++ | cpp | 995 | no_license | #include <bits/stdc++.h>
#define pb push_back
#define sqr(x) (x)*(x)
#define sz(a) int(a.size())
#define reset(a,b) memset(a,b,sizeof(a))
#define oo 1000000007
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
const int maxn=100007;
int n,T[maxn],m,k,d[maxn],myq[maxn];
vector<pii> e[maxn];
int m... |
a5a65fcf6a09d88680d65143dfa67ea80b64fe2a | aaa9cb6c2cb10c9862d84bb6d1ee06bbe958cf42 | ouabache/fossi | /tools/kactus2/kactus2-3.1.0/Plugins/TLMWGenerator/TLMWGeneratorPlugin.cpp | C++ | cpp | 6,888 | no_license | //-----------------------------------------------------------------------------
// File: TLMWGeneratorPlugin.cpp
//-----------------------------------------------------------------------------
// Project: Kactus 2
// Author: Janne Virtanen
// Date: 13.7.2015
//
// Description:
// TLMW generator plugin.
//-----... |
3e419fbc07e774101eec8cbcf4f3ca64d18711f4 | 07c95610de593bd36eedd6b3dd96b324ea783343 | hanrick2000/MyCompetitiveCoding | /GraphEssential.cpp | C++ | cpp | 18,610 | no_license | #include<bits/stdc++.h>
using namespace std;
#define nl endl
#define ll long long
#define vb vector<bool>
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef map<int,... |
c53903483d459bf232c1dc630af36e13dfefacc4 | 3cbabf1c1d9e694f664a949465a6f478e3cde32d | rajatjain-21/Codeforces-solutions | /629A.cpp | C++ | cpp | 685 | no_license | #include <iostream> // std::cout
#include <algorithm> // std::lower_bound, std::upper_bound, std::sort
#include <vector> // std::vector
using namespace std;
int main () {
long int n,m;
cin>>n;
long int a[n+1],t[n+1];
for(long int i=1;i<=n;i++)cin>>a[i];
for(long int i=2;i<=n;i++)
{
... |
8eebf6785223d874482b81419b0be52eeb5a2706 | f1ef400e99629ad2c8a6bd93b6baab1c4312697b | LiWei1999/seu_unirobot_backup | /src/controller/player/fsm/fsm_state_goto_ball.hpp | C++ | hpp | 700 | no_license | #ifndef __FSM_STATE_GOTO_BALL_HPP
#define __FSM_STATE_GOTO_BALL_HPP
#include "fsm.hpp"
class FSMStateGotoBall: public FSMState
{
public:
FSMStateGotoBall(FSM_Ptr fsm): FSMState(fsm)
{
enter_kick_dis_ = 0.3;
retreat_x_dis_ = 0.2;
retreat_y_dis_ = 0.1;
}
task_list OnStateEn... |
83ba121b5078163e2f0d38f3b9c758b788a68075 | 515481b9f31950c387803e4c927801f108ffd840 | uel-dataexchange/Opencascade_uel | /inc/StepShape_Vertex.hxx | C++ | hxx | 1,080 | no_license | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _StepShape_Vertex_HeaderFile
#define ... |
5392cedb0ed47daaf64516061ec5c0f1a3d01363 | 865ef5392107d3fdb0f49ff6709c1adebbfce9c4 | soumik9876/UVA-Solutions | /UVA 410 - Station Balance.cpp | C++ | cpp | 2,425 | no_license | #include<bits/stdc++.h>
#define endl '\n'
#define time clock_t tStart = clock();
#define show printf("Time taken: %.6fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
#define ll long long int
#define loop(a,b) for(int i=a;i<=b;++i)
#define count_1(n) __builtin_popcountll(n)
#define pb ... |
6d4d9266e239ac3c64ee84a04d71f3b65f744988 | f980c41d5f04f2ebab0487c3b65d63a224736729 | EANadim/Codeforces | /811A - Vladik and Courtesy.cpp | C++ | cpp | 652 | no_license | #include <iostream>
#define pi 2.0*acos(0.0)
#define MAX 100005
typedef long long ll;
using namespace std;
int main()
{
ll x=1,a,b;
cin>>a>>b;
loop:
if(x%2!=0)
{
a=a-x;
if(a<0)
{
cout<<"Vladik";
r... |
dea457044ed0422f88b6fb3f907dcee68e7d8046 | e6efe423c27acc50e5797ece0abdcd4dfc610774 | beinnova/cpp-exercise | /Capitolo 11/exe-11.4.cpp | C++ | cpp | 859 | no_license | // Esercizio 11.4 - Calcolare il nuero di bit impostati in un intero
#include <iostream>
#include <assert.h>
int user_number; //Numero inserito dall'utente
int bit_calculator(unsigned int number);
int main(){
std::cout << "Inserisci un nemero:";
std::cin >> user_number;
std::cout << "I bit impostati per il... |
06a30c2cc9995fdcb618e80e83383d62a27cdf0f | 3095414a4cf56f106ba696c67a09d30c5791f59e | vslavik/poedit | /deps/boost/libs/random/test/test_lagged_fibonacci607.cpp | C++ | cpp | 708 | permissive | /* test_lagged_fibonacci607.cpp
*
* Copyright Steven Watanabe 2011
* 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)
*
* $Id$
*
*/
#include <boost/random/lagged_fibonacci.hpp>
#define BOOST_RANDOM_URNG boos... |
3e0d59e8b97a3a11353fc40a56bda33df584a29c | 89102f5c88f518593c730f25f78a613ee33b52de | yancouto/maratona-sua-mae | /SuaMae/contests/ASC37/G/G.cpp | C++ | cpp | 1,013 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++)
template<typename T> inline T abs(T t) { return t < 0?... |
f82118872044257b6740599e104ea0627a501a95 | 750be5f3a69623b00cf4061fde7182c593013717 | fritruc/Bolt | /src/Core/MainMenu/Core.MainMenu.MenuItem.cpp | C++ | cpp | 2,546 | no_license | #include "Core.MainMenu.MenuItem.h"
#include "Core.Application.Application.h"
#include <SFML/Graphics.hpp>
#define ITEM_COLOR sf::Color( 255, 0, 0 )
#define ITEM_FONT "resources/Shared/Fonts/arial.ttf"
#define ITEM_CHARACTER_SIZE 24
namespace nMainMenu {
cMenuItem::cMenuItem( cMainMenu* iMasterMenu, const std... |
d51d278bdbc0510516df62361eeb2e566b3e0a3e | 6438706aabaf13827d6e50b02c8fb28801e232bb | fishy15/competitive_programming | /oi/usaco/train/ch4/4.2_network_flow/job.cpp | C++ | cpp | 1,564 | no_license | /*
ID: aaryan.1
TASK: job
LANG: C++14
*/
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <array>
#include <algorithm>
#include <utility>
#include <map>
#include <queue>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#define ll long long
#define ld long double
... |
e66496fa4ae4de16a96f301f9188352a84224230 | 5bbdf6f15b8a747a4bacda469f5e7ead3453bfea | 12jchuang/flightsimulator6 | /so_texture.cpp | C++ | cpp | 5,878 | no_license |
# include "so_texture.h"
SoTriangles::SoTriangles()
{
_numelements=0;
}
// init programs here, this will be done only once:
void SoTriangles::init (const char *file, GLuint *textures)
{
// Build program:
_vsh.load_and_compile ( GL_VERTEX_SHADER, "../shaders/vsh_smtl_tex_gouraud.glsl" );
_fsh.load_and_... |
5ec3fd1fd0f79faa994967244a208d9eb87bfe94 | d2980f0d460008d42d50bfd59740818cbbca5276 | DiegoCanno/Pacman | /libraries/basics/code/base/headers/basics/internal/Id.hpp | C++ | hpp | 421 | permissive | /*
* ID
* Copyright © 2017+ Ángel Rodríguez Ballesteros
*
* Distributed under the Boost Software License, version 1.0
* See documents/LICENSE.TXT or www.boost.org/LICENSE_1_0.txt
*
* angel.rodriguez@esne.edu
*
* C1712211447
*/
#ifndef BASICS_ID_HEADER
#define BASICS_ID_HEADER
#include <basics/fnv>
... |
db1453f093163be43de3082eca692009aaa524ca | b4b407378abc478077cbae38a2c53d359d8e5479 | andesengineering/vsgplayground | /src/windowadapter/NativeAdapterXcb.cpp | C++ | cpp | 2,313 | permissive | #include "NativeAdapterXcb.h"
#include <vulkan/vulkan_xcb.h>
template <>
WindowAdapter::WindowAdapter<xcb_connection_t *,xcb_window_t>( vsg::ref_ptr<vsg::WindowTraits> traits, xcb_connection_t* connection, xcb_window_t window):
vsg::Window(traits, nullptr)
{
_nativeAdapter = new NativeAdapterXcb( connection, ... |
265bc09ef9e042e53312d455eeaa0786a56c5501 | e7406208a74973b1c38c3c270258817c8c657752 | wanghonggao007/ImebraTest | /imebra/src/dataHandlerStringUI.cpp | C++ | cpp | 2,221 | no_license | /*
Imebra: a C++ dicom library.
Copyright (C) 2003, 2004, 2005, 2006 by Paolo Brandoli
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.
This program is distributed in the hope that it w... |
06c14d95fd0186edecac253e47386362464a0ea8 | 6fa3fb655123dc0042eb913426a976c64b68256b | GustavoRSL/Estrutura-de-Dados | /Revisão - Vetores, Matrizes, Ponteiros, Registros e Arquivos Tipados e em Modo Texto/Exercicio 2.cpp | C++ | cpp | 431 | no_license | #include <iostream>
using namespace std;
int main()
{
int vetor[10];
for(int i=0; i<10; i++)
cin >> vetor[i];
for(int i=0; i<10; i++)
{
if(vetor[i]<0)
vetor[i] = 0;
}
for(int i=0; i<10; i++)
{
for(int j=i; j<10; j++)
{
if(vetor[i]==0)
{
swap(vetor[i],vetor[j]);
... |
d1ca386e583726933227a30c5f9a65675b1f5a0f | 04ea942ed32cff6c6a694a1a7da501da2f568cfe | DmitryPogrebnoy/LARCmaCS | /macsCommon/cmvision/cmvision_histogram.cpp | C++ | cpp | 2,039 | permissive | //========================================================================
// This software is free: you can redistribute it and/or modify
// it under the terms of the GNU General Public License Version 3,
// as published by the Free Software Foundation.
//
// This software is distributed in the hope that it will b... |
51af95cf8beb50975ea0a4d413b9f74afa115b9e | 887aa820c9fcafe97b557654f89a0c4191893e4d | bhawna94110/data-structures-algorithms | /Bit_magic/bitCount.cpp | C++ | cpp | 268 | no_license | #include<iostream>
#include <bits/stdc++.h>
using namespace std;
int countSet(int n)
{
int res=0;
while(n!=0)
{
if(n%2!=0) // or if((n&1)==1);
{
res++;
}
n=n/2; // or n = n>>1;
}
return res;
}
int main()
{
int n=5;
cout<<countSet(n);
return 0;
}
|
07f5f7f4adf99cf7d69921da0516600da777f37e | 162eb1af99829e3d9998688732572c9e2a4bc6b4 | shizgnit/application-template | /src/engine/types/interfaces/image.hpp | C++ | hpp | 4,027 | permissive | /*
================================================================================
Copyright (c) 2023, Pandemos
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... |
4ce2567414b10de2b6bbdff383371c861e6951a3 | ce5bbb2a2cedf5c182941f5c17e19b0d68a19b91 | Fidanrlee/Hackerrank-solutions | /Data Structures/Trees/TreeToView.cpp | C++ | cpp | 462 | no_license | /*
struct node
{
int data;
node* left;
node* right;
};
*/
void PRIGHT(node *root ){
cout<<root->data<<" ";
if(root->right!=NULL){
PRIGHT(root->right);
}
}
void PLEFT(node *root ){
if(root->left!=NULL){
PLEFT(root->left);
}
cout<<root->data<<" ";
}
void topView(node * root) ... |
274daab0ede5c47c9c887f90ae0742add745c802 | 6588ab45a0ac60ff3b9c8ac671a7397808ad2cae | jesusgarciab/EBImage | /src/watershed.cpp | C++ | cpp | 7,717 | no_license | #include "watershed.h"
/* -------------------------------------------------------------------------
Watershed transform for Image
Copyright (c) 2006 Oleg Sklyar
See: ../LICENSE for license, LGPL
------------------------------------------------------------------------- */
#include "tools.h"
#include <R_ext/Error.h>
/... |
31d507ddecc68d85b875487774ef21360ff63a3f | 10b6e03c3bd0222aab5d3809d337c4d0513eac81 | li5ch/tencentcloud-sdk-cpp | /npp/src/v20190823/model/KeyList.cpp | C++ | cpp | 2,790 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
f4f617f5a8833efe197515641b3fc6344cd07a87 | 49655d5ea8fb09a050d91ad949bc7a95f467475e | DCubix/RacingGame | /RacingGame/ShaderProgram.cpp | C++ | cpp | 1,612 | no_license | #include "ShaderProgram.h"
#include "Utils.h"
#include "Logger.h"
#include <numeric>
Vec<ShaderProgram> Factory<ShaderProgram>::s_shaderPrograms;
ShaderProgram& ShaderProgram::addSource(ShaderType type, const String& src) {
const char* csrc = src.c_str();
GLuint shader = glCreateShader(type);
glShaderSource(sha... |
ab98f2bc8a51f4e993bc58466c90d88caf14251c | a33c0ab1f8f0807a8b197238a45d3279ee730594 | 4vtomat/HalideX | /src/Monotonic.cpp | C++ | cpp | 23,043 | permissive | #include "Monotonic.h"
#include "Bounds.h"
#include "IROperator.h"
#include "IRVisitor.h"
#include "Scope.h"
#include "Simplify.h"
#include "Substitute.h"
namespace Halide {
namespace Internal {
std::ostream &operator<<(std::ostream &stream, const Monotonic &m) {
switch (m) {
case Monotonic::Constant:
... |
f9602dfe0b10cf818b96504f9bc1b0576b07b927 | c8676a9632addfc0a1225e7b06d3b877bb293686 | eboladev/smarterp | /universal/debtcollection/quickcalendarview/selectorwidget.cpp | C++ | cpp | 12,352 | no_license | /*******************************************************************************
Copyright (C) 2008 Jukka-Pekka Mдkelд.
Contact: jpm@mehteenit.net
This file is part of QuickCalendar.
Foobar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licen... |
1638fb9c6a919ae9c30b292fc2b5b45c74b04f88 | 5a8fca20f220fdff5d4c342e945bff2dcc619a88 | pluskal/kaitai_struct_tests | /spec/cpp_stl_98/test_enum_deep_literals.cpp | C++ | cpp | 521 | no_license | // Autogenerated from KST: please remove this line if doing any edits by hand!
#include <boost/test/unit_test.hpp>
#include <enum_deep_literals.h>
#include <iostream>
#include <fstream>
#include <vector>
BOOST_AUTO_TEST_CASE(test_enum_deep_literals) {
std::ifstream ifs("src/enum_0.bin", std::ifstream::binary);
... |
843335b344655a5dfe677518de468716e72f81ea | 449a5cef5ab8bfda62c453221f7ef131abfa6b36 | webosce/sam | /src/core/base/prerequisite_monitor.cpp | C++ | cpp | 3,688 | permissive | // Copyright (c) 2017-2018 LG Electronics, 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... |
7842aabea0a7843dc2c6ff93fb7cbf8669c015f6 | 8fd75ed8c9948aa8b387424bd0bae9b6e7935033 | caioguedesam/graph_coloring_alg1 | /main.cpp | C++ | cpp | 657 | no_license | #include <iostream>
#include <time.h>
#include <fstream>
#include <sstream>
#include "sudoku.h"
using namespace std;
int main(int argc, char *argv[]) {
std::fstream file;
file.open(argv[1]);
std::string line;
srand(time(NULL));
int n, w, h;
file >> n >> w >> h;
Sudoku *board = new Sudoku(n, w, h);
for(i... |
d479bff6096f9b5c40f3f4aa22f3692f16325a7b | 314bd2f2b9b4aa93cb7a05b9c32f1ab470e2416e | Wowkiee/ACM-ICPC | /Team_Training/2018 national holiday training/2014-2015 ACM-ICPC, NEERC, Eastern Subregional Contest/f.cpp | C++ | cpp | 3,479 | no_license | #include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define per(i, a, b) for(int i = (b) - 1; i >= (a); --i)
#define sz(a) (int)a.size()
#define de(a) cout << #a << " = " << a << endl
#define dd(a)... |
4cfda1a69ce9b9d76993026915476afc5b4cae96 | f2abcb3e20e3aeb935d15373e7fefa03d9d87b2f | LuxoftSDL/sdl_core_winport | /src/components/utils/src/qdb_wrapper/sql_error.cc | C++ | cc | 2,068 | no_license | /*
* Copyright (c) 2013, Ford Motor Company
* 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... |
08062409f4ef412870a6ac185ce5c146560b3807 | 5b16e4ddc0800cdc4e3dbf1d5462409e08269604 | GMBPlatform/wallet-cpp | /util/cpp/str_conv.cpp | C++ | cpp | 319 | permissive | #include <locale>
#include <atlconv.h>
#include "..\wallet\util\h\str_conv.h"
std::wstring strconv::m_strconv(const std::string& _src)
{
USES_CONVERSION;
return std::wstring(A2W(_src.c_str()));
};
std::string strconv::m_strconv(const std::wstring& _src)
{
USES_CONVERSION;
return std::string(W2A(_src.c_str()));
}; |
35922f1d0f7dd3e43c79dc43fde66ed4c18f452e | 0a514a90f3441eb2647cd3ee2fc9de39a5351392 | LoveHelp/report | /sms/smsservice/smsservice/ServiceManager.cpp | C++ | cpp | 2,949 | no_license | #include "stdafx.h"
#include "ServiceManager.h"
#include <iostream>
CServiceManager::CServiceManager(VOID)
{
memset(&m_servInfo, 0, sizeof(SERVINFO));
}
CServiceManager::~CServiceManager(){}
VOID CServiceManager::InitParam(char iniFile[])
{
TCHAR scAppName[] = { _T("SERV") };
TCHAR szFilePath[MAX_... |
286e0b94089a25d160b97fb3551f17773c1e0639 | 3255abc569db1c96dc19502dbd7d1c3b85311868 | muleta33/Projet_PEPS | /profitAndLoss/BlackScholesModelMarketHistorical.hpp | C++ | hpp | 598 | no_license | #pragma once
#include "pnl/pnl_matrix.h"
#include "BlackScholesModelMarket.hpp"
#include "BlackScholesModelInputHistorical.hpp"
class BlackScholesModelMarketHistorical : public BlackScholesModelMarket
{
public:
BlackScholesModelMarketHistorical(const PnlMat * market_data, int underlying_number, int number_volatilit... |
d2dfe1ebbf216ba639eb5d7c18e8aa9679ffe6fa | 0a4838fb7a128e67f0ae6e611478b41a394a7f3b | bootingman/fuchsia2 | /src/lib/fxl/time/time_point.cc | C++ | cc | 1,796 | permissive | // Copyright 2016 The Fuchsia 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 "src/lib/fxl/time/time_point.h"
#include "src/lib/fxl/build_config.h"
#if defined(OS_MACOSX) || defined(OS_IOS)
#include <mach/kern_return.h>
#i... |
1d7f81edaed68a05aafb7e3ec8d1af169dde53e3 | 4d065937581c3c45da262fd882f8d8e94b94a293 | JustinBeaudry/c_game | /c_game/JuceLibraryCode/modules/juce_audio_devices/native/juce_ios_Audio.cpp | C++ | cpp | 21,187 | no_license | /*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2013 - Raw Material Software Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL... |
dc913c497f944782682f3c461610def07d82d174 | 7ee319d45d5dc8a98a4081c405a303afaccd4eb2 | rsmbyk/ngoding | /oj/spoj/spoj_SIMEQN.cpp | C++ | cpp | 673 | no_license | #include <cstdio>
long double C (int, int);
int main () {
int tc;
scanf ("%d", &tc);
while (tc--) {
int n, a, b, c, r = 3;
scanf ("%d %d %d %d", &n, &a, &b, &c);
long double eq1, eq2, eq3;
eq1 = C (n+r, r) - C (n-a+2, r) - C (n-b+2, r) - C (n-c+2, r);
... |
2137e65ad1008db6b43cd39c2f0499b8d73e02f6 | 080a22f286622d1e89ed8aae373dc12f99f2c9fb | mke01/BasicC- | /Day 17/02 Enumeration/Source01.cpp | C++ | cpp | 1,308 | no_license | #include<iostream>
using namespace std;
class InvalidColorValueException
{
};
class Rectangle
{
public:
void Fill(int color);
};
// 0 : Black
// 1 : Red
// 2 : Green
// 4 : Blue
// Here int is very broad in nature where we can end up with invalid combination of color values
// if condition is evaluated at runtime... |
23495d63d8d531facb8ef6ce31f7a882c4b3fefa | 0f3d1d05b7f0b377fd9e5d42d362ba001b61d8f7 | AnabaenaQing/Source-Code_ShaderX_GPU-Pro_GPU-Zen | /GPU Zen2/01_Rendering/Skinned Decals/Demo/SkinnedDecals/src/SkinnedDecals.cpp | C++ | cpp | 38,703 | permissive | #include <stdafx.h>
#include <Demo.h>
#include <SkinnedDecals.h>
bool SkinnedDecals::Init(const DemoModel *parentModel, const char** materialNames, UINT numMaterials)
{
if((!parentModel) || (numMaterials > MAX_NUM_DECAL_MATERIALS))
{
return false;
}
this->parentModel = parentModel;
numDecalMaterials = nu... |
a1a92b2d77220a579a575f63ae55fb13ddaa36ba | 57a9a6b3f2969fbdb5f3b682aab757aa413f2524 | chnraorui/Algorithms | /AlgorithmNote/第6章C++标准模板库(STL)介绍/A1060. Are They Equal(25).cpp | C++ | cpp | 275 | no_license | #include <iostream>
using namespace std;
int main()
{
int a;
string s1, s2;
cin >> a >> s1 >> s2;
for (int i = 0; i < a; i++) {
if (s1[i] != s2[i]) {
cout << "NO ";
break;
}
cout<<"YES "<<
}
return 0;
} |
52cd62afeb0badf12c040f6713062c56998bfc61 | a2c2085baf74ccbaa672f33ce876d26e3cf70b91 | stevexk/server | /src/server/gameserver/quest/ActionAdvanceEventQuest.cpp | C++ | cpp | 4,189 | no_license | ////////////////////////////////////////////////////////////////////////////////
// Filename : ActionAdvanceEventQuest.cpp
// Written By :
// Description :
////////////////////////////////////////////////////////////////////////////////
#include "ActionAdvanceEventQuest.h"
#include "Creature.h"
#include "PlayerCr... |
112ce6c357e25f4a81303d08b7b284e1bf4172e6 | fde6c837c62e18fd6eea702613b9c35607f9ae1a | vbermudez/cpprestsdk | /Release/tests/functional/websockets/client/authentication_tests.cpp | C++ | cpp | 7,173 | permissive | /***
* ==++==
*
* Copyright (c) Microsoft Corporation. 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 a... |
5407aba98eb9f014c3fb62b0fbd14d46aa6513c8 | 0cf8d378c8f81760e8ab12b675eddf96fda2aca3 | jjkotni/gem5-master | /src/dev/arm/gic_v3_distributor.hh | C++ | hh | 7,987 | permissive | /*
* Copyright (c) 2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementation of the funct... |
e388afeb1730ae5438805464e12d1b4117b463bf | ac84c9070c7b8260af6abff221cf18c0a57196ac | addicted2rpg/NWNX2-windows | /src/RockLib/nwn_internals/CFactionManager.cpp | C++ | cpp | 373 | no_license | #include "stdafx.h"
#include "types.h"
#include "nwn_internals.h"
CNWSFaction* (__thiscall *CFactionManager__GetFaction)(CFactionManager *pTHIS, uint32_t FactionID) = (CNWSFaction * (__thiscall*)(CFactionManager *pTHIS, uint32_t FactionID))0x00533EE0;
CNWSFaction *CFactionManager::GetFaction(uint32_t FactionID) {
r... |
d802d7bb691873d62e277fe6ff03c9e6d3777faa | 82b6d6b1e5f67bc051828fbd271d3940872776b2 | cealvar/Robot-Game-Simulator | /iteration3/src/motion_handler_home_base.cc | C++ | cc | 1,305 | no_license | /**
* @file motion_handler_home_base.cc
*
* @copyright 2017 Carlos Alvarenga, All rights reserved.
*/
/*******************************************************************************
* Includes
******************************************************************************/
#include "src/motion_handler_home_base.... |
dc60dda4b5bcec6f2981e0b5e24489d198a5cf0e | 52d7da3829eb95996dfff2f083faa489e190b8eb | sadrulhc/chromium | /chromeos/services/cellular_setup/euicc.cc | C++ | cc | 6,894 | permissive | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/services/cellular_setup/euicc.h"
#include <memory>
#include "chromeos/services/cellular_setup/esim_mojo_utils.h"
#include "chromeos/s... |
55553675cb80a5706b91a9455e7609be64965c49 | 833593fece5ecdd3ab729cbecc922d2ed8f3ca58 | dillonhuff/ahaHLS | /test/ll_files/add_10_template_test.cpp | C++ | cpp | 277 | permissive | #include <iostream>
using namespace std;
#include "fifo.h"
#include "add_10_template.h"
int main() {
Fifo<int, 32> in;
Fifo<int, 32> out;
in.write(1);
add_10_template(&in, &out);
int res = out.read();
cout << "result = " << res << endl;
assert(res == 11);
}
|
08e2a435d49678ea2ac3aa664ea283971dacbde0 | 4b40725ecf2b225ecec666785f0d1823041760b8 | francisol/osier | /osier_server.cpp | C++ | cpp | 4,235 | no_license | //
// Created by 谢仲涛 on 2020/4/7.
//
#include "osier_server.h"
::grpc::Status
osier_server::create(::grpc::ServerContext *context, const ::CreateRequest *request, ::SimpleResponse *response) {
time_t rawtime;
char buffer [128]={0};
struct tm * timeinfo;
time (&rawtime);
timeinfo = localtime (&ra... |
ca7af3ff2d08f951d3f2488b12c63a792b46a609 | c93db6d8b994e536d2074d74646d0b218687aee0 | elix22/Urho3D | /Source/ThirdParty/angle/third_party/deqp/src/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyBufferToImageTests.cpp | C++ | cpp | 15,910 | permissive | /*------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
*
* Copyright (c) 2017 The Khronos Group Inc.
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use ... |
dc3a12810974f65ea1be142fe0ab05b2b47f3873 | c7936c5e08af48878d85048ea33a6ea3223f6280 | liuzitong/demos | /qmlicquickimageitemdemo/third-part/qxpack/indcom/net/qxpack_ic_datatrans_rssvr_impl_bundle.hxx | C++ | hxx | 3,197 | no_license | #ifndef QXPACK_IC_DATATRANS_RSSVR_IMPL_BUNDLE_HXX
#define QXPACK_IC_DATATRANS_RSSVR_IMPL_BUNDLE_HXX
#include "qxpack/indcom/common/qxpack_ic_def.h"
#include "qxpack/indcom/net/qxpack_ic_datatrans_buff.hxx"
#include "qxpack/indcom/net/qxpack_ic_datatrans_rssvrbase.hxx"
#include <QVariant>
// //////////////////////////... |
1fa64d72153c98d3127931a89b069d2464f94327 | df95d50be35290024751193db192e20890c192a9 | qlee01/DazToUnity | /Unity/DazStudioPlugin/DzUnityDialog.cpp | C++ | cpp | 9,678 | permissive | #include <QtGui/QLayout>
#include <QtGui/QLabel>
#include <QtGui/QGroupBox>
#include <QtGui/QPushButton>
#include <QtGui/QMessageBox>
#include <QtGui/QToolTip>
#include <QtGui/QWhatsThis>
#include <QtGui/qlineedit.h>
#include <QtGui/qboxlayout.h>
#include <QtGui/qfiledialog.h>
#include <QtCore/qsettings.h>
#include <Qt... |
b02d04bb0c893508264c4199d4dc09f872b1a5d6 | 3df0b145fda479d6d22c81a1ef9780166c5ec0e5 | uvbs/FullSource | /Source/Source/KGUI/elem/Components/item.cpp | C++ | cpp | 21,714 | permissive | ////////////////////////////////////////////////////////////////////////////////
//
// FileName : item.cpp
// Version : 1.0
// Creator : Hu Changyin
// Create Date : 2005-11-9 16:48:47
// Comment :
// Edited by Chen Jie 2006-12-30
//
//////////////////////////////////////////////////... |
693b81397502e0d00f1d3d5c36151fc2bc2b7dca | 47dbf51bdc7592c3627cf66ef0bfc23001d68d73 | ETHZ/ASAnalysis | /dict/MT2tree_linkdef.hh | C++ | hh | 486 | no_license | #if defined(__CINT__)
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class MT2tree;
#pragma link C++ class MT2Misc;
#pragma link C++ class MT2Znunu;
#pragma link C++ class MT2PileUp;
#pragma link C++ class MT2Trigger;
#pragma link C++ class MT2Jet;
#pragma... |
8355bb7228dcc71cbffc3ae30e2868e74c86d8cb | 535fdcce39f3096ecdd5616ff5bd363feb652581 | jimmcnulty41/v8 | /src/runtime/runtime-array.cc | C++ | cc | 30,215 | permissive | // Copyright 2014 the V8 project 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 "src/debug/debug.h"
#include "src/execution/arguments-inl.h"
#include "src/execution/isolate-inl.h"
#include "src/heap/factory.h"
#include "src... |
436b8ce3ec0d26d5c243b84ec3fadd2d6990c959 | a0e6378465cdbd20d5420efead9558d06a50ef40 | StefanRvO/PowerSocketController | /software/main/CurrentMeasurer.cpp | C++ | cpp | 19,915 | no_license | #include "CurrentMeasurer.h"
#include <cmath>
#define SAMPLE_FREQ_ADC 2500
#define TIMER_GROUP_ADC TIMER_GROUP_0
#define TIMER_NUM_ADC TIMER_1
#define TIMER_DIVIDER_ADC 2
#define TIMER_SCALE_ADC (TIMER_BASE_CLK / TIMER_DIVIDER_ADC) /*!< used to calculate counter value */
#define TIMER_FINE_ADJ_ADC (1.4*(TIMER_B... |
259645feac3621ca9abe5e39c7a7486cfd59b9c5 | 2767153f4a88c79e8887b5fae025f013fc9e2429 | mpaolone/clas6lite | /pcor/g12pcor/g12_pcor.hpp | C++ | hpp | 3,975 | no_license | #ifndef __CLAS_G12_PCOR_HPP__
#define __CLAS_G12_PCOR_HPP__
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
namespace clas
{
namespace g12 {
using std::clog;
using std::endl;
using std::ifstream;
using std::fmod;
using... |
b7199e6c09916ffb270ad29e2132bea07f55f874 | 88c5ff7e800f3db02fe4348c8f827c6affe07f47 | twocoldz/sojcode | /soj3924 - 副本.cpp | C++ | cpp | 547 | no_license | #include <iostream>
#include <map>
#include <cstdio>
#include <string>
using namespace std;
int main()
{
int n;
string str;
int scores;
while(scanf("%d",&n)==1&&n)
{
int sum=0;
map<string,int> mapstudent;
map<string,int>::iterator iter;
while(n--)
{
cin>>str>>scores;
iter=mapstudent.find(str);
... |
a91a2572e542dbf7698aa1040df8a206df4c484b | ffce1163141bd619070d499a9cd1b02c55552266 | Anurag824/DS-Class | /Queues/Queue.cpp | C++ | cpp | 3,479 | no_license | #include <iostream>
using namespace std;
// queue is a data structure. which stores collection of data with a restriction/constraint
// insertion from one end known as rear/tail.
// data can be removed from other end known as front/head.
// complexity of a queue is O(1)
class queue{
int top;
int ele;
int ... |
578fa723e126e8bd54fac86a8c5c240400f89b2e | 473354247efff7c6ba3cbde46aeef0112ece9682 | SergiCanyelles/MasterUAB | /MasterUAB/Core/InputManager.cpp | C++ | cpp | 284 | no_license | #include "InputManager.h"
static CInputManager* s_CurrentInputManager = nullptr;
CInputManager* CInputManager::GetInputManager()
{
return s_CurrentInputManager;
}
void CInputManager::SetCurrentInputManager(CInputManager* _InputManager)
{
s_CurrentInputManager = _InputManager;
}
|
82682d5c0632e621c3fe52e6143c5788f04eebf8 | 19cae3261d8c11bd8b9713feba7d987e8a08cdd4 | iscas-ljc/Beauty-of-Programming | /第1章/1.14/Code_14-1.cpp | C++ | cpp | 378 | no_license | Grid preClick = NULL,curClick = NULL;
while{
if(用户点击格子(x,y),且格子(x,y)为非空格子)
{
preClick = curClick;
curClick.Pos=(x,y);
}
if(preClick!=NULL && curClick != NuLL && preClick.Pic == curClick.Pic && FindPath(preClick,curClick)!=NULL)
{
显示两个格子的消除路径
消除格子preClick,curClick
preClick=curClick=NULL;
}
} |
72706a3578d0701765d74a3574140a1ba6717ab4 | b4946ae4588b2e271e983dba653eb93951b795c1 | katahiromz/WinHier | /WinHier/WinHier.cpp | C++ | cpp | 31,079 | permissive | // WinHier.cpp
// Copyright (C) 2018-2019 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>.
// This file is public domain software.
#include "targetver.h"
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_NON_CONFORMING_WCSTOK
#define MWINDOWTREE_ADJUST_OWNER
#include <shlwapi.h>
#include "MWindowTreeView.hpp... |
8d626225dd9bc63455668972254baf4ce566f931 | caa198fa0ee6673a0fe96ea458c850a7e3a556b5 | mmmovania/BabyRayTracer | /Image.hpp | C++ | hpp | 5,524 | no_license | #ifndef IMAGE_
#define IMAGE_
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <cstring>
#include <math.h>
#include "Box.hpp"
#include "Sphere.hpp"
#include "Plane.hpp"
#include "Hitablelist.hpp"
#include "Camera.hpp"
#include "SimpleRand.hpp"
#include "Lambertian.hpp"
#include "... |
b0d3e33dde506bda263e36abb93d24e1bcad08d3 | 4fc25248c543ae78a0ccc9f518b67693dd0ca463 | Josef212/Grup_5 | /ModuleBoss.cpp | C++ | cpp | 9,789 | no_license | #include "Globals.h"
#include "Application.h"
#include "ModuleBoss.h"
#include <math.h>
#include <ctime>
#include <stdio.h>
ModuleBoss::ModuleBoss(Application* app, bool start_enabled) : Module(app, start_enabled), graphics(NULL)
{}
ModuleBoss::~ModuleBoss()
{}
bool ModuleBoss::Start()
{
ship_is_here = false;
can_... |
c5ce014f92bba68526087723d54c87437eb34510 | 9a1e229ea8ee31a926926d02fd8da4ae18991d03 | keertanavc/BootCamp2019 | /ProblemSets/Week 3/Computation/Exercises_day1/CPP/pi.cpp | C++ | cpp | 315 | no_license | #include <iostream>
static long num_steps = 100000; double step;
int main()
{
using namespace std;
int i;
double x, pi, sum = 0.0;
step = 1.0 / (double) num_steps;
for (i = 0; i < num_steps; i++)
{
x = (i + 0.5) * step;
sum += 4.0 / (1.0 + x * x);
}
pi = step * sum;
cout << pi << endl;
return 0;
}
|
0b038336e48cabb486f892228841fe737fb30dc0 | 41153763453430e56dde5569dcb7238294028fed | sunlibo2390/MyGame | /object.cpp | C++ | cpp | 3,363 | no_license | #include "object.h"
Object::Object(QPushButton *parent) ://创建对象,设置血量,获得位置
QPushButton(parent),
center_pos(x()+width()/2,y()+height()*3/4),
attack_range(0)
{
attack_ablt = true;
ice = false;
freeze = false;
}
Object::~Object(){
}
//设置满血量
void Object::set_max_blood(int max){
this->max_blood ... |
b477d6d57c4f0278ee8daeb8a807582ceb507286 | 835623aafbf275196219b559db5b13119de2c5fa | foolhuang/Helium | /SceneGraph/JointTransform.cpp | C++ | cpp | 3,130 | no_license | #include "SceneGraphPch.h"
#include "JointTransform.h"
#include "Application/UndoQueue.h"
#include "Math/EulerAngles.h"
#include "SceneGraph/Color.h"
#include "SceneGraph/PrimitiveAxes.h"
#include "SceneGraph/PrimitiveRings.h"
#include "SceneGraph/Scene.h"
REFLECT_DEFINE_OBJECT( Helium::SceneGraph::JointTransform )... |
d4a29c1997f16278ac9eb7ef7dfb8a684765ccc9 | 8497c2be3983cc5c5f99d96b62f923d9c47e337a | xqq/chromium-media | /video/gpu_memory_buffer_video_frame_pool.cc | C++ | cc | 36,423 | no_license | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/video/gpu_memory_buffer_video_frame_pool.h"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stddef.h>
#include <stdint.h>
#in... |
1f21e5d7c35725c3beee7e0ba38148f5e73aad95 | 2125fa28ed3561b06beff504a10e66b00d1c9ebb | wanliyun/Aurora | /Code/Servers/loginApp/Apps/LoginApp_AppManager.cpp | C++ | cpp | 2,556 | no_license |
#include "pch.h"
#include "LoginApp_AppManager.h"
#include "LoginApp.h"
#include "LoginApp_Client.h"
#include "RSACipher.h"
#include "../../Clients/Client/ClientInterface.h"
#include "../appManager/AppManagerInterface.h"
namespace Aurora
{
LoginApp_AppManager::LoginApp_AppManager( )
:m_theApp(LoginApp:... |
bcb088dfe3be4efe0baf249bb47470a087e308d3 | c935006fa9a2c59699d26368d69b45ca8cfb5c45 | HNarayana-youCanDoIt/Testproject | /x451/TML_X0_FIDL/HMI/gen/dbus/consumes/v5/com/harman/btpres/PimDbHandlerDBusProxy.hpp | C++ | hpp | 36,296 | no_license | /*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.dbus 3.1.5.
* Used org.franca.core 0.9.1.201412191134.
*
* generated by DCIF CodeGen Version: R2_v2.1.0
* generated on: Wed Oct 30 12:44:55 IST 2019
*/
#ifndef V5_COM_HARMAN_BTPRES_Pim_Db_Handler_DBUS_PROXY_HPP_
#define V5_COM_HARMAN_... |
95639b196fbd4ff0d2da1aa2b6a03a894f749359 | a049dc0db41f9dd881b994d5a57cf0a4dfc9fb35 | maxvogel/NetworKit-mirror2 | /networkit/cpp/io/EdgeListWriter.cpp | C++ | cpp | 840 | permissive | /*
* EdgeListWriter.cpp
*
* Created on: 18.06.2013
* Author: cls
*/
#include "EdgeListWriter.h"
#include "../auxiliary/Log.h"
#include <sstream>
#include "../auxiliary/Enforce.h"
namespace NetworKit {
EdgeListWriter::EdgeListWriter(char separator, node firstNode) : separator(separator), firstNode(firstN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.