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 |
|---|---|---|---|---|---|---|---|---|
a23904d5012acdeeefeb1efd687f00b240d3842d | fe8a2cedb6741be992d28597aff88a48fbe766fd | sbergen/superparasites | /supercell/dsp/pvoc/stft.cc | C++ | cc | 6,101 | permissive | // Copyright 2014 Emilie Gillet.
//
// Author: Emilie Gillet (emilie.o.gillet@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitatio... |
9512a2f5fd564fd3d7f14639dc747fb39b1c4f42 | e4d9f09ed3f48c12ed1caa45d7f66cd93327184e | fengrenchang86/PKU | /1002/2028980_TLE.cpp | C++ | cpp | 2,262 | no_license | #include <iostream>
#include <string>
using namespace std;
const int max = 100100;
int v[26] = {2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,0,7,7,8,8,8,9,9,9,0};
char list[max][10];
int c[max]={0};
int t[max];
char ch[100];
char name[10];
int Qsort( int start, int end)
{
int key;
t[0]= t[start];
key = t[start];
while ( start <... |
2fef547b0535b2bab10b3ae099af81b778bf99be | 925d589e2a2243b9f79469215bb3b903bd34a5c2 | kotabrog/mycode_competition | /AtCoder_Problems/ABC/B/119_Digital_Gifts/main.cpp | C++ | cpp | 267 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
string u;
double x, ans = 0;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> x >> u;
if (u == "JPY")
ans += x;
else
ans += x * 380000;
}
cout << ans << endl;
} |
a1cdaa6b43b54524ef987f81a449d7442a6a9479 | 62a05530ebc71bcc7042e53af2a65e99e2d80420 | arws/googletest | /GenerateParentheseTest/GenerateParentheseTest.cpp | C++ | cpp | 1,210 | no_license | #include "gmock/gmock.h"
#include "ParentheseGenerator.h"
#include <memory>
class ParentheseGeneratorTest : public ::testing::Test
{
public:
ParentheseGeneratorTest()
{
}
protected:
ParentheseGenerator parenthese_generator;
};
TEST_F(ParentheseGeneratorTest, generate_one_pair)
{
ASSERT_EQ(string("()"), parent... |
fd336da2cbb318ad8d87640a7c13a0f811413b19 | a48555229bede666594a729e51773bda5f43695b | ybouret/upsylon | /src/mkl/y/mkl/tao.hpp | C++ | hpp | 692 | no_license | //! \file
#ifndef Y_MKL_TAO_INCLUDED
#define Y_MKL_TAO_INCLUDED
#include "y/mkl/types.hpp"
#include "y/type/auto-cast.hpp"
#include "y/container/matrix.hpp"
namespace upsylon
{
namespace mkl
{
//! optimized argument conversion
#define Y_TAO_TO(TYPE,SOURCE,VALUE) (auto_cast<TYPE,typename SOURCE::... |
000d2540dda1e7961ca330b6d841e3513bba949c | c1042b146875571d248443fe9ae914118b8eb82d | kovdan01/vtable-hack | /dynamic_client/main.cpp | C++ | cpp | 1,649 | no_license | #include <lib.h>
#include <dlfcn.h>
#include <iostream>
#include <iomanip>
#include <cassert>
void print_arr(std::uint8_t* arr)
{
std::cout << std::hex << std::internal << std::setfill('0');
std::cout << "{ ";
for (std::size_t i = 0; i < 8; ++i)
std::cout << std::setw(2) << static_cast<int>(arr[i... |
be3c4db04bf1adb5c2542f6a4bd2b40f8c673fe0 | 3226fb69ad37854d1fafbad30a99eb43f944227b | TheSeems/MxEngine | /src/Core/Rendering/RenderObjects/DebugBuffer.cpp | C++ | cpp | 22,323 | permissive | // Copyright(c) 2019 - 2020, #Momo
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met :
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions... |
eaadb3c276b585979b647bd42e72f7984aa4397f | a032068a68e9cea3d8807cda4caedb2adfeea947 | rufriedman/platform_bionic | /linker/linker.cpp | C++ | cpp | 132,118 | permissive | /*
* Copyright (C) 2008 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, t... |
7d3b4282ac4784b116001252e181ac3491dd8d4e | c19b4bd312da708e00e6f98a48cf8eb8dfde1630 | jimmcnulty41/v8 | /src/builtins/builtins-conversion-gen.cc | C++ | cc | 15,198 | permissive | // Copyright 2016 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/builtins/builtins-utils-gen.h"
#include "src/builtins/builtins.h"
#include "src/codegen/code-factory.h"
#include "src/codegen/code-stub-as... |
94ea4b8fdce474596f689b2ce3cf98ec6548d258 | 5fdc323eb7d876cf88770ceb081f927cb3bc8b65 | widemouthfrog1/CGRA350-Project-Tree-Model-Generation | /src/application.cpp | C++ | cpp | 13,150 | no_license |
// project
#include "application.hpp"
#include "cgra/cgra_geometry.hpp"
#include "cgra/cgra_gui.hpp"
#include "cgra/cgra_image.hpp"
#include "cgra/cgra_shader.hpp"
#include "cgra/cgra_wavefront.hpp"
using namespace std;
using namespace cgra;
using namespace glm;
void basic_model::draw(const glm::mat4 &view, const ... |
442e8dea2f95e3f16edeb1f1fb50eb0945004b81 | 5c8b134daec156fe114f7cb54529a0833a60914b | ailyanlu1/Contests | /COCI C++/coci08c6p6_slicice/COCI08C6P6.cpp | C++ | cpp | 15,188 | no_license | #include <bits/stdc++.h>
#define SHORT_INF 0x3f3f
#define INT_INF 0x3f3f3f3f
#define LL_INF 0x3f3f3f3f3f3f3f3f
#define D_INF numeric_limits<double>::infinity()
#define pb push_back
#define mp make_pair
#define l(x) (x << 1)
#define r(x) (x << 1 | 1)
#define mid(x, y) (x + (y - x) / 2)
#define f first
#defi... |
014807ad1821b019eadd87e6c0fa5721d6124fc7 | 1c72789a2190dff09bd85cafa319105ec2addf30 | shreyasrivastava17/PID-Control | /src/PID.cpp | C++ | cpp | 429 | permissive | #include "PID.h"
using namespace std;
/*
* TODO: Complete the PID class.
*/
PID::PID() {}
PID::~PID() {}
void PID::Init() {
Kp = 0.16;
Ki = 0.0002;
Kd = 3.1;
p_error = 0.0;
d_error = 0.0;
i_error = 0.0;
}
void PID::UpdateError(double cte) {
d_error = cte - p_error;
p_error = c... |
663ca713cc3bba7d724ab745060e2d562856b017 | 9404ca3a026b066f2c23f28f05199463acb9423f | Kingsuok/Optimization-of-the-Security-Cameras--Installation-Problem | /assigment 5/a5-ece650/VC2.cpp | C++ | cpp | 1,315 | no_license | #include<stdio.h>
#include"stdlib.h"
#ifndef _FORMAT_H
#define _FORMAT_H
#include "format.h"
#endif
int cmp ( const void *a , const void *b )
{
return *(int *)a - *(int *)b;
}
void VC2(int edges,int inPut[]){
int left[maxVertexNum];
int i,k;
int temp;
int count=edges;
int goal[MAXVER];
int goalNum = 0;
... |
27c95ff6e655a6f644dda79676c293fce7c69549 | 2c774e39fd6f4d6c10b772d6ebeed93e4692ca2b | oydang/CS4701-pokemon-AI | /Tracer-VisualboyAdvance1.7.1/Tracer-VisualboyAdvance1.7.1/source/src/win32/BugReport.cpp | C++ | cpp | 7,681 | permissive | /*
* VisualBoyAdvanced - Nintendo Gameboy/GameboyAdvance (TM) emulator
* Copyrigh(c) 1999-2003 Forgotten (vb@emuhq.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version ... |
34168a55e6fc6e3aadce7f458e66175f4037a7da | 5e2602ed90bd4974cf44a9c5fd79c4a605d063c1 | kosign64/aurora | /src/odom_test_node/mainwindow.cpp | C++ | cpp | 9,062 | no_license | #include "mainwindow.h"
#include "nodeqt.h"
#include "odometrymap.h"
#include "astar.h"
#include "pathcontroller.h"
#include <QDoubleValidator>
#include <QKeyEvent>
#include <QLayout>
#include <QPushButton>
#include <QLineEdit>
#include <QSlider>
#include <QLabel>
MainWindow::MainWindow(int argc, char *argv[], QWidget... |
00cdb6b987570f5fc91d3b8f740c6022fec345f6 | 0d0e152f9185f1830d73a3b0367bb82b9ed7afd0 | stefancretu27/various_cpp_concepts | /STL_containers/list_operations.cpp | C++ | cpp | 4,667 | no_license | #include "sequence_containers.hpp"
void list_operations()
{
/*
* Template class that implements a conatiner based on a doubly-linked list. It allows for pushing elements at both ends.
* Elements are not stored contiguously, thus it does not allow for random access
* Unlike forward list, it provides reverse ite... |
33e852d68d8d432c4a68cb3ad8bcaf55ec9353a6 | 7419de115d91bfe00aaf999906f5dbb2270ca11f | urp/urban-robots | /utk/math/fixed_size/interface/quaternion/operators/plus.hpp | C++ | hpp | 1,414 | no_license | // plus.hpp
// Copyright (C) 2006-20013 Peter Urban (urp@pks.mpg.de)
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.... |
f353390a7542be526cdd75e35a7a826277baa04b | dbf867b39ba0162bc1be7b175dad8031d07dbb49 | amitsadaphule/chromium | /ash/kiosk_next/kiosk_next_home_controller.cc | C++ | cc | 5,345 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/kiosk_next/kiosk_next_home_controller.h"
#include <memory>
#include "ash/display/screen_orientation_controller.h"
#include "ash/public/cpp... |
6e5181476f0cac78ebcd01b1d2e3ee94454d6b21 | 18e289f517edbd7e42d089a4c3682cb60a0c7fc7 | msgpo/supermodel | /Src/Graphics/Legacy3D/Legacy3D.cpp | C++ | cpp | 51,284 | no_license | /**
** Supermodel
** A Sega Model 3 Arcade Emulator.
** Copyright 2011-2016 Bart Trzynadlowski, Nik Henson
**
** This file is part of Supermodel.
**
** Supermodel is free software: you can redistribute it and/or modify it under
** the terms of the GNU General Public License as published by the Free
... |
7d178b07f9949de8f829321cc573de210921aaca | 2536d40bd72a0c976e08dde67a9333f6d242bc84 | khegazy/UED_analysis | /UEDanalysis/studies/baseLine.cpp | C++ | cpp | 3,963 | no_license | #include "../analysis.h"
using namespace std;
int main(int argc, char* argv[]) {
if (argc<2) {
cerr<<"ERROR: Missing input arguments, must run code ./analysis.exe 'fileList.txt' !!!"<<endl;
cerr<<" Can also run ./analysis.exe 'fileList.txt' 'treeName'"<<endl;
exit(0);
}
string fileList(... |
973b4c049cd348f3f3fd7404a8631753a13a7089 | 035a63329b848ca8f32c2591cd43a5ac89d3733c | delta4d/AlgoSolution | /codeforces/183/2/A.cpp | C++ | cpp | 413 | no_license | #include <set>
#include <cstdio>
using namespace std;
set <int> s;
int main() {
int n, tot = 0;
scanf("%d", &n);
for (int i=1; i<=n; ++i) {
s.insert(i * i);
for (int j=1; 2*j*j<=i*i; ++j) {
int k = i * i - j * j;
if (s.find(k) != s.end()) ++tot;
}
}
printf("%d\n", tot);
return 0;
}
// 3720658 M... |
0a61fe2aa02eedf458c79b2463783a1c440259fc | ea5b858d5ac28393cefb932ae5c80b000202c9f4 | Hydro-Junior/CPPTraining | /pat/findCoins/main.cpp | C++ | cpp | 627 | no_license | #include<cstdio>
#include<algorithm>
#include<unordered_map>
using namespace std;
int N,M,a[100000];
int main(){
scanf("%d%d",&N,&M);
for(int i = 0 ; i < N ; i++){
scanf("%d",&a[i]);
}
sort(a,a+N);
bool hasSolution = false;
unordered_map<int,int> mp;
int n1,n2;
for(int i = 0 ; i ... |
92a9ff8e34aefc38f4a2604483d9c3d0c27cdebc | 4b09b6ab091468154dff24d52bb144344f422a4c | chet431/Zlatoposlky | /Gl.1/1.60(a).cpp | C++ | cpp | 563 | no_license | /* Составить программу обмена значениями трех переменных величин а, b, c по
следующей схеме:
а) b присвоить значение c, а присвоить значение b, с присвоить значение а; */
#include <iostream>
using namespace std;
int main()
{
int a = 5;
int b = 7;
int c = 3;
int temp;
temp = a;
a = b;
b = c;
c = temp;
cout << ... |
5f6d07117a27e4c3226c62d2bf5d0ac1aaa6808f | 64ce2da64eaa5cffa736d01e912ba63935793d33 | HelverValero/Basic-Data-Structures-CPP | /SimpleList.hpp | C++ | hpp | 717 | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: SimpleList.hpp
* Author: developer
*
* Created on 19 March 2016, 8:38 PM
*/
#ifndef SIMPLELIST_HPP
#define SIMPLEL... |
611601eca44029b2c39e9fb1542092f29bff1410 | b9472bef0549c8157890e1180b2322cb4c712f6e | niuxu18/logTracker-old | /second/download/git/gumtree/git_repos_function_1809_git-2.4.2.cpp | C++ | cpp | 736 | no_license | void add_exclude(const char *string, const char *base,
int baselen, struct exclude_list *el, int srcpos)
{
struct exclude *x;
int patternlen;
int flags;
int nowildcardlen;
parse_exclude_pattern(&string, &patternlen, &flags, &nowildcardlen);
if (flags & EXC_FLAG_MUSTBEDIR) {
char *s;
x = xmalloc(sizeof(*x)... |
9efd7241f171de4f897e5f17f76f7298828a04d9 | 6f9c2f42ab7afc57c0730c80d413118c457e2b55 | BossChengZhe/Practice-Leetcode | /Linklist/Leetcode_25.cpp | C++ | cpp | 1,072 | no_license | #include "iostream"
#include "vector"
using namespace std;
struct ListNode
{
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
ListNode *reverseKGroup(ListNode *head, int... |
9741594c60a63b92c636feb545b5507723b1bd68 | 21828f73b6d534fce2d861846ca233453d7e8645 | FLORG1/drlvm-vts-bundle | /vts/vm/src/test/vm/jvmti/funcs/SetLocalFloat/SetLocalFloat0104/SetLocalFloat0104.cpp | C++ | cpp | 3,150 | permissive | /*
Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable
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/LI... |
a9573fe75e53b542dafcba5b84ef03401cf569f0 | f424c978c727ec38c0df1df6d5c7fba21ffce226 | vijay0338/ogre-next | /OgreMain/src/OgreMaterial.cpp | C++ | cpp | 26,023 | permissive | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2014 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person ... |
b605d54a4a2f50b125a7d5dc46122df4299e3e8b | b1b1fa4c5a47281ef59b773adbf2b4ab4ea4f99c | zheng-ning/cpp | /code/w6.string.typdef.struct/str/method1.cc | C++ | cc | 1,109 | no_license | //string equal testing
////string code 5
#include <iostream>
#include <string> //need to include
using namespace std;
int main(){
//
string name = "Sarah";
for(int i=0;i<name.size();i++){ //size method
cout << name[i] << endl;
}
//the following methods use the same ex stri... |
d2793f822bdaf55f0e5e2364413bc55083321c22 | 2b237a71393dd3dd66cd5114c5f4bb1dfb29df52 | qtxxcj123/MyOnboard-SDL | /Module/listLInked.cpp | C++ | cpp | 4,078 | no_license | #include "listLinked.h"
listLinked::listLinked()
{
this->head = new NODE();
initList();
}
listLinked::~listLinked()
{
}
void listLinked::initList()
{
if (this->head == NULL)return;
this->head->id = 0;
this->head->next = this->head;
this->head->prior = this->head;
}
void listLinked::addNode(NODE * newNode)
{
i... |
53285b0a6250cf4109a4b956329f310c04003241 | f311cf67fe620da46d0588075cb70d79ee27a261 | rayrone/uva | /445.cpp | C++ | cpp | 399 | no_license | #include<stdio.h>
#include<ctype.h>
/* Marvelous Mazes - 445 */
main(){
int cont=0;
char c,ant;
while(scanf("%c",&c)!=EOF)
{
ant=c;
if(isdigit(c))
cont+=c-48;
else
{
if(c=='b')
c=' ';
if((c=='!' || c=='\n'))
{
if(ant!='!')
printf("\n");
}
else
... |
4a11bc0aac3f9d4e80555dde2310aa6df5c7e44d | 232b339069ec18c28665e8df45565677710cf87b | skleee/boj-ps | /1707.cpp | C++ | cpp | 1,179 | no_license | #include <iostream>
#include <vector>
#include <cstring>
#pragma warning(disable:4996)
using namespace std;
vector<int> v[20001];
int K, V, E;
int colorarr[20001] = {0,};
//color: 0 초깃값, 1, 2는 각각 색깔
void DFS(int nodeNum, int color){
colorarr[nodeNum] = color;
for (int i = 0; i < v[nodeNum].size(); i++) {
int ad... |
b7d4ad3c06082569274cf7bcb24c2cf90cd963da | b909d29e698644125cbb92ee859bf5b01bf1ea35 | TatuyaSaeki/2-DirectX11 | /src/Engine/src/object/camera/camera.cpp | C++ | cpp | 2,730 | no_license | //===========================================================================
//! @file camera.cpp
//! @brief カメラ
//===========================================================================
//---------------------------------------------------------------------------
//! 初期化
//---------------------------------------... |
d95a9224d26dafd1a5069f8655cd847d92533e57 | d97bb8244c188eae9f0a3e6347e539a95ba01b6e | ibumsu/sp2019 | /quizserver.cc | C++ | cc | 9,956 | no_license | //==============================================================================
// quizserver.cc: includes 'quiz' feature
//==============================================================================
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/type... |
ee0a7efb26356ec667e7582a6a53b4ea9ce898d7 | 19425ccdc081113a282f09e12f8387b4b4416306 | ISISComputingGroup/EPICS-areaDetector | /ADnED/ADnEDApp/src/ADnEDMain.cpp | C++ | cpp | 405 | permissive | /* ADnEDMain.cpp */
/* Author: Marty Kraimer Date: 17MAR2000 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "epicsExit.h"
#include "epicsThread.h"
#include "iocsh.h"
int main(int argc,char *argv[])
{
if(argc>=2) {
iocsh(argv[1]);
... |
314d1a95b23a52d42e7af769c67c476cd65e4403 | de6c98cb94f856d0c0096ac9178c4ec68ff76f6b | jonathanrgoh/Personal-Projects | /calculatorApp.cpp | C++ | cpp | 4,164 | no_license | #include <iostream>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
// Driver code
void sleep(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
void changeConsoleColor(int x) // use argument 10 for green ... |
9327fd867edd80802b827e807826dfaf3716c781 | 46c5976a51fd0851b8e4eb6295b2b352c8b5353e | sbtxg/ROS_omni_cai | /src/imu_test.cpp | C++ | cpp | 4,607 | no_license | #include <string>
#include <iostream>
#include <unistd.h>
#include <cstdio>
#include <ros/ros.h> // 包含ROS的头文件
#include <sensor_msgs/JointState.h>
#include <tf/transform_broadcaster.h>
#include <nav_msgs/Odometry.h>
#include <sensor_msgs/Imu.h>
#include <boost/asio.hpp> //包含boo... |
3ff971acf836bebf84ab6d653c1440444a2cd0b2 | 3c457a785c84cdc7e4b74281824963079f91d8b2 | IAmFiveHigh/learncpp | /矩阵转置/矩阵转置/main.cpp | C++ | cpp | 1,011 | no_license | //
// main.cpp
// 矩阵转置
//
// Created by 我是五高你敢信 on 2018/7/18.
// Copyright © 2018年 我是五高你敢信. All rights reserved.
//
#include <iostream>
using namespace std;
void swap(int &a, int &b) {
int temp = a;
a = b;
b = temp;
}
int main(int argc, const char * argv[]) {
int a[3][3];
cout << "输入九个... |
7cac5fb381dbf9d39afdd96d298924b0f1cedc24 | 508968ae770e7286632d0f52a8513b5332a8a339 | redcpp/Competitive-Programming | /icpc/2016_RPC11/B.cpp | C++ | cpp | 1,333 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<string> vs;
#define INF 1000000000
#define abs(x) (x<0?... |
f7ee58516188f5d5043b722cda1669956c85140c | b934379dc529cc371d819788ae53f24cc45ab932 | yto9/competitive_programming | /atcoder/ABC148/E.cpp | C++ | cpp | 417 | no_license | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
int main(int argc, char const *argv[])
{
cin.tie(0);
ios::sync_with_stdio(false);
ll N; cin >> N;
ll res = 0;
if (N%2==0) {
N /= 2;
ll d = 5;
REP(i,25){
... |
73a0063bf3b04cc4c7bbad2ce207f9ff728dc4ca | f8124624225a9f61b57139b6a41c105397d1d1da | PanTomko/ProffesionaCppTest | /Zadanie_17/main.cpp | C++ | cpp | 372 | no_license | #include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
void myfunction(int i) {
cout << " " << i;
}
int main()
{
int t[] = { 10, 5, 9, 6, 2, 4, 7, 8, 3, 1 };
vector<int> v1 = { 10, 5, 9, 6, 2, 4, 7, 8, 3, 1 };
copy_backward(t, t + 10, v1.rend());
for_each(v1.begin(), v1.end(), myfuncti... |
31c30277a5369b15ff0227ae57cb56b3c70c26e8 | ceb6049e2ef626f55f8a2a4f505f93317bf604ea | Stakhiev-Alexander/filling-form-for-surfaces | /main.cpp | C++ | cpp | 219 | no_license | #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow mainWindow;
mainWindow.setFixedSize(1490, 686);
mainWindow.show();
return a.exec();
}
|
f2f50a9b62828729104a94df61b9fae7567df95f | 374466bdda350d73daf296435e65f34ef0063051 | juyingguo/android-knowledge-principle-interview | /18-c-and-cpp/cpp_project/04_c++_programming_2th/teaching_material/c6/c6-5-2.cpp | C++ | cpp | 210 | no_license | #include <iostream>
using namespace std;
int main()
{
int a[10];
int i;
for(i=0;i<10;i++)
cin>>*(a+i);
cout<<endl;
for(i=0;i<10;i++)
cout<<*(a+i)<<" ";
cout<<endl;
return 0;
} |
030acbe8eba77ca9e4f0ca654845edbf4313a333 | c0c4847a713f896fe640a78745efa244fdaae221 | aajjbb/contest-files | /UVA/SnakesAndLadders.cpp | C++ | cpp | 1,418 | permissive | #include <bits/stdc++.h>
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ... |
c074f403a00bb8296b1b4d51456dd8e60e317ef0 | c9778a62dcb545692ca25780aebd6706e2abb3a3 | tiwarikajal1306/AssignmentDay14_CPP | /dynamicBnding.cpp | C++ | cpp | 337 | no_license | #include<iostream>
using namespace std;
class Base {
public:
virtual void display() {
cout<<"In Base class" << endl;
}
};
class Derived: public Base {
public:
void display() {
cout<<"In Derived class" <<endl;
}
};
int main() {
Base *base_pointer = new Derived;
base_pointer->display()... |
c9fabdc9687dca58ae7c67b8034ec9d274f35608 | eaeb05bc1790ea2c2e71e05fa0c7f02d66e34700 | pavelsimo/ProgrammingContest | /uva/10282_Babelfish/P10282.cpp | C++ | cpp | 921 | no_license | /* @BEGIN_OF_SOURCE_CODE */
/* @JUDGE_ID: 10282 C++ "Ad Hoc" */
#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#include <cstring>
using namespace std;
#define FOR(i,x,y) for(int i=(int)(x);i<=(int)(y);++i)
#define REP(i,n) FOR(i,0,n-1)
#defi... |
cc213ad99c81d9c4161f5323d69977567af5ef07 | 0871e3a7d62fd51cc263a4a737d29603d6a10666 | deep-programmer/geogram | /src/lib/geogram/basic/logger.cpp | C++ | cpp | 19,182 | no_license | /*
* Copyright (c) 2012-2014, Bruno Levy
* 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 c... |
cfbfaa04b80df60706e58f2dce1837841dcecbb7 | 0f5c4ed2d2892e43b1275a48a5ab3a8bb7324de7 | OyunaM/Homework-2 | /HW0306/HW030612.cpp | C++ | cpp | 341 | no_license | #include<iostream>
using namespace std;
int main(){
int month;
cout<<"Input month : ";
cin>>month;
if(month==2){
cout<<month<<"has 28 days expect leap year";
}else if(month==4 || month==6 ||month==9 || month==11){
cout<<month<<" has 30 days";
}else{
cout<<month<<" has 31 days";
}
... |
3481052062246bd42ef44752990fad7239a1e560 | e2009bac1f3ac639093cde7f261fc26c2b488881 | ashokkrin/pytorch | /tools/autograd/templates/python_torch_functions.cpp | C++ | cpp | 7,606 | permissive | // ${generated_comment}
// Python bindings for torch.* functions implemented through ATen.
//
// The functions are bound as static methods on a class
// torch._C._VariableFunctions which is also aliased as Variable._torch
// and also copied into 'torch' module.
#include <Python.h>
#include "torch/csrc/Dtype.h"
#incl... |
4332a8b2c2869381cff17bb234a609ef8474b67e | 637c14848d80edc9d55570cd68b9c592a87c8aed | Reidond/mdb2sqlite | /wxwidgets/tests/geometry/point.cpp | C++ | cpp | 3,269 | permissive | ///////////////////////////////////////////////////////////////////////////////
// Name: tests/geometry/point.cpp
// Purpose: wxPoint unit test
// Author: Wlodzimierz ABX Skiba
// Created: 2004-12-14
// Copyright: (c) 2004 wxWindows
/////////////////////////////////////////////////////////////////... |
2b9acd3522542e0b00e36e180d8e30ae52c72a09 | 58c30ac12e9ae4fa51a7fb4289481258b4707ca1 | cmd120/ALOP | /LR_GD_M.cpp | C++ | cpp | 1,412 | no_license | LR_GD_M(objFunc,X,y,Xtest,ytest,passes,a,b,gamma,\
batchSize,dataset,gridNum,maxRunTime){
int d = size(X,1), n = size(X,2);
iterNum = passes*2;
lambda = objFunc.lambda;
w = MatrixXd::Zero(d,1);
initCost = objFunc.costprint(w,X,y,0);
initDistance = ((w - objFunc.optSolution).array().square()).array().sum();
in... |
fd1081a7f9e96d0af4bf294970a14c0ac9cfda51 | dba8d70afa1031fcaf61b21db61ffb75a35a14ef | JoeGruffins/absolute | /src/test/scriptnum_tests.cpp | C++ | cpp | 7,461 | permissive | // Copyright (c) 2012-2015 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 "scriptnum10.h"
#include "script/script.h"
#include "test/test_absolute.h"
#include <boost/test/unit_test.hpp>
#inc... |
34b68972d15eed3845170ae14ad7b3af0d948595 | 7c51596bb45087ea35c9864b12f72cdbf0d39789 | bitmingw/LintcodeSolution | /376BinTreePathSum/main.cpp | C++ | cpp | 1,606 | no_license | #include <string>
#include <cstring>
#include <vector>
#include <iostream>
using namespace std;
//Definition of TreeNode:
class TreeNode {
public:
int val;
TreeNode *left, *right;
TreeNode(int val) {
this->val = val;
this->left = this->right = NULL;
}
};
class Solution {
public:
... |
c4a81cbc5e3456ef358906cf2b9f615c54f80f38 | 655396790997e4d696b77c7a3bc69bf570eae355 | alexandraback/datacollection | /solutions_5658282861527040_0/C++/NateRiverxkh/main.cpp | C++ | cpp | 608 | no_license | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define maxn 5010
#define maxe 500010
#define INF 1<<30
int n,m,len[maxn],id[maxn],nxt[maxn];
char s[110][110];
int main()
{
int ncase,a,b,c,tt=0,i,j;
freopen("B-small-attempt0.in","r",stdin);
freopen("B-small-attempt0.... |
692fa2412ea2608c2985a5a71f942f071a020ec1 | 3abee42cf3e7517a03464c3f8a3646a571a7c7af | MahiAlJawad/Competitive-Programming | /Codeforces/CF 1102A.cpp | C++ | cpp | 4,676 | no_license | /***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) blesses with knowledge whom he wants."***/
/*Header file starts here*/
//#include<bits/stdc++.h>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<algorithm>
#include<iostream... |
70bb3653fffc457df3692a7ca6eef1e52f82bc89 | 192a53dccf6e4492d732b18e0faa14e7ba79af1c | rhyseowen/pp6calculator | /PP6Menu/weekFourMenu.cpp | C++ | cpp | 5,520 | no_license | #include <iostream>
#include <climits>
#include <string>
#include <vector>
#include <cstdlib>
#include <iterator>
#include <algorithm>
#include <cmath>
#include "weekFourMenu.hpp"
#include "FileReader.hpp"
#include "ParticleInfo.hpp"
#include "Particle.hpp"
int weekFourMenu()
{
int err = 0;
weekFourPrintHelp();
... |
6ac775be51c25f15325f275cfc2905bc84820bcd | 9f086d354d64b6ff3c836680d8f382237419dd51 | actor-framework/actor-framework | /libcaf_core/caf/detail/parser/read_config.hpp | C++ | hpp | 7,761 | permissive | // This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#pragma once
#include "caf/config.hpp"
#include "caf/detail/parser/chars.hpp"
#include "c... |
9920f4bbe7ff987a608aca59772718f58d9813dd | 6c2e110bcaba87d5d524b34b8ea74dee3d6eaf68 | HaikuArchives/IMKit | /libs/libjabber/JabberMessage.cpp | C++ | cpp | 1,791 | permissive | #include "JabberMessage.h"
#include "Logger.h"
JabberMessage::JabberMessage()
{
fTo = "";
fFrom = "";
fBody = "";
fStamp = "";
fId = "";
fOffline= false;
fType="";
fError="";
fX="";
}
JabberMessage::JabberMessage(const JabberMessage & copy)
{
fTo = copy.fTo;
fFrom = copy.fFrom;
fBody = copy.fBody;
fStam... |
54f0ccf0a98395c69e166cdbe3fdeb87da26bf09 | 710c2517e23121f0b8d6092f0f5ff312ffb41197 | olegbaxan/CHomeWork | /60 exe tablouri/Tablouri 2.cpp | C++ | cpp | 437 | no_license | #include <iostream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <conio.h>
#include <iomanip>
using namespace std;
int main()
{
srand(time(0));
int V[100],n=rand()%10;
for (int i=0;i<n;i++){
V[i]=rand()%100;
}
for (int i=0;i<n;i++)cout<<setw(3)<<V[i];
cout<<endl;
... |
0760505699947d08030717536cd75709b675b6aa | f99982abfd8ec9ff576d45626cde341f72e4a618 | dreamplayer-zhang/SYCL_FS | /examples/includes/tools/missing_implementations.hpp | C++ | hpp | 882 | permissive | #pragma once
#include <sycl/sycl.hpp>
static inline sycl::event memcpy_with_dependency(sycl::queue &q, void *dst, const void *src, size_t num_bytes, const sycl::event &dep_event) {
return q.submit([=](sycl::handler &cgh) {
cgh.depends_on(dep_event);
cgh.memcpy(dst, src, num_bytes);
});
}
stat... |
ef1280d21c8e08426db5917318f1bd36c0a835ec | 731ba18aadb320d75b0ec44dcc5bc605a5b5a03d | justforname/LimeSuite | /src/lms7suiteAppFrame.cpp | C++ | cpp | 18,913 | permissive | #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif //WX_PRECOMP
#include "lms7002_mainPanel.h"
#include "lms7suiteAppFrame.h"
#include "dlgAbout.h"
#include "dlgConnectionSettings.h"
#include "lms7suiteEvents.h"
#include "fftviewer_frFFTview... |
9908af3e8ff6087912efa3e4fd2c56eae13e2f60 | 59430e642aaf47b00c67c869581dfc36cc9de4c7 | inspectorK/GravitySim | /GravitySim/main.cpp | C++ | cpp | 466 | no_license | #include "vect.h"
#include "vect_unittest.h"
#include "particle.h"
#include "simmgr.h"
#include <iostream>
int particle::next_available_id = 0;
int main(int argc, char* argv[])
{
bool sun = true;
if (argc > 1)
{
if (argv[1] == "-sun")
{
sun = true;
}
}
vector<p... |
83173356d1479950f39fc0a13bd19ca67334119f | 28535452d024abcfec8ed174d0a2f5a59c2cf82b | ricardomelocastro/LAIG2 | /src/Attributes.cpp | C++ | cpp | 8,830 | no_license | #include "Attributes.h"
Attributes::Attributes(){}
int indexofdisplay;
void Attributes::setRootId(string root){
this->root_node_id = root;
}
void Attributes::cameraById(int Id){
map<string, Camera *>::iterator it;
it = cameras.begin();
int i = 0;
while(i < Id -1)
{
it++;
i++;
}
this->setInitialCamera(i... |
89765b83fa6d1573677c934a47dc7b0ecd0597ab | efbf4a4bb01ef50057d90e898bf329f126dc2f03 | renato-yuzup/axis-fem | /Axis.CommonLibrary/domain/analyses/ModalAnalysisInfo.hpp | C++ | hpp | 1,872 | permissive | #pragma once
#include "AnalysisInfo.hpp"
#include "foundation/Axis.CommonLibrary.hpp"
namespace axis { namespace domain { namespace analyses {
/**
* @brief Carries information and state of a modal analysis.
**/
class AXISCOMMONLIBRARY_API ModalAnalysisInfo : public AnalysisInfo
{
public:
/**
* @brief Construct... |
d7060084f15b9b846f77fe7f053ec2a121ad0ded | 60a44b2128a16a457111479274f4cb87c0d30670 | rosoareslv/SED99 | /c++/godot/2017/12/ip.cpp | C++ | cpp | 9,152 | permissive | /*************************************************************************/
/* ip.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
741a4176ab8bcf4cc41c03bc697627093380ed9c | a676486af0f7162cb57b3ec699d650231f2bb227 | cvalencia09/Jumping-into-cpp | /cap9/pp9_3.cpp | C++ | cpp | 987 | permissive | // Program to print all prime factors
# include <stdio.h>
# include <math.h>
# include <iostream>
using namespace std;
// A function to print all prime factors of a given number n
void primeFactors(int n)
{
// Print the number of 2s that divide n
while (n%2 == 0)
{
cout << "2"<< " ";
n =... |
c917ccb7a9a48819a71b51e33dfda7ea2db7e9e1 | 07491c5ba0955c0aec9f1a2e6201d2b57dd1c937 | codefresher32/CompetitiveProgramming | /OnlineJudgeSolutions/SPOJ/spoj NDS.cpp | C++ | cpp | 829 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii pair<ll,ll>
#define pi pair<int,int>
#define F first
#define S second
#define pb push_back
#define pp pop_back
#define eps 10E-10
#define mod 4294967296
#define on(x) (marked[x/64]&(1<<((x%64)/2)))
#define mark(x) marked[x/64... |
72fc18fdbadc4e3fee14869fa5d52f0ee68de0ac | e02434ed519f99fcd939f0ba7d3087ca67896fa0 | ulorentz/NumericalSimulation | /exercises06/code/source/main.cpp | C++ | cpp | 847 | no_license | #include <iostream>
#include "Ising1D.h"
int main(int argc, char** argv){
std::string usage =
"Usage: " + std::string(argv[0]) + " [options] \n"+
"Where options (compulsory) should be: \n" +
"\t--one-config to start from random configuration\n"+
"\t--restart to restart simulation from co... |
80ae6b0f1c9e0c83adab27559659d7efd00c652e | 9a11b1566de556842384f9f183a0c61fdf4c69e5 | jjzhang166/WinNT5_src_20201004 | /NT/admin/wmi/wbem/winmgmt/wbemcomn/md5wbem.cpp | C++ | cpp | 1,007 | no_license | /*++
Copyright (C) 1996-2001 Microsoft Corporation
Module Name:
Abstract:
History:
--*/
#include "precomp.h"
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "md5.h"
#include "md5wbem.h"
void MD5::Transform(
IN LPVOID pInputValue,
IN UINT uValueLe... |
68734a0f23c212422109c5ec60aefdb3e40ce386 | 2cd4c69c86f961c37d2c4a050da83f62d7b10b7e | KDE/kdepim-runtime | /resources/openxchange/oxa/foldersrequestjob.cpp | C++ | cpp | 2,437 | permissive | /*
This file is part of oxaccess.
SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "foldersrequestjob.h"
#include "davmanager.h"
#include "davutils.h"
#include "folderutils.h"
#include "oxutils.h"
#include <KIO/DavJob>
using namespace OXA... |
015e1e1975545182817e6868645e2e95eac93718 | 73077d55acae9996217cfa81de51c5f76a684bf0 | SiCoYu/UE | /Project/MyProject/MyProject/Source/MyProject/Private/MyEngine/MyTom/Actor/MyTomPlayerController.cpp | C++ | cpp | 10,081 | no_license | #include "MyProject.h"
#include "MyTomPlayerController.h"
#include "UtilEngineWrap.h"
#include "MyFunctionLibrary.h"
#include "Net/UnrealNetwork.h" // DOREPLIFETIME
#include "MyFlowerActor.h" // AMyFlowerActor
#include "Blueprint/UserWidget.h" // UUserWidget
#include "MyTomPlayerCameraManager.h"
#include "Prequisites.h... |
2959bd99970bbfacb96fc2dd473c53bd181ccd18 | 069cc1a168b396bb28a08f2d287aa808216f6c10 | BaGGeR322/hw_prog | /22.04.20 Жадные алгоритмы/Задача A. Выбор заявки.cpp | C++ | cpp | 1,400 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <set>
#include <time.h>
#include <algorithm>
#include <limits.h>
#include <stdio.h>
#include <map>
#include <cmath>
#include <fstream>
#include <sstream>
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int> > list(N, vector<int>(2, ... |
bd59284d09e51b61e335d1daab82074626282681 | 1912f2cbc94e9dd7f3b813399a720fa42b4e8060 | CristinaBaby/Demo_CC | /cc/1055/Classes/layer/MixPoint.cpp | C++ | cpp | 2,515 | no_license | //
// MixPoint.cpp
// candyfactory
//
// Created by luotianqiang1 on 16/4/25.
//
//
#include "MixPoint.h"
void MixPoint::setPointPath(const string& s){
pointPath = s;
}
void MixPoint::run(float time) {
// if(!getActionByTag(acTionTag)||abs(delayTime-time)>0.7) {
// auto acton = Sequence::create(Del... |
fbc24a382045998dc2848da006d2a807404467f1 | 2654499d6e7ba585c41a8fd500249c263496b043 | HackerEva/RebornEngine | /RebornEngine/RBRender/RBText.cpp | C++ | cpp | 2,858 | no_license | #include "RBText.h"
#include "RBResourceManager.h"
using namespace RebornEngine;
RBText::RBText()
: m_FontShader(nullptr), m_bNeedUpdateBuffer(true)
{
}
RBText::~RBText()
{
m_VertexBuffer.Release();
}
void RBText::Initialize(RBTexture * fontTexture, UINT rows, UINT columns)
{
if (!fontTexture)
{
m_FontTexture... |
4f1e50819acf71924e7065b57c8e18cf093041e4 | 94d0402af640b406ce7aac6c718746c19500785d | gedatsu217/llvm-project | /clang-tools-extra/clangd/unittests/FindTargetTests.cpp | C++ | cpp | 38,308 | permissive | //===-- FindTargetTests.cpp --------------------------*- C++ -*------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
015bb1b4038c180f1271715f365a053c400c7a17 | 56e335204646424911a74c0950112533a569a0f4 | Jaehwa-Seo/Algorithm | /easy/function/15964.cpp | C++ | cpp | 234 | no_license | #include <iostream>
#include <string>
using namespace std;
long long calculate(long long a,long long b)
{
return (a+b) * (a-b);
}
int main()
{
long long a,b;
cin >> a >> b;
cout << calculate(a,b);
return 0;
} |
fc47d5ecc0078639ebf65b44ff05a98dcfe299b7 | dc7e98973290c24b0b8cc6e1b77870661f2d5b3c | ahmed-dardery/Programming-I | /Assignment 4/main.cpp | C++ | cpp | 16,593 | no_license | /*
// Program: Assignment 4.cpp
// Purpose: Loads image from file, applies some filters on it
// and then saves it in another file.
//
// Authors: Ahmed Nasr Eldardery (20170034)
// Adham Mamdouh Mohamed (20170039)
// Belal Hamdy Ezzat (20170077)
// Date: 12 April 2018
// Versio... |
1554b33671294fbbd16d94b2a9bb406995fe11ba | 89787ccaf216ad609bdd8fe0337184d6d3b148db | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/W+RR+WW+RW+poaa+dmb.sylp+dmb.sy+L.c.cbmc.cpp | C++ | cpp | 54,928 | no_license | // 0:vars:3
// 6:thr0:1
// 7:thr1:1
// 3:atom_1_X0_2:1
// 4:atom_1_X2_0:1
// 5:atom_3_X0_1:1
// 8:thr2:1
// 9:thr3:1
#define ADDRSIZE 10
#define NPROC 5
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
cha... |
988087e572c42d7978c3471209580be1e588cb01 | f32046e69f487b1bfa4ac9514e0f821f827da4e5 | kallewoof/bitcoin | /src/test/fuzz/rpc.cpp | C++ | cpp | 13,563 | permissive | // Copyright (c) 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 <base58.h>
#include <core_io.h>
#include <key.h>
#include <key_io.h>
#include <node/context.h>
#include <primitives/block... |
c74417415b9eab09144e0cb01757874ee8989ce7 | 7746f3611252db9e03330bfef617ac7c9c057e2d | kitesoft/Roomer-PMS-1 | /Extras/DevExpress VCL/Library/RS17/dxServerModeHelpers.hpp | C++ | hpp | 10,504 | no_license | // CodeGear C++Builder
// Copyright (c) 1995, 2012 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'dxServerModeHelpers.pas' rev: 24.00 (Win32)
#ifndef DxservermodehelpersHPP
#define DxservermodehelpersHPP
#pragma delphiheader begin
#pragma option push
#pragma opti... |
2b0e8ca0ed3acaf077f0aaf59027588ac42eadd8 | 321414310d2ac07ba052374ec94ab80b0916a2fd | TrellixVulnTeam/Chromium_7C66 | /content/renderer/media/webrtc/processed_local_audio_source_unittest.cc | C++ | cc | 9,388 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "build/build_config.h"
#incl... |
5fb66f8cf374d47bad1d7de73dfe16ac2accd82d | 8b188441231e38cd4a27ec2ea17ab94c2bf94e0f | M4thez/UczelniaCDV | /Rok I/Wybor.cpp | C++ | cpp | 1,658 | no_license | #include <iostream>
using namespace std;
int main()
{
int wybor = 0;
while (wybor != 4)
{
cout << "Jaka operacje chcesz wykonac na liczbach od a do b?\n";
cout << "1 - suma\n2 - suma kwadratow\n3 - srednia arytmetyczna\n4 - koniec programu\n\n";
cin >> wybor;
if (wybor != 4)
{
int a, b... |
d94ca6cbe00e7c73cfaa567a4bda1b4d3d44f1bd | 7ee48459a7570c06b75f74537f302fd6856af39b | blighli/graphics2020 | /22051150李浩雨/编程作业/homework_2/material.cpp | C++ | cpp | 1,146 | no_license | #include "Material.h"
Material::Material(Shader* _shader, glm::vec3 diffuse, glm::vec3 specular, float shininess)
{
this->shader = _shader;
this->singleDiff = diffuse;
this->singleSpec = specular;
this->shininess = shininess;
this->shineStrenth = 1.0f;
}
Material::Material(Shader* _shader, unsigned int _diffuse,... |
d28a3e09d7e4e2c04a2de317c6896abe78856027 | cc89d846d4b9994a87aed70bddff0113c2b814e4 | trinhgiahuy/Programming2_Spring_2021 | /student/07/tramway2/main.cpp | C++ | cpp | 23,762 | no_license | /* Program author 1
* Name: Trinh Gia Huy
* Student number: H290290
* UserID: bdgitr
* E-Mail: giahuy.trinh@tuni.fi
*
* Program author 2
* Name: Nguyen Nhat An
* Student number: 050359099
* UserID: kbanng
* E-Mail: an.nguyen@tuni.fi
* Notes about the program and it's implementation:
*
* Desc:
* a program ... |
19f0faf0e6e0a3f76b0650d9e1e16930cb6b105d | ce48f4ce956c2256866b9aba01bbb71910892102 | mhocouchbase/couchbase-mobile-tools | /cblite/cbliteTool+put.cc | C++ | cc | 3,804 | permissive | //
// cbliteTool+put.cc
//
// Copyright (c) 2018 Couchbase, Inc 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
//
//... |
acf0372eeffd08405a2c8787b5776532824336d9 | 43841c2e22e90ef09d8e58fe39ea6b38f5402edf | alexandraback/datacollection | /solutions_1483488_1/C++/nghiand/C.cpp | C++ | cpp | 1,286 | no_license | #include <iostream>
#include <cstdio>
using namespace std;
int t, test, a, b, res, g[7];
int main(){
// freopen("C-large.in", "rt", stdin);
// freopen("C-large.out", "wt", stdout);
cin >> t;
for (test = 1; test <= t; test++){
cin >> a >> b;
res = 0;
int cnt = 0, x,... |
405c764151a56b88dc2b224b0a8e94b63bb43fdc | 178ff4afb0615a00c0efa95ce50623ec8b6af85f | yajunjiao/HOWARD11 | /src/Misc/Transform.hxx | C++ | hxx | 1,293 | no_license | //
// Made by secondwtq <lovejay-lovemusic@outlook.com> with Love.
//
// Date: 2015-05-27
// Copyright (c) 2015 SCU ISDC All rights reserved.
//
// This file is part of the HOWARD11 Game Engine.
//
// WE ARE STANDING ON THE EDGE.
//
#ifndef HOWARD11_TRANSFORM_HXX
#define HOWARD11_TRANSFORM_HXX
#include <glm/glm.hpp>
... |
3c0e6d64ff10bb1993f4df08c6aa6f67caa328f6 | 4f448508a0639e2d13d89e23a04aa3ac51d8b8af | LeviMatias/TPF-Micromachines | /common/conc/BaseThread.cpp | C++ | cpp | 953 | no_license |
#include "BaseThread.h"
void BaseThread::close() {
this->alive.store(false);
}
void BaseThread::join() {
if (running){
this->t.join();
running = false;
}
}
bool BaseThread::isAlive() {
return alive.load();
}
void BaseThread::run() {
running = true;
this->alive.store(true);
... |
f738c5a3f0e1be32888dea4ddb5258c7d6ed4bbf | 88300f9ee5d8b5381ef19f3fa02b8770828e0744 | WolfgangBai/LogDevice | /logdevice/server/RebuildingWakeupQueue.cpp | C++ | cpp | 3,610 | permissive | /**
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/server/RebuildingWakeupQueue.h"
#include <unordered_map>
#include "logdevice/common/de... |
533e9ba7ae61f63a1198e89eec3881a1286f4521 | 424e4dc89390b15a6cfcd932ecb29d51290a3faa | leopeng1995/acplusplus | /数据结构/树/最近公共祖先/LCA4.cpp | C++ | cpp | 1,346 | no_license | #include <iostream>
#include <cstdio>
using namespace std;
struct Node {
struct Node *left, *right;
int key;
};
Node* newNode(int key) {
Node *temp = new Node;
temp->key = key;
temp->left = temp->right = NULL;
return temp;
}
//Node *lca(Node* root, int n1, int n2) {
// return root;
//
// if (root == NU... |
8d82a5427125b9035c68c63dfb60bfd6a9724ded | 1bff26a59a88377e0b7120370958880495103438 | WarfareCode/SMTK | /smtk/io/ExportMesh.cxx | C++ | cxx | 3,195 | permissive | //=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
694ebc615725085f78dcafc9d8e065a8b69638ae | 39c3b04918cd9dae36d207489f5fa63daf17475f | Outshynd/SoT-SDK-1 | /SDK/SoT_BP_Emote_Wave_Desc_classes.hpp | C++ | hpp | 703 | no_license | #pragma once
// Sea of Thieves (1.4.16) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_Emote_Wave_Desc_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//------------------------------------------------------------------------... |
53143bb79c573f1e1b05eb53b39da0c9e243da5d | 7de67e2715a5945b8fc5f8f507905846a8bba04f | barbaroony/GMSEC_API | /java/src_4x/gmsecJNI_ConnectionManagerEventCallback.cpp | C++ | cpp | 3,207 | no_license | /*
* Copyright 2007-2020 United States Government as represented by the
* Administrator of The National Aeronautics and Space Administration.
* No copyright is claimed in the United States under Title 17, U.S. Code.
* All Rights Reserved.
*/
#include "gmsecJNI_ConnectionManagerEventCallback.h"
#include <gmsec4/... |
646680b59dd66d1b1063c310dd9372f930187077 | 385564c50f099e6b8e192bc5b2b2c75c8f6a5047 | sunlightshen/VScodeProject | /C/C++/多继承.cpp | C++ | cpp | 970 | no_license | #include <iostream>
using namespace std;
// 基类 Shape
class Shape
{
public:
void setWidth(int w)
{
width = w;
}
void setHeight(int h)
{
height = h;
}
protected:
int width;
int height;
};
// 基类 PaintCost
class PaintCost
... |
590f5ee9b06fbe6c94a96e6407db0bb2b2a72729 | 48deab40ce77d91972d39b0ac277a644e6b24514 | playplatter/DragMeAway | /Classes/SelectionScene.cpp | C++ | cpp | 8,306 | no_license | //
// SelectionScene.cpp
// DragMeAway
//
// Created by Sarah Furqan on 19/10/2014.
//
//
#include "SelectionScene.h"
#include "HelloWorldScene.h"
#include "MainMenuScene.h"
#include "SimpleAudioEngine.h"
using namespace cocos2d;
Scene* SelectionScene::createScene() {
// 'scene' is an autorelease object
a... |
66cca4334ac9e0e83b0c4743e9729c1ee3595d55 | 09427af62ad2613548a605ec7f4248e493d12177 | new-economy/evt | /plugins/staking_plugin/include/evt/staking_plugin/staking_plugin.hpp | C++ | hpp | 785 | permissive | /**
* @file
* @copyright defined in evt/LICENSE.txt
*/
#pragma once
#include <evt/chain_plugin/chain_plugin.hpp>
#include <evt/http_client_plugin/http_client_plugin.hpp>
#include <appbase/application.hpp>
#include <evt/chain/controller.hpp>
namespace evt {
using evt::chain::controller;
using namespace appbase;
... |
90e6bb90fed7622026c103cb9b8e5777ad6ea712 | 7739fcc5dc47a43c59b408d7a4c4ce80d033e4a7 | kirwinia/ares-emu-v121 | /ares/sfc/coprocessor/necdsp/necdsp.hpp | C++ | hpp | 735 | permissive | struct NECDSP : uPD96050, Thread {
Node::Object node;
n32 Frequency = 0;
struct Debugger {
//debugger.cpp
auto load(Node::Object) -> void;
auto instruction() -> void;
struct Tracer {
Node::Debugger::Tracer::Instruction instruction;
} tracer;
} debugger;
//necdsp.cpp
auto load(No... |
68e1728e36a92f7b12f673b8511cec73d54aaeec | fa543735e963a1a2b47991a083478c46e49834e8 | cleancoindev/deeplearning4j | /libnd4j/tests_cpu/layers_tests/DeclarableOpsTests5.cpp | C++ | cpp | 96,802 | permissive | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
c68aedc81b22e6dc7a44d1a1f4e5c7b3699d020b | 13d346459530b4f5449744f89d685f1d94cb671d | 50417/phd | /learn/atcxx/templates.cc | C++ | cc | 2,045 | no_license | #include <array>
#include <iostream>
#include <string>
#include <vector>
template<typename Container, unsigned int n>
class _fib {
public:
enum { val = _fib<Container, n - 1>::val + _fib<Container, n - 2>::val };
static void compute(Container& result) {
result[n] = val;
_fib<Container, n - 1>::compute(res... |
e8b8b13f6d1feb2bac5f9d23aa35cf77d26f257e | 08adc92924555719bdf1c49d536a9b234913a3b2 | Anonymous-V/Principles-and-Practice-Using-CPP-2nd-edition | /chapter_09/task_15-16/Money.cpp | C++ | cpp | 4,652 | no_license | #include "Money.h"
namespace Money {
Money::Money(std::string currency, double money)
:currency{currency}, money{money}
{
if (!is_money(money)) throw std::runtime_error("Negative value of money");
if (!is_currency(currency))
throw std::runtime_error("Unknown currency: " + s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.