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 |
|---|---|---|---|---|---|---|---|---|
19e4426b05cac748f9cf878588de88ab22b2f799 | be3374c13f23aeac5162fa1131c3ba93acec0672 | alexandraback/datacollection | /solutions_5738606668808192_0/C++/andcai/CoinJam.cpp | C++ | cpp | 1,003 | no_license | #include <fstream>
#include <iostream>
using namespace std;
int main(){
ifstream fin ("C-small-attempt0.in");
ofstream fout ("C-output.txt");
unsigned int t, n, j, x, tmp, tmp2, cnt;
fin >> t;
for (int i = 1; i <= t; i++){
fin >> n >> j;
fout << "Case #" << i << ":\n";
cnt = 0;
for (x = n/2; x >=... |
89712ab209b1e3b9c88454cd064d0723215586e1 | c1ba158956b10559f1fccb0c4165683d58566621 | GuyBivas/AdvacedTopics | /Ex2/Ex2/Parser.cpp | C++ | cpp | 4,140 | no_license | #include "Parser.h"
vector<string> split(string str, char delimiter) {
vector<string> splittedString = {};
size_t pos = 0;
while ((pos = str.find(delimiter)) != std::string::npos)
{
if (pos != 0)
splittedString.push_back(str.substr(0, pos));
str.erase(0, pos+1); // delete the substring and the extra char ... |
ecf18d64d3638f235d4b5379c6b4052801dd5f47 | f7d7119417632f20807c66377f4dc161546e1d44 | sakshi0461/Data-Structure-And-Algo | /LeetCode/Medium/Maximum Swap.cpp | C++ | cpp | 823 | no_license | class Solution {
public:
int maximumSwap(int num) {
deque<pair<char,int>>s;
string s1=to_string(num);
for(int i=0;i<s1.length();i++){
char n=s1[i];
while(!s.empty() && s.back().first<=n)
s.pop_back();
s.push_b... |
97878467b6af6fcd3e7d0212c3108163375d30df | b1c7620d8cf91a63ea02b4edaee9a8194acc2338 | makura46/AOJ | /Vol0/0005.cpp | C++ | cpp | 345 | no_license | #include <iostream>
using namespace std;
long gcd(long a, long b) {
if (!b)
return a;
else {
return gcd(b, a % b);
}
}
int main() {
long a, b;
while (cin >> a >> b) {
if (a < b)
swap(a, b);
long max = gcd(a, b);
long min;
if (max == 0)
min = a * b;
else
min = a * b / max;
cout << max << ... |
761903d3ed95c00d93ecda99fe5c2d36691556a5 | f3ff854fad45e8231039e1095fecc8e318b95dc7 | aperloff/TAMUWW | /SpecialTools/interface/FileLocationTable.hh | C++ | hh | 940 | no_license | // Ricardo Eusebi
// FNAL eusebi@fnal.gov
// created: Monday February 05, 2007
// $Id: FileLocationTable.hh,v 1.3 2013/06/19 17:05:19 aperloff Exp $
#ifndef FILELOCATIONTABLE_DEF
#define FILELOCATIONTABLE_DEF
//My libraries
#include "TAMUWW/SpecialTools/interface/Table.hh"
//C++ libraries
#include <iostream>
#includ... |
eb0f9240f1f2f0611c323bd55d4a1324414aefab | 7608b155b50156b8147277cba43431a38df6ea78 | MarcoDiFrancesco/LittleProjects | /C++/2016-02-11 Solar.cpp | C++ | cpp | 2,591 | no_license | #include <stdio.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/keyboard.h>
#include <cmath>
const double FPS=60.0;
const int displayX = 800, displayY = 600;
const int centerX=displayX/2,centerY=displayY/2;
////////////////////////////////////////////////
struct Planet
{
... |
a0c212777f6c28481211729069b091bb0b656d90 | 8b4e5977c3fcc51f2dc9ee2d8baeeb5c7be96b08 | axxonite/algorithms | /EPI/Problems/14_Sorting/14.1_intersect_sorted_arrays3.cpp | C++ | cpp | 234 | no_license | // Copyright (c) 2015 Elements of Programming Interviews. All rights reserved.
#include "stdafx.h"
vector<int> IntersectTwoSortedArrays(const vector<int>& a, const vector<int>& b)
{
vector<int> result;
return result;
}
// no test |
4ce7b6185861120691b0fca91a4d5beee10876d5 | ae5c82e425eeb8bfa264e92a819247fdac935ef5 | AviadAmar21/SpellingChecker | /Driver.cpp | C++ | cpp | 4,239 | no_license | #include "WordSpellingChecker.h"
#include "Driver.h"
#define N 80
int main()
{
char StrCheck[100] = "iam afraid youare about to become teh immexdiate pst president of teh eing alive club ha ha glados";
SpellingSuggestion * sp = spellingCheck(StrCheck);
printSpell(sp);
printf("Press ENTER to exit \n");
... |
e63f0f9d53a0c86117a1fbee9ad98299cdeac22b | b9e2836a233153e03de5a85b18ce1d07758e8a98 | muthubro/Amber | /Amber/src/Amber/Script/ScriptEngine.cpp | C++ | cpp | 22,444 | permissive | #include "abpch.h"
#include "ScriptEngine.h"
#include <ImGui/imgui.h>
#include <mono/jit/jit.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/attrdefs.h>
#include <mono/metadata/mono-gc.h>
#include "Amber/Core/FileSystem.h"
#include "ScriptEngineRegistry.h"
na... |
c19501fd48db6fdf0b68b7a1ebcca60c90b21ce6 | aa26e3e22dc5146f71cbbf857c470d37ad5fcd61 | uel-dataexchange/Opencascade_uel | /src/RWStepFEA/RWStepFEA_RWGeometricNode.cxx | C++ | cxx | 4,389 | no_license |
// File: RWStepFEA_RWGeometricNode.cxx
// Created: Thu Dec 12 17:51:06 2002
// Author: data exchange team
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
// Copyright: Open CASCADE 2002
#include <RWStepFEA_RWGeometricNode.ixx>
#include <StepRepr_HArray1OfRepresentationItem.hxx>
#include <S... |
ea5bdcc969ef65e96e73f7d7086de3b5dabf6fcb | 999e084847c00cd43f7bbdcf017dbefce3000de2 | btcup/sb-admin | /exams/2559/02204111/1/midterm/3_2_839_5920551364.cpp | C++ | cpp | 897 | permissive | //5920551364 Chittavon Chaisatapakorn
#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
double a,b,c,x1,x2,d;
cout<<"Enter coefficients a, b and c : ";
cin>>a>>b>>c;
cout<<" "<<endl;
d = ((pow(b,2))-(4*a*c));
{
if(d > 0)
{
cout<<"Roots are real ... |
f17e5aea9d779866edda0ea7251f2c7f435fbd55 | 9da447823460f99f0bba933c035d19e2ed13c8d4 | byte4byte/cloudretro | /chrome/browser/chromeos/input_method/ime_service_connector.cc | C++ | cc | 4,918 | 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 "chrome/browser/chromeos/input_method/ime_service_connector.h"
#include <memory>
#include <utility>
#include "base/files/file_util.h"
#include ... |
d82518a9d351377380505b17c4428632d53df243 | 92b420ed15df09483500be31db609d258eb036b0 | gabrielalmeida/4Dmv | /src/mainwindow.cpp | C++ | cpp | 805 | no_license | #include "mainwindow.h"
#include <QAction>
#include <QLayout>
#include <QMenu>
#include <QMenuBar>
MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) {
setObjectName("MainWindow");
setWindowTitle("4D Multilayer Viewer");
setupMenuBar();
}
void MainWindow::setupMe... |
a054e61acef2ba9f3a1cf3361a845aab2a6800ca | 0452d0047b053369f7a3b9a61eac9662c8c63cfa | apache/tvm | /tests/cpp/dataflow_pattern_test.cc | C++ | cc | 6,107 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
384c3de829570231d1557a929506951bfa8351e0 | e3a2f0cb3c8c4621c05837058b1055c573cbb19b | nerdooit/chromium | /ash/system/message_center/stacked_notification_bar.cc | C++ | cc | 19,948 | 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/system/message_center/stacked_notification_bar.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/strings/grit/ash_strings.h"
#inclu... |
36763e4af95e089eebdad25f79898c87301de6b5 | 3219559442afd0ef9b5f864152ba8aa598a2443d | EMIAOZANG/leetcode_questions | /155_min_stack/main.cpp | C++ | cpp | 590 | no_license | //Using double stack, easy
#include <stack>
using namespace std;
class MinStack {
public:
stack<int> mins;
stack<int> stk;
void push(int x) {
//update vector and top
stk.push(x);
//update min
if (mins.empty() || mins.top() > x){
mins.push(x);
}
e... |
a835a624729bb104508a84ad145e074e0f194507 | 175546110bc43754becfb83817d9e34a459d66b7 | aakashc31/Competitive-Programming | /SPOJ/guessing.cpp | C++ | cpp | 1,299 | no_license | #include <bits/stdc++.h>
using namespace std;
#define g(n) scanf("%d",&n)
// #define g(n) inp(n)
#define gl(n) scanf("%lld", &n)
#define f(i,n) for(int i=0; i<n; i++)
#define pb push_back
#define mp make_pair
#define fab(i,a,b) for(int i=a; i<=b; i++)
#define test(t) while(t--)
#define getcx getchar//_unlocked
typede... |
8414709845b665849d3208f251efb39fa1606b44 | f3b50fa8833aa42add24d33710d0f0b65a9a7bb2 | zzctommy/public-source-code | /码库/P1002 过河卒.cpp | C++ | cpp | 585 | no_license | #include<bits/stdc++.h>
using namespace std;
long long mmap[25][25],n,m,xx,yy,s[25][25];
int dx[9]={1,1,2,2,-1,-1,-2,-2};
int dy[9]={2,-2,1,-1,2,-2,1,-1};
bool ok(int x,int y)
{
if(x>n||x<1||y>m||y<1)return false;
return true;
}
int main()
{
scanf("%d%d%d%d",&n,&m,&xx,&yy);
n++;m++;xx++;yy++;
mmap[1][1]=1;
s[xx][... |
b16f699ce6ea1b1971e8dee16b9741b8b760aff7 | 0d17f058242fc1bc1feb9b49d682d8221056e165 | QuentinDPT/3D-Graphics-Engine | /3D Engine/main.cpp | C++ | cpp | 667 | no_license | #define SDL_MAIN_HANDLED
#include <iostream>
#include "Renderer3D.hpp"
#include "SDL_Window.hpp"
using namespace std;
void ddd(SDL_Renderer *render){
SDL_Rect rectangle={100,100,100,250};
SDL_SetRenderDrawColor(render,255,0,0,255);
SDL_RenderFillRect(render,&rectangle);
}
int main()
{/*
if(SDL_Init... |
9490a3db9776b7e90e1b8ae260144a136c0e8dfa | b654a4f606de3664a6779d11acf1017217b9868d | AlexanderV/MAP | /libs/opmapcontrol/src/mapwidget/waypointitem.cpp | C++ | cpp | 10,786 | no_license | /**
******************************************************************************
*
* @file waypointitem.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief A graphicsItem representing a WayPoint
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMap... |
2826ba58926f6b570d79614df48b710af0aaf030 | 767aed0d91c32d8d98c6654cbc2d79013a27720d | AXaViaN/PBR_demo | /AXengine/Core/Engine.cpp | C++ | cpp | 5,083 | no_license | #include "AXengine/Core/Engine.h"
#include "AXengine/Game.h"
#include "AXengine/Core/Window.h"
#include "AXengine/Entity/Quad.h"
#include "AXengine/Entity/Cubemap.h"
#include "AXengine/Gfx/Renderer.h"
#include "AXengine/Gfx/Renderer2D.h"
#include "AXengine/Gfx/TextRenderer.h"
#include "AXengine/Tool/Debug.h"
#include ... |
4f2e64f79d6d8a7edde94c59746836f16457b7df | 8ef27a4a4ee9e4f0b210eb04052fd4fe790a1059 | xpewster/OceanRender | /src/scene/camera.cpp | C++ | cpp | 2,409 | no_license | #include "camera.h"
#include "../ui/TraceUI.h"
#define PI 3.14159265359
#define SHOW(x) (cerr << #x << " = " << (x) << "\n")
using namespace std;
Camera::Camera()
{
aspectRatio = 1;
normalizedHeight = 1;
eye = glm::dvec3(0,0,0);
u = glm::dvec3( 1,0,0 );
v = glm::dvec3( 0,1,0 );
look = gl... |
6da8b3b3645328176956e32791649ba333d09d16 | 50afeb1db1ebb75d7c30ed86b722d4cb79b5a4b4 | iantuioti/ufora | /ufora/core/math/MersenneTwister.py.cpp | C++ | cpp | 1,999 | permissive | /***************************************************************************
Copyright 2015 Ufora 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/licen... |
8cded77510e70464c67e6564b6a73b327a30e6d8 | 47f528c87ca7f99967be85a539ef5b88f426c635 | GetSomefi/haslaamispaivakirja | /build/Android/Preview/app/src/main/jni/_root.fa_angle_double_down.cpp | C++ | cpp | 10,620 | no_license | // This file was generated based on '/Users/petervirtanen/OneDrive/Fuse projektit/Häsläämispäiväkirja/build/Android/Preview/cache/ux15/fa_angle_double_down.g.uno'.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.fa_angle_double_down.h>
#include <_root.MainView.h>
#include <Fuse.C... |
acb4720d1442a40a102233cc5d8c5466f4fedaa5 | ba231cec2d58281885c9f896dad322b7c8f5fb5b | PetrLiutik-selfstudy/otus_cpp_bulkmt | /test/test_main.cpp | C++ | cpp | 7,119 | no_license | #include "gtest/gtest.h"
#include "../inc/ver.h"
#include "../inc/CmdProcessor.h"
#include <vector>
#include <string>
#include <sstream>
TEST(ver_test_case, ver_major_test) {
EXPECT_GE(ver_major(), 1);
}
TEST(ver_test_case, ver_minor_test) {
EXPECT_GE(ver_minor(), 1);
}
TEST(ver_test_case, ver_patch_test) {
E... |
5b77633e6d8f12317f55fcdb3f9dafd3ca84b26c | 85705aeb5ddaee0fd2eb466f24f629276e131037 | qicosmos/hana | /include/boost/hana/basic_tuple.hpp | C++ | hpp | 8,769 | permissive | /*!
@file
Defines `boost::hana::basic_tuple`.
@copyright Louis Dionne 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_BASIC_TUPLE_HPP
#define BOOST_HANA_BASIC_TUPLE_HPP
#include <boost/hana/fwd/basic... |
5c0a5e190db075d6fa4bcf4e76f7262041ff3e1c | b51eed72b46e99c3a820627afef0c2f55ba4eafc | CAThanatos/sferes | /modules/evoneuro2/gen_evo_neuro.hpp | C++ | hpp | 416 | no_license | #ifndef GEN_EVO_NEURO_HPP_
#define GEN_EVO_NEURO_HPP_
#include <modules/nn2/gen_dnn.hpp>
namespace sferes
{
namespace gen
{
template<typename LabelNeuron, typename LabelConnection, typename Params>
class EvoNeuro : public Dnn<nn::Neuron<nn::Pf<>, nn::AfDirect<LabelNeuron> >,
nn::Connection<LabelConne... |
9fba218f10ef83a4dc471ddf81ed898b05a029a4 | 5f82bad3172a4c40bcc235c6852eb9284a949d34 | cocteautwins/SIRIUS-develop | /src/non_local_operator.cpp | C++ | cpp | 7,492 | permissive | // Copyright (c) 2013-2016 Anton Kozhevnikov, Thomas Schulthess
// 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 notic... |
850eea2d293c56e1fc6273a115d7728ba2de7f0d | a1e392c025b26481a67fb7cc981fb67406586f70 | Nirosha-1910/Nirosha-1910 | /prime3.cpp | C++ | cpp | 230 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i,flag=0;
cin>>n;
for(i=2;i<=sqrt(n);i++);
{
if(n%i==0)
flag=1;
}
if(flag==1)
cout<<"Its not a prime";
else
cout<<"Its a prime";
}
|
34a3fcc1a593d9ffe902887207a6f681f268b8b1 | 4ca7de14bfee6c35127559426fb91aad1dfa6898 | kmjp/procon | /atcoder/arc101-150/arc133/f.cpp | C++ | cpp | 3,441 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))... |
5773c64115527a3255ef12be597e834ba348e868 | 5d6fd91c3b3dc7b8b008b52c873619b84d3b0b61 | yanggihoon/new_ds_compact | /DeviceProtocol/CMX_Bundlelight.cpp | C++ | cpp | 17,124 | no_license |
#include "CMX_Bundlelight.h"
#include "../DeviceUart/CMX_UartRS485.h"
CMX_Bundlelight* CMX_Bundlelight::uniqueInstance = NULL;
CMX_Bundlelight* CMX_Bundlelight::GetInstance()
{
if( uniqueInstance == NULL) {
uniqueInstance = new CMX_Bundlelight();
}
return uniqueInstance;
}
CMX_Bundlelight::CMX_Bundleligh... |
de1fa27817f1ccbf5ed013de151440dd460e8ace | e0b24b2ef754c05a3494af736ec465177f9c14e3 | proteanx/BITCORN | /src/test/serialize_tests.cpp | C++ | cpp | 4,996 | permissive | // Copyright (c) 2012-2013 The Bitcoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "serialize.h"
#include "streams.h"
#include "hash.h"
#include "test/test_bitcorn.h"
#include <stdint.h>
#inclu... |
b749d00752bc5729e5d487758f323db6336cccb1 | c22d1015f1a3b428cc8499e4ba1cbe111f410284 | sogapalag/contest | /atcoder/agc017/e.cpp | C++ | cpp | 2,520 | no_license | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... |
837c48d719c46f0812f41227b7480ad68104a4b7 | 03e4f364974dff15ff0d4bdad91e68c29d5196b0 | edscott/dumux | /lswi-n/dumux/material/fluidmatrixinteractions/2p/modifiedbrookscorey/modifiedbrookscorey.hh | C++ | hh | 12,270 | no_license | // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* ... |
2203d5846df14b4ebebe920207a006dd77f1cb6d | 86d05a4d81614ce6469df14f1ef2f9f9514f44c0 | dl-frameworks/tensorrt-laboratory | /tensorrt-laboratory/tensorrt/src/execution_context.cc | C++ | cc | 5,211 | permissive | /* Copyright (c) 2018-2019, NVIDIA CORPORATION. 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 ... |
8bbe59b032f4f7f57e93109167b29e66c6a0b060 | bd2916760b948db3e54e1139eb567bac14ac07c4 | thekannman/z_sfg | /include/z_atom_group.hpp | C++ | hpp | 7,231 | permissive | //Copyright (c) 2015 Zachary Kann
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distr... |
978c10540c603bc58fa7c4b6f21c3082585c001e | d1718eedb964a85ae5c1d67adacacdb8cbef1b21 | TrevorShelton/cplot | /Engine/Functions/fractals.cc | C++ | cc | 441 | permissive | #include "Functions.h"
#define M 150 /* iteration limit */
using std::log;
const static double scale = 1.0/log(1.0+M);
void mandel(const cnum &c, cnum &ret)
{
cnum z = c;
int i = 0;
do{ z *= z; z += c; }while (++i < M && absq(z) < 4.0);
ret = log(i) * scale;
}
void julia(const cnum &z0, const cnum &c, cnum... |
59fde6bb0763dcea80d18cde24fedde19d2d6047 | e321e92cb1287091dfdf1ab908a6cb9a26fbc095 | meesokim/spc1000 | /mame/src/mame/samsung/spc1000.cpp | C++ | cpp | 23,919 | no_license | // license:BSD-3-Clause
// copyright-holders:Miodrag Milanovic, Robbbert
/***************************************************************************
Samsung SPC-1000 driver by Miodrag Milanovic
This was the first computer from Samsung. It featured a cassette player
embedded in the righthand side of the keyboard.
200... |
8402d290359a4f34ba157b2ed4d421cb54867897 | 0fbca269a6402f3fd1fd94e612830085972e392a | jsuwo/cs3307a | /lectures/behavioural_design_patterns/2-observer/Subject.cpp | C++ | cpp | 558 | no_license | #include <algorithm>;
#include "Subject.h"
using std::find;
using std::vector;
void Subject::attach(Observer* o)
{
if (find(_observers.begin(), _observers.end(), o) == _observers.end())
this->_observers.push_back(o);
}
void Subject::detach(Observer* o)
{
vector<Observer*>::iterator it;
it = find(_observer... |
3856829c7677d53261ed903f5cbbd47ed438e8f5 | 5b930b2720218bd69478d0f69cbebc5b80c2448a | ggondols/TeamOfEalryAccess | /Darkness of Planet/Darkness of Planet/Darkness of Planet/cSprayMesh.cpp | C++ | cpp | 6,352 | no_license | #include "stdafx.h"
#include "cSprayMesh.h"
#include <fstream>
#include <sstream>
#include "cModel.h"
#include "cRayCaster.h"
#include "iMap.h"
#include "cHeightMap.h"
void cSprayMesh::EntryModel(cModel* pMesh)
{
m_pModelList.push_back(pMesh);
}
void cSprayMesh::EntryMesh(LPD3DXMESH pMesh)
{
m_pMeshList.push_back(... |
1626738f73961370f52dff7a7ef7111481db9a75 | d150f98a2a7bfce62dd8ae32dc388298339a9243 | niuxu18/logTracker-old | /second/download/git/gumtree/git_old_hunk_1306.cpp | C++ | cpp | 747 | no_license |
/* With no flags, we default to showing the cached files */
if (!(show_stage || show_deleted || show_others || show_unmerged ||
show_killed || show_modified || show_resolve_undo))
show_cached = 1;
prune_cache(max_prefix, max_prefix_len);
if (with_tree) {
/*
* Basic sanity check; show-stages and show... |
34c224d4f2dbc4990c5a5f13b5c1fdf687885d9a | 74d2fdf351e3b8251cb64fa283fa41ad5cb7c9d8 | leliaonvidia/Halide | /src/Pipeline.cpp | C++ | cpp | 47,486 | permissive | #include <algorithm>
#include "Pipeline.h"
#include "Argument.h"
#include "Func.h"
#include "IRVisitor.h"
#include "LLVM_Headers.h"
#include "LLVM_Output.h"
#include "Lower.h"
#include "Outputs.h"
#include "PrintLoopNest.h"
using namespace Halide::Internal;
namespace Halide {
using std::vector;
using std::string;
u... |
62e801c885bbdc72a8a5362b09e4cfc62038f504 | 095fcc06fc5b72713dff9ae3e47cd52690d8d0fd | sarvex/fbthrift | /thrift/lib/cpp2/protocol/DebugProtocol.cpp | C++ | cpp | 6,982 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... |
9ea51edf40b2a6205ff49b4db7e3171d78c94dba | ef11f2c94bea431e1fee3e79990e82c41d0be683 | YuanzhongLi/CompetitiveProgramming | /AtCoder/ABC/117/c.cpp | C++ | cpp | 650 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,s,n) for (int i = (int)s; i < (int)n; i++)
#define ll long long
#define pb push_back
#define All(x) x.begin(), x.end()
#define Range(x, i, j) x.begin() + i, x.begin() + j
const int INF = 1e9+7;
int main() {
int N, M;
cin >> N >> M;
vector<int> X(M);
... |
3fac8ec985467eda5397ba3080176e6a898f1f69 | b51bd3d3a5f5870cc63303d57aa504fea3c36810 | chadaustin/sphere | /sphere/source/editor/ScrollWindow.cpp | C++ | cpp | 4,866 | no_license | #include "ScrollWindow.hpp"
BEGIN_MESSAGE_MAP(CScrollWindow, CWnd)
ON_WM_HSCROLL()
ON_WM_VSCROLL()
END_MESSAGE_MAP()
////////////////////////////////////////////////////////////////////////////////
CScrollWindow::CScrollWindow()
: m_XRange(0)
, m_XPageSize(0)
, m_XPosition(0)
, m_YRange(0)
, m_YPageSize(0)
, m_YPos... |
c2021ad791b3a622a7aa10f742b69d934e4f607b | c33470f84fc95e6ede557a44d3ea6ec563c327ba | cjambou/eurobot2015-code | /murphy_pi/Mission_Zone_centrale.cpp | C++ | cpp | 1,669 | no_license | #include "Mission_Zone_centrale.h"
Mission_Zone_centrale::Mission_Zone_centrale(bool mission_a_faire_):
Mission(mission_a_faire_, 4, Coord(0,0,0),"mission zone centrale"),
couleur(0),
stand_central(false),
stand_estrade(false),
stand_depart(false),
rush_salace(false)
{
set_couleur(couleur);... |
9922c7204a335fddfb4d270fa01ef09e08b2b968 | ad7ff9bd33755d8cb69b93c7293e60933431d22b | bencord0/fizz | /fizz/client/State.cpp | C++ | cpp | 1,483 | permissive | /*
* Copyright (c) 2018-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 <fizz/client/State.h>
using fizz::client::ClientAuthType;
using fizz::client::StateEnum;
nam... |
6bab5f27901f7327b38e8f5e09742be430c3d435 | d8f1e205cf3bcbb6b9812903e07594ba11a7211c | SC2ISDAED/SimpleRayTracer | /SimpleRayTracer/vec3.cpp | C++ | cpp | 743 | no_license | #include "vec3.h"
vec3& vec3::operator+=(const vec3 &v2)
{
e[0] += v2[0];
e[1] += v2[1];
e[2] += v2[2];
return *this;
}
vec3& vec3::operator-=(const vec3 &v2)
{
e[0] -= v2[0];
e[1] -= v2[1];
e[2] -= v2[2];
return *this;
}
vec3& vec3::operator=(const vec3&vt)
{
e[0] = vt[0];
e[1] = vt[1];
e[2] = vt[2];
... |
19d800a8a68fa99fd7608ddb9b0e76d20d5297e8 | f45aa0f4db32aa0b316ee908f41f788cb68fa1b7 | StepVr/StepVrMocap | /Source/DataStreamCore/Private/StepMocapDefine.cpp | C++ | cpp | 2,554 | no_license | // Copyright (C) 2006-2017, IKinema Ltd. All rights reserved.
#include "StepMocapDefine.h"
#include "SocketSubsystem.h"
#include "IPAddress.h"
#include "Json.h"
DEFINE_LOG_CATEGORY(LogStepVrStreamer)
TArray<FString> StepFaceMorphTargets = {};
void StepMocapSpace::ShowMessage(const FString& Log)
{... |
0d5558abca1ac18034b591b75797f02decf7d184 | fc212cef9ad78ffca10c7f888599e615dc44d53f | xuelongqy/cnode | /nodejs-mobile/src/node_worker.cc | C++ | cc | 15,024 | permissive | #include "node_worker.h"
#include "debug_utils.h"
#include "node_errors.h"
#include "node_internals.h"
#include "node_buffer.h"
#include "node_perf.h"
#include "util.h"
#include "util-inl.h"
#include "async_wrap.h"
#include "async_wrap-inl.h"
#include <string>
using v8::ArrayBuffer;
using v8::Context;
using v8::Funct... |
17444b50cd887cf312d5325a5115ef429f59ea61 | fbd4e3aa48df33a260060c68d967fed16b80371d | annequeentina/OpendTect | /src/Algo/tests/bendpoints2coords.cc | C++ | cc | 1,965 | no_license | /*+
* (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
* AUTHOR : K. Tingdahl
* DATE : Dec 2007
-*/
#include "bendpoints2coords.h"
#include "positionlist.h"
#include "testprog.h"
#include "file.h"
#include "od_iostream.h"
#define mTest( testname, test ) \
if ( (test)==true ) \
{ ... |
5baba4f800b0b552b923f67a19e0e9b141ee884f | 3f4f59cc02d6fcc67890e58a984044e4350a0597 | pjsdream/rmp | /src/renderer/renderer_main.cpp | C++ | cpp | 645 | no_license | #include <rmp/renderer/renderer_window.h>
#include <QApplication>
int main(int argc, char** argv)
{
setbuf(stdin, NULL);
setbuf(stdout, NULL);
QApplication app(argc, argv);
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setSamples(4);
format.setVersion(4... |
05a3444ea51a36dc7ebc685b8cfff8442577a4e5 | d3026a9245933036dbe22ae26917f70e8976be93 | b2gdev/Android-JB-4.1.2 | /system/netd/oem_iptables_hook.cpp | C++ | cpp | 3,200 | no_license | /*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
4270655f3b9a86598208da74b9c1057b5cc14b9c | bb720a50f038ad02430ef14f0c278a71293f0681 | tomzhang/mldb | /builtin/matrix.cc | C++ | cc | 18,700 | permissive | // This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
/** matrix.cc
Jeremy Barnes, 5 January 2015
Copyright (c) 2015 mldb.ai inc. All rights reserved.
*/
#include "mldb/builtin/matrix.h"
#include "mldb/types/basic_value_descriptions.h"
#include "mldb/base/parallel.h"
#include "mldb/... |
448d98e20641e76c93ddaff5484449588787ea8b | 5c9c1e3f11c6f2253680ecfdab72471e54be269a | NobuoTsukamoto/tensorflow | /tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/legalize_control_flow.cc | C++ | cc | 9,059 | permissive | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
e00e32b978424924570df22c61544682c4cd836e | 4f26b618596662b91f8bb3a598d52d5af3787ee8 | wangzhi01/deeplearning-1 | /tensorflow/tensorflow/compiler/xla/tests/params_test.cc | C++ | cc | 16,796 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... |
8e9817e5e421c8c49d5e9276a1e3c4fdd9bac6fa | 8c2903cd44eb3548c1e8452b7d8eeadc06d4fb2b | awarrior/Message-Interactive-Platform | /MIP_VS/SMSIPlatform/DblClick.cpp | C++ | cpp | 4,086 | no_license | // DblClick.cpp : 实现文件
//
#include "stdafx.h"
#include "SMSIPlatform.h"
#include "DblClick.h"
#include "ColorListCtrl.h"
// 全局变量
extern CColorListCtrl g_List;
extern _RecordsetPtr g_pRecordset1;
extern SOCKET g_Socket;
// CDblClick 对话框
IMPLEMENT_DYNAMIC(CDblClick, CDialog)
CDblClick::CDblClick(CWnd* pParent /*=NUL... |
7d4acafab7a0c0a23075218ee1ea71c99a62ca91 | 682622106907b4d822b5ae318d2c8107e9210735 | Zer0code/LoLUpdater | /LoLUpdater/LoLUpdater.cpp | C++ | cpp | 10,626 | no_license | // Custom patch for LoL
#include <sstream>
#include <fstream>
#include <vector>
#include <memory>
#include <Shlwapi.h>
#include <direct.h>
#include <Shlobj.h>
#include <wininet.h>
bool done = false;
wchar_t* cwd(_wgetcwd(nullptr, 0));
wchar_t unblocker1[MAX_PATH + 1] = L"";
wchar_t* unblocker = unblocker1;
void unblock... |
e099e4535cc5ffd59b0c4f1989a678112087fb18 | d9f037c27178fa57666c40c3ab237a7639b41384 | lycanthia/Firmware | /src/modules/sensors/sensors.cpp | C++ | cpp | 48,107 | no_license | /****************************************************************************
*
* Copyright (C) 2012 PX4 Development Team. All rights reserved.
* Author: Lorenz Meier <lm@inf.ethz.ch>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the followi... |
ac4c71ccbe9ec406d4ffadd0daf10b02cc1f5d73 | 2eff838ba1cc1eb1d427c696ea03401112079e28 | querat/EnttPong | /EnttPong/src/components/PositionComponent.hpp | C++ | hpp | 824 | permissive | ///
/// PositionComponent.hpp
/// EnttPong
///
/// MIT LICENSE.
/// Refer to LICENSE.txt for more details.
///
#ifndef ENTTPONG_POSITIONCOMPONENT_HPP_
#define ENTTPONG_POSITIONCOMPONENT_HPP_
namespace ep
{
///
/// A component that describes the position of something on the screen.
///
class PositionComponent fina... |
b712ae808709da8c35e3f7190c9b5b91679b1cc8 | a6b122908a8bc0b943f5a8b3c16fb88908925836 | shuiwenqingtian/soulshengtraincpp | /code/lesson02/lesson02.cpp | C++ | cpp | 721 | no_license | // lesson02.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
struct Point
{
float a,b;
};
void add(Point &p, Point l)
{
p.a = p.a + l.a;
p.b = p.b + l.b;
}
int main(int argc, char* argv[])
{
Point p[3], l;
p[0].a = 0;
p[0].b = 1;
p[1].a = -1;
p[1].b = -1;
p[2].a = 2;
p[... |
da5ef75a3d22133cb85294948fdec6ed85d0192a | c346fd89ba766cd690c89ca3dc9dce91d09577e2 | ludgerpaehler/Enzyme | /enzyme/Enzyme/CApi.cpp | C++ | cpp | 12,147 | permissive | //===- CApi.cpp - Enzyme API exported to C for external use -----------===//
//
// Enzyme Project
//
// Part of the Enzyme 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 LLV... |
983d72f06b7f24d047502da593ff6df83e65ed1a | f8bb474f50a8e0a87748fc215079acc8320b710c | Exilit/MySensController | /MessageParser.cpp | C++ | cpp | 763 | no_license | #include "MessageParser.h"
#include <QRegularExpression>
#include <QDebug>
MessageParser::MessageParser()
{
}
Message MessageParser::parseMessage(const QString &data)
{
Message msg;
QRegularExpression regex("(\\d+);(\\d+);(\\d+);(\\d+);(\\d+);([^\\n]*)\\n");
QRegularExpressionMatch match = regex.match(d... |
92fe1cd8d2ecd1fc6c67e55878467c15ece46813 | 01f8e8a5ca2cc02bd9f312141f733365af577ceb | aninda052/Computative_Programming- | /UVA/uva11151.cpp | C++ | cpp | 757 | no_license | #include<bits/stdc++.h>
#define mx 20005
using namespace std;
int dp[1005][1005];
string arr;
int sol(int x ,int y){
if(x>y)return 0;
if(x==y)return 1;
if(dp[x][y]!=-1)return dp[x][y];
if(arr[x]==arr[y])dp[x][y]=sol(x+1,y-1)+2;
else{
dp[x][y]=max(sol(x+1,y),sol(x,y-1));
... |
29d36f8d38eff672a57ef480f4b499278d8fc4cf | 5efd8a649099be1b4ad418108476c25f8e9d0352 | Benours/GolfMath | /Qt_Test_Graphique/testoc/main.cpp | C++ | cpp | 2,539 | no_license | #include <QApplication>
#include <QApplicationStateChangeEvent>
#include <QPushButton>
#include <QBoxLayout>
#include <QLabel>
#include <QImage>
#include <QPixmap>
#include "mafenetre.h"
#include <iostream>
#include <fstream>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget fenetre;
... |
edaae19d800cdf4a7977d2df9980420abb1d40d2 | 891611d90175c80bed5e34c2694238abae71422a | Nezz7/Competitive-programming | /GYM/2019-2020 SEERC 2019/G.cpp | C++ | cpp | 2,681 | no_license | #include <bits/stdc++.h>
#define endl '\n'
#define LL long long
#define LD long double
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define debug(x) cerr << #x << " is " << x << endl;
using namespace std;
int const MAXN = 100 + 9;
char ... |
84f4badabbdb4a83c9123f740097637ff5a84d18 | d2a01fcc458be3fad99fe1646839af13b5b83181 | q4a/navidia_proj | /src/examples/directx/Glow/GlowProfiles.cpp | C++ | cpp | 6,292 | no_license | /*--------------------------------------------------------------------- NVMH5 -|----------------------
Path: SDK\DEMOS\Direct3D9\src\Glow\
File: GlowProfiles.cpp
Copyright NVIDIA Corporation 2003
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND
AND ITS SUPPLIERS DIS... |
eb45dcb4e56ba2cd2f016b2c40df112f5fde6ef5 | b5d0ffa7851acd75b72a91a8878b0717ea7c7626 | MySzc/Sterowanie-Procesami-Dyskretnymi | /NehAlgorithm/NehAlgorithm/Task.cpp | C++ | cpp | 602 | no_license | #include "Task.h"
Task::Task(int index)
{
this->index = index;
this->sumTime = 0;
}
Task::Task()
{
this->index = 0;
this->sumTime = 0;
}
void Task::AddJobTime(int jobIndex, int time)
{
this->jobsTimes[jobIndex] = time;
}
int Task::CalculateSumTime(int amountOfMachines)
{
for (int i = 0; i < amountOfMachines; ... |
754365085ef6f08675facb494674a47c83277516 | 390de8beb9a4e5236750b267d6208a5b9fd06634 | joker-eph/llvm-unified | /polly/lib/CodeGen/IRBuilder.cpp | C++ | cpp | 4,961 | permissive | //===------ PollyIRBuilder.cpp --------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
67609454dd46900adca30b48abb9f255b3bfd84f | ca96fb98f21bb2a88d1b8b9f487568a5fb67fd2f | kohn1001/competitive | /src/w_1.cpp | C++ | cpp | 1,780 | no_license | //
//
// Created by Nathaniel Kohn on 11 M 2017.
// Copyright © 2017 Nathaniel Kohn. All rights reserved.
//
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <sstream>
#include <memory>
#include <algorithm>
#include <memory>
#include <io... |
929645486f49d982a27b1c754694c8ebd49abf8c | 59840d1b9666a594610304b5923aba252c6dbbe7 | MDNoorUddin/UVA-Solutions | /12854.cpp | C++ | cpp | 790 | no_license | #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<string>
#include<list>
using namespace std;
#define ll long long
#define input scanf
#define output printf
#define Loop while
#define echo... |
feeb39b266393b388ece566c0a5bcb3789310a0b | bcc74384ea36b72d70128eb716483dd9110e1975 | novasfronteiras/lpmt | /src/timeline/ofxTLColorTrack.cpp | C++ | cpp | 15,383 | no_license | /**
* ofxTimeline
* openFrameworks graphical timeline addon
*
* Copyright (c) 2011-2012 James George
* Development Supported by YCAM InterLab http://interlab.ycam.jp/en/
* http://jamesgeorge.org + http://flightphase.com
* http://github.com/obviousjim + http://github.com/flightphase
*
* Permission is hereby gra... |
ad9f5e606096b94af579229f88e4a3af9cfde4c9 | 65808bf61d219203940fe9651d72950ef2ec0abf | rovinbhandari/Programming_Scripting | /ACM-ICPC/ACM-ICPC_12/Amritapuri/online contest/ACM-ICPC Amritapuri 2012 Online Competition Accepted Solutions/B/cpp/00005138_B_STICKS_amicpc120587.cpp | C++ | cpp | 3,961 | no_license | // Ideone_Language_Id:1
/* Don't remove the first line! */
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <math.h>
/*more #includes. Don't write "using namespace std" here*/
#ifdef __WIN32__
#define getchar_unlocked ... |
7d48fc1303d8f0ce35a680adbc8e5cd0ac580918 | a080b7b4192451e8a8967ab4d4e9cb161890e6eb | svn2github/open64 | /sim/fsim/SL1/sl1disasm.cpp | C++ | cpp | 35,068 | no_license | /*
* File: sl1disasm.cpp
*
* Copyright (c) 2006 Beijing SimpLight Nanoelectornics, Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1.Redistributions of source code must r... |
d79aef64e79a920a48f7d302f4d04e34276b8267 | 8697d676af3c1becd6e870f68018f15aa9c9b99f | SamuelFreydier/TimezoneManager | /ProjetHorloge/qmylcdnumber.cpp | C++ | cpp | 2,171 | no_license | #include "qmylcdnumber.h"
#include <qdebug.h>
#include <qtimezone.h>
QMyLCDNumber::QMyLCDNumber(QWidget *parent)
: QLCDNumber(parent)
{
this->setDigitCount(8); //Affichage de 8 digit => 00:00:00
m_timer = new QTimer(this); //Création du timer pour mettre à jour chaque seconde
m_sDate = QDateTime::currentD... |
58b92449834272f90d8e9309674ea7039fff03cc | 64ad6194fc31746d88b09b6846e15866afaccae5 | haozx1997/C | /ACM/2017-2-25 CCCC训练 1/D - L1 - 4.cpp | C++ | cpp | 749 | no_license | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<map>
#include<string>
#include<queue>
#include<math.h>
using namespace std;
int main()
{
int NN;
scanf("%d",&NN);
while(NN--)
{
int n,a,b;
scanf("%d%d%d",&n,&a,&b);
int m = 0;
i... |
b30d55e2b9cf04dddb8b61c16c96c4eab0e7b962 | cf6129ccc583be9663e3c9a03666ef5fcb710d03 | Scyllas/CSC3224 | /Graphics/Project1/Project1/Bullets.cpp | C++ | cpp | 819 | no_license | #include "Bullets.h"
#include <Engine\ResourceManager.h>
Bullets::Bullets(glm::vec2 pos, glm::vec2 dir, float speed, int lifeTime) :
m_lifeTime(lifeTime),
m_position(pos),
m_direction(dir),
m_speed(speed) {
}
Bullets::~Bullets()
{
}
void Bullets::draw(Engine::SpriteBatch & spriteBatch) {
glm::vec4 uv(0.f, 0.f, ... |
7793c7716af4f4d38c7613201b9aec84c7ac4f1c | b931f0fbfee080a61e2ba370723c556c868c64bf | romainfrancois/arrow | /cpp/src/parquet/encryption/file_key_wrapper.cc | C++ | cc | 4,872 | permissive | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
01ec943c059d217ebdab5f992a2c760fd335c3da | 396418317e25bfbab306954f50e568dcbca35b71 | veldrinlab/ayumiEngine | /AyumiEngine/AyumiEngine/AyumiSound/SoundInterface.cpp | C++ | cpp | 898 | no_license | /**
* File contains definition of SoundInterface class.
* @file SoundInterface.cpp
* @author Szymon "Veldrin" Jabłoński
* @date 2011-08-27
*/
#include "SoundInterface.hpp"
using namespace std;
namespace AyumiEngine
{
namespace AyumiSound
{
/**
* Method is used to increase sound volume.
*/
voi... |
749073a6bc3f83b09ca3b9317608f6d4545b56d7 | 842be3eb2784f506e4fe46cff55ccd9c1889f0c6 | WhiteLilith/II-sem | /10/10.cpp | C++ | cpp | 1,505 | no_license | #include "stdafx.h"
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <string>
#include <cmath>
using namespace std;
struct link
{
int data;
link* next;
};
class linklist
{
private:
link* first;
public:
linklist()
{
first = NULL;
}
linklist(const linklist &ls)
{
if (ls.first == NULL)
{... |
4421f0ed4616f746e3afca61b04a18e6d9f9411f | d215d4b4d4fe37734821f7592ef4c6b727665787 | SuperVivian/computer_graphics_assignments | /A6/Matrix3f.cpp | C++ | cpp | 7,698 | no_license | #include"stdafx.h"
#include "Matrix3f.h"
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
Matrix3f::Matrix3f( float fill )
{
for( int i = 0; i < 9; ++i )
{
m_elements[ i ] = fill;
}
}
Matrix3f::Matrix3f( float m00, float m01, float m02,
float m10, float m11, float m12,
f... |
02581582ccfcebc9c2e7145990eb7de4e4672c95 | df43c03ae4d9879e7cf67cecb7c7bf3849ed5eef | xaeroyuan/stm32-cmake | /examples/freertos/main.cpp | C++ | cpp | 1,607 | permissive | #include "main.h"
#include <FreeRTOS.h>
#include <task.h>
#include <timers.h>
#if defined STM32H7
#include <stm32h7xx_hal.h>
// STM32H743ZI blue LED
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_7
#define LED_PORT_CLK_ENABLE __HAL_RCC_GPIOB_CLK_ENABLE
#elif def... |
1e1e8b1f230b4fb0c51429f81e0eabab9dfee493 | 9e5b26dc4d24b89b86fadd41ada63c8573c88ebc | Jenn-y/Patterns | /ex4.cpp | C++ | cpp | 700 | no_license | #include <iostream>
#include <iomanip>
using namespace std;
void drawShape (int a, int b){
/* Example (1, 5):
1
12
123
1234
12345
*/
for (int i = a; i <= b; i++){
for (int j = i; j <= b - 1; j++) cout << " ";
for (int j = a; j <= i; j++) cout << setw... |
b4d91f57ac8278cc1b93ff2876a918ef4633e462 | b909c7c6335384b3621098ec75c849d34ff26deb | playontheice2015/PathFinder | /PathFinder/Main.cpp | C++ | cpp | 2,189 | no_license | #include <iostream>
#include <iomanip>
#include "Board.h"
#include "APathFinder.h"
//For test purpose 9x9 map with some walls
//pathfinder will first draw plain map than if path is found
//it will draw on screen and return required results
int main() {
#pragma region Test_Map4x5
//unsigned char pMap[] = {
// 1, 1, 1... |
c44809c069287dfd7faaff65561a3b7c2264a0b0 | 948240d38ac74764d4d01421bcd5ade3c063f7b8 | Haonan-Hu/Hu_Lab5 | /HashTable.cpp | C++ | cpp | 2,641 | no_license | /*
Author: Haonan Hu
File: Executive.h
Date:2/15/2020
Brief:File is header file
*/
#include "HashTable.h"
#include <stdlib.h>
#include <math.h>
HashTable::HashTable()
{
m_Quadratic = new int[m];
m_DoubleHashing = new int[m];
for(int i = 0; i < m; i++)
{
m_Quadratic[i] = 0;
m_DoubleHashing[i] = 0;
}
}... |
b8bb6278c348a0599c41c80e0203477e41ac0cb0 | a76dd3fcf26e4b448f64484d960941242b47d550 | NuLL3rr0r/tse-rtsq | /CoreLib/Mail.cpp | C++ | cpp | 9,887 | permissive | /**
* @file
* @author Mohammad S. Babaei <info@babaei.net>
* @version 0.1.0
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2016 Mohammad S. Babaei
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softw... |
a016cf6004329b927edcfadd29cf50b9ff7a3ae7 | 9d3c2a6dddc80996f21ad0e2461eb3f951d8bcb0 | ncm/sortfast | /sorts.cc | C++ | cc | 4,769 | no_license | #include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <algorithm>
#include <vector>
#include <cstring>
#include <cassert>
#include <inttypes.h>
#if defined(NONE)
inline bool swap_if(bool c, int&, int&) { return c; }
#elif defined(STD)
# define SORT std::sort
# define TYPE int... |
df19a58e8333c8d45253418104e09ba4f0a694ab | d2f10c7db2e4ef9abfb06313412031f0fe16525a | goofoo/Helium | /Core/Asset/Tracker/CacheDB.cpp | C++ | cpp | 48,173 | no_license | #include "Platform/Windows/Windows.h"
#include "CacheDBColumn.h"
#include "CacheDB.h"
#include "Pipeline/Asset/AssetClass.h"
#include "Pipeline/Asset/AssetInit.h"
#include "Pipeline/Asset/AssetFile.h"
#include "Pipeline/Asset/AssetFolder.h"
#include "Pipeline/Asset/Classes/EntityAsset.h"
#include "Pipeline/Asset/Clas... |
8854ed122bf5b1b115d947d96abdc60397a7bf42 | d38fae36fe42ca8f1730bbd63632dd54bfd24b01 | NelsonGomesNeto/Operations-Research | /ExampleProblems/KnapsackProblem/knapsackProblem.cpp | C++ | cpp | 1,181 | no_license | #include <stdio.h>
#include <ilcplex/ilocplex.h>
using namespace std;
struct Item { int value, weight; };
int main()
{
IloEnv env;
IloModel knapsackProblem(env, "Knapsack Problem");
IloCplex cplex(knapsackProblem);
// Statement Data:
int n, weight; scanf("%d %d", &n, &weight);
Item items[n];
for ... |
baa6330eac334383822b175192156156e1bf4f13 | bad41c4110d6d8dafdb062ad6d9d69073754deef | 201816040116/Assignment_03 | /201816040102/Invoice.cpp | C++ | cpp | 1,158 | no_license | #include <iostream>
#include <string>
using namespace std;
#include "Invoice.h"
Invoice::Invoice(string Id,string Discrip,int Number,int Price)
{
setId(Id);
setDiscrip(Discrip);
setNumber(Number);
setPrice(Price);
}
void Invoice::setId(string id)
{
Id=id;
}
string Invoice::getId()
{
return Id;
}
void Invoice::s... |
418ddeeaaab8c4aa50a2a07afe07f04430e69b7b | 606c6f9dd3270d1048e9020a4773b76876178813 | orirothschild/C-projects | /cpp/bitset/bitset_test.cpp | C++ | cpp | 11,116 | no_license |
#include "bitset.hpp" /* API */
#include "./../utils.hpp" /* utils */
using namespace ilrd;
int TESTBitSet_Build1Long();
int TESTBitSet_Build3Longs();
int TESTBitSet_SetBitsAndCompare1LongTRUE();
int TESTBitSet_SetBitsAndCompare1LongFALSE();
int TESTBitSet_SetBitsAndCompare3LongTRUE();
int TESTBitSet_SetBit... |
36505fcddfcae8e3171142722aab2b59f1f5999e | 171771bf8c5dba593936227725370d290940aa1b | XinJiangQingMang/fight | /my_client/3DRole/Network/MsgLogin.cpp | C++ | cpp | 1,869 | no_license |
//**********************************************************
// ´úÂë±à¼Æ÷
//**********************************************************
// MsgLogin.cpp: implementation of the CMsgLogin class.
//
//////////////////////////////////////////////////////////////////////
#include "AllMsg.h"
/////////////////////... |
3ddf80e7f964ad8b2639153eca77a038a4d982ff | 3ee1bab8229d9551d55d8635c2555209c51196a0 | dkurt/opencv | /modules/videoio/src/videoio_registry.cpp | C++ | cpp | 14,224 | permissive | // This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "precomp.hpp"
#include "videoio_registry.hpp"
#include "opencv2/videoio/registry.hpp"
#include "cap_librealsense.... |
b8e89adfcc7ae629e98f5eca4e22d856ed13882e | 2bfc3f426039be2d53d3a6d501c45f952fb725da | Skavesen/Turing-Machine-2 | /Thread1.cpp | C++ | cpp | 12,040 | no_license | // ---------------------------------------------------------------------------
#include <System.hpp>
#pragma hdrstop
#include <ctime>
#include <iostream>
#include <fstream>
#include <vector>
#include "Thread1.h"
#include "Unit1.h"
#pragma package(smart_init)
using namespace std;
// ----------------------... |
90581f970b2742d5371744767c64376068cb30b3 | 2a10a1a6990d5a49da76fe90544d0f548e7e74c6 | morsalin80/algo_DS | /UVA/uva 10963.cpp | C++ | cpp | 483 | no_license | #include<iostream>
using namespace std;
int main()
{
int test,n,y1,y2,dis,result;
cin>>test;
while(test--)
{
cin>>n;
cin>> y1>> y2;
dis= y1-y2;
result=0;
for(int i=1;i<n;i++)
{
cin>>y1>>y2;
if(dis!=y1-y2)
result=1;
... |
f4ecad4e10a9d0a41adcaeec121959fd57bbf846 | 6a10b0c3cfb2f8b2eeeb2936327e6428c5cb0315 | show0925/idlcpp | /idlcpp/src/TypeAliasNode.cpp | C++ | cpp | 1,646 | permissive | #include "TypeAliasNode.h"
#include "TypeNameNode.h"
#include "SourceFile.h"
#include "RaiseError.h"
#include <assert.h>
TypeAliasNode::TypeAliasNode(IdentifyNode* name, TypeCategory typeCategory)
{
m_nodeType = snt_type_alias;
m_keyword = 0;
m_name = name;
m_typeName = 0;
m_typeCategory = typeCategory;
}
TypeA... |
5f1ae4ef219e8f0ddb019d0f4abc5de4414884e8 | 26d0f6f437b68efb147a3967f1908742a2ca62fe | abougadibou/clinton-source | /src/qt/addresstablemodel.cpp | C++ | cpp | 12,857 | permissive | #include "addresstablemodel.h"
#include "guiutil.h"
#include "walletmodel.h"
#include "wallet.h"
#include "base58.h"
#include <QFont>
const QString AddressTableModel::Send = "S";
const QString AddressTableModel::Receive = "R";
struct AddressTableEntry
{
enum Type {
Sending,
Receiving
};
... |
1444521310bd7a30a1ddd6997fb870c8fc5af56e | 7dda828c942ce382c586654cf0d3924daf940ec0 | arthurherbout/crypto_code_detection | /data/code-jam/files/32016_sail4dream_24483_0_extracted_number.cpp | C++ | cpp | 562 | no_license | // number.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <cmath>
#include <iostream>
using namespace std;
char* num[31]={
"","","027","143","751","935","607","903","991","335","047","943","471","055","447","463","991","095","607","263","151","855","527","743","351",... |
e33abf8badbc94f183eb98a55a940b9941451243 | 3a0558fa4d85cbf0daedf5765090df26bca1279a | ChenZewei/kunlun | /src/common/msg_looper.cpp | C++ | cpp | 1,305 | no_license | #include <stdio.h>
#include <unistd.h>
#include "log.h"
#include "msg_queue.h"
#include "msg_parser.h"
#include "msg_looper.h"
#include "common_protocol.h"
CMsgLooper::CMsgLooper(CMsgQueue *pmsg_queue, \
CMsgParser *pmsg_parser) : m_pmsg_queue(pmsg_queue), \
m_pmsg_parser(pmsg_parser), m_stop_flag(false)
... |
848df0322dae27aab5d619647b597d36a3af58e0 | 3c4b12f052de033e79c563a9685ac2f965dcccfc | gauravk268/Competitive_Coding | /Project_Euler/Multiples_of_3_and_5.cpp | C++ | cpp | 708 | no_license | // https://projecteuler.net/problem=1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FoR(i, a) for(int i=0; i<a; i++)
#define FOR(i, a, b) for(int i=a; i<b; i++)
#define MEM(a, b, n) memset(a, b, sizeof(a[0])*n)
#define pb push_back
#define endl "\n"
const int MOD = 1e9+7;
const int SIZE_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.