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 |
|---|---|---|---|---|---|---|---|---|
7383cdd93b0228f03e7fcb1909635e9b7729ddb7 | 8f9246c9e37346bd3cb778785db1cbd53940f22f | sarahmarshy/Git_Repo_mHealth | /mbed-client/test/mbedclient/utest/m2mdevice/test_m2mdevice.cpp | C++ | cpp | 28,229 | permissive | /*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* 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... |
687fa4857e46c96adad44e63f500672ce01b7300 | c8f77fe56f73c5498627f216a69e20f8505de7be | Gohan/aws-sdk-cpp | /aws-cpp-sdk-elasticloadbalancingv2/source/model/Tag.cpp | C++ | cpp | 2,433 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
01ef61268f97f0569eee755499299f60ef5c595a | a074b9535755fd05229a887fee05c46bd42a2eed | ccdxc/logSurvey | /data/crawl/git/new_hunk_7730.cpp | C++ | cpp | 551 | no_license |
strbuf_release(&sb);
if (no_edit) {
struct rev_info rev;
unsigned char sha1[40];
fclose(fp);
if (!active_nr && read_cache() < 0)
die("Cannot read index");
if (get_sha1("HEAD", sha1) != 0)
return !!active_nr;
init_revisions(&rev, "");
rev.abbrev = 0;
setup_revisions(0, NULL, &rev, "HEAD");
... |
8399a2d412fb63aac2a14bde993a56589ed562fd | 6fb72260893716868c107f587ee71e658d2aaa92 | bion719/hifi | /libraries/graphics/src/graphics/Skybox.cpp | C++ | cpp | 3,807 | permissive | //
// Skybox.cpp
// libraries/graphics/src/graphics
//
// Created by Sam Gateau on 5/4/2015.
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Skybox.h"
#include <gpu... |
74e7b08afd0b7d6237eb6c0977974212dbd79815 | 95cd12127972f0c5a3e9968ac4782090eac75de2 | shem-sergey/bsu_fpmi_lab_shem_s | /19 - Games with double/one_cycle_summing/one_cycle_summing/one_cycle_summing/main.cpp | C++ | cpp | 995 | no_license | #include <iostream>
using namespace std;
int main()
{
int n;
double x;
cout << "Enter n:\n";
cin >> n;
cout << "Enter x:\n";
cin >> x;
double s = 0;
int minus_one = 1, factorial = 1, multiplier;
double x_in_power = 1;
_asm
{
mov ecx, 1 //COUNTS BY M
finit
cyc:
mov eax, n
inc eax
sub eax, ecx // e... |
81e779f1532f5654cf04ce2c3d56c77b0c7b4489 | 4da2bc20b2064bfc209f9b35fc1ec07c141ee555 | lonkamikaze/powerdxx | /src/sys/env.hpp | C++ | hpp | 3,184 | permissive | /**
* Implements zero-cost abstractions for the getenv(3) facilities.
*
* @file
*/
#ifndef _POWERDXX_SYS_ENV_HPP_
#define _POWERDXX_SYS_ENV_HPP_
#include "error.hpp" /* sys::sc_error */
#include <cstdlib> /* getenv(), setenv() etc. */
namespace sys {
/**
* Provides wrappers around the getenv() family ... |
b5bd460c81078e28f96724278649c0dc63611ac4 | 8695e2e3b0b49c61bfe2ad74b9046a2d6cc1ef6a | jingtongli/IPA | /MeshUtil/MeshSimplify.cpp | C++ | cpp | 1,027 | no_license | #include "MeshSimplify.h"
#include <iostream>
namespace MeshSimplify
{
void simplifyQuadric(MyMesh &mesh, float maxerror)
{
Decimater dec(mesh);
HModQuadric hModQuadric;
dec.add(hModQuadric);
dec.module(hModQuadric).set_max_err(maxerror);
dec.module(hModQuadric).set_binary(false);
bool... |
077472b9f6c3793bd6a6a89adc09ada836190515 | ea68295519f5f616e9e2ce28efe7df07e834a316 | ramonrodmor/jogo-mario | /Mario/Mario/Animation.cpp | C++ | cpp | 3,658 | no_license | /**********************************************************************************
// Animation (Código Fonte)
//
// Criação: 28 Set 2011
// Atualização: 04 Jun 2014
// Compilador: Visual C++ 12
//
// Descrição: Classe para animar seqüências em folha de sprites
//
****************************************************... |
d01badbff25f04f3179ef5d10565b6db77fd6641 | 0c9c705776d659c7cb5824a113f963b94a9c9ffb | christy-jacob41/Phone-Book-Application | /phoneBook.cpp | C++ | cpp | 5,123 | no_license | //the phone book class keeps track of a phone book and allows you to insert, erase, and find an entry and allows you to get the size of the phone book and allows you to print the contents of the phone book
#include <vector>
#include <string>
#include <iostream>
#include <iomanip>
#include "phoneBook.h"
// d... |
bf95f2f8489f25b51f80193a59c1c47ce28e24e2 | 7e224fdecda5b9b1e68f71b8e7cc5c9b8d7a9b02 | ldXiao/lithium | /libraries/http_backend/http_backend/mhd.hh | C++ | hh | 8,286 | permissive | #pragma once
#include <fcntl.h>
#include <set>
#include <sys/stat.h>
#include <fstream>
#include <iostream>
#include <memory>
#include <microhttpd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <thread>
#include <unordered_map>
#if defined(__GNUC__) && defined(__MINGW32__)
#include <unistd.h>... |
55d76a20dd78b93db23b4ea38cea90bf69fdde37 | de159f26d16921e8bf387cf6ce072c41ea08b4b2 | chgogos/oop | /cpp_playground/ex095/namespaces.cpp | C++ | cpp | 477 | permissive | #include <iostream>
namespace cbv
{
void swap(int a, int b)
{
int temp = a;
a = b;
b = temp;
}
} // namespace cbv
namespace cbr
{
void swap(int &a, int &b)
{
int temp = a;
a = b;
b = temp;
}
} // namespace cbr
int main()
{
int x = 1, y = 2;
... |
e8b9228393dd56cf736c742ed87d00474367fd30 | b1a461f5d28c621f9c3b6ef23eec57d7001ae3a7 | risooonho/02_battleTank | /BattleTank/Intermediate/Build/Win64/UE4Editor/Inc/BattleTank/TankMovementComponent.gen.cpp | C++ | cpp | 13,906 | no_license | // Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
==============================================================... |
2db2188bb68f6e7469ad067d7fed08c0deb4f3f3 | 9bcfe5f16b55d6e11e1f5f616efef4c19dad70a4 | abergmeier/of | /libs/openFrameworks/video/EMVideoPlayer.cpp | C++ | cpp | 937 | permissive | #include "EMVideoPlayer.hpp"
using namespace of::video::emscripten;
bool
VideoPlayer::loadMovie( string name ) {
return false;
}
void
VideoPlayer::close() {
}
void
VideoPlayer::update() {
}
void
VideoPlayer::play() {
}
void
VideoPlayer::stop() {
}
bool
VideoPlayer::isFrameNew() {
return false;
}
unsigned char... |
3a2331ba718174884a5abef7dccb24b8cd8d482b | a9486447e0db4b0237d8695580311383acf98f59 | feraligatr/snes9xgx | /tags/2.0.1b8/source/ngc/s9xsupport.cpp | C++ | cpp | 10,884 | no_license | /****************************************************************************
* Snes9x 1.50
*
* Nintendo Gamecube Port
* softdev July 2006
* crunchy2 May 2007
*
* s9xsupport.cpp
*
* This file contains the supporting functions defined in porting.html, with
* others taken from unix/x11.cpp and unix/unix.cpp
**... |
d357a6ca8340a278d9f90ad6a641c9706bbe964d | 5f1e0f9efa0b36aeaa3fe6d51b1b1ef0eada964d | pkryloff/FASM | /microproject2/main.cpp | C++ | cpp | 3,654 | no_license | #include <semaphore.h>
#include <chrono>
#include <fstream>
#include <memory>
#include <mutex>
#include <queue>
#include <random>
#include <string>
#include <thread>
#include <vector>
// Когда начинаешь называть переменные кириллицой, очень сложно остановиться.
constexpr int количествоПеренаправителей = 2;
struct Па... |
13df8e3a7f9fc45ac8d1f6e7feafb47c26e5d973 | fad483b372586e7a18512f1bea7c44018a2c3246 | mayankamencherla/cracking-the-coding-interview-solutions | /trees-and-graphs/validate-bst.cpp | C++ | cpp | 2,785 | permissive | #include "binary-search-tree.cpp"
#include <vector>
#include <iostream>
#include <list>
using namespace std;
/**
* Write an algorithm to check if a binary tree is a binary search tree
*
* @see binary-search-tree.cpp
*/
/**
* Creates a tree of minimal height
*
* @param BinarySearchTree& bst
* @param vectorint... |
b3ffea01406aed801b0cafd54dc281b2febe836b | dfaa8c78fee075d19f169d21fcf3777c6a6b482a | curtkim/c-first | /imgui-first/21_moduled_ui.cpp | C++ | cpp | 5,440 | no_license | #pragma once
#include <iostream>
#include <imgui.h>
#include "bindings/imgui_impl_glfw.h"
#include "bindings/imgui_impl_opengl3.h"
#include <GLFW/glfw3.h>
struct OurState {
bool show_demo_window = false;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
float ... |
09c5a8367e7c775429939747c72d13bcd591e17c | 9bd0a0f769e72820c811f2e7740f45e6fd69bb3a | JefGrailet/treenet | /v3/Architect/src/treenet/graph/L2Device.cpp | C++ | cpp | 745 | no_license | /*
* L2Device.cpp
*
* Created on: Dec 2, 2016
* Author: jefgrailet
*
* Implements the class defined in L2Device.h (see this file to learn further about the goals of
* such class).
*/
#include <sstream>
using std::stringstream;
#include "L2Device.h"
const string L2Device::STRING_PREFIX = "E";
L2Device... |
04b5635d2e38cfc0d1a77a7a94e987688a20806b | 93ae32a926430737a281ee09f5161065fe58c2f7 | shubham-theway/ConEmu | /src/ConEmu/SetPgSizePos.cpp | C++ | cpp | 8,332 | permissive |
/*
Copyright (c) 2016-2017 Maximus5
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 and the followin... |
bb067ac128baca91354fda9946c0abb611ee8825 | 6feb90913f3f4c940d583d404ee25ad8f77ba799 | ojasvishaklya/competitive | /1.Recursion/lec004/queen_combi_1D.cpp | C++ | cpp | 475 | no_license | #include <iostream>
#include <vector>
using namespace std;
int queen(vector<int> blocks, int q, int idx, string ans)
{
if(q==0)
{
cout<<ans<<endl;
return 1;
}
int count=0;
for(int i=idx;i<blocks.size();i++)
{
count += queen(blocks,q-1,i+1, ans + "Q"+to_string(i)+"B"+to_string(i)+"... |
064ed75e0843fe6ad30624c2d2c4ee635d277134 | a5bc4f01ecc2b41c6adff639f6d9cb2dc65c6afb | bmburkhardt/School | /CompSci1/Homeworks/Homework 6/Homework 6/HW6.cpp | C++ | cpp | 758 | no_license | //Bryan Burkhardt
//CS201
//Homework 6 - function that accepts an array and its size then copies that array and reverses the order of its indexes.
#include "HW6.h"
int * reverseArray(const int arry[], const int size)
{
int * revArray = new int[size]; //New pointer array with size of array being passed.
... |
bf4ff68ee65a4732b3a623aad4037bcfcbe818a5 | f87dbf0baf3f524bf11888edfaf164ba5085ecc3 | forsm054/Waypoint_Demo | /plexil-4/src/expr/Alias.cc | C++ | cc | 5,144 | no_license | /* Copyright (c) 2006-2014, Universities Space Research Association (USRA).
* 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
... |
899f500c413d757b5e1a4f4c974a6f8fa33f8e34 | dad5e975a8555f7dec48d660056d11ee35d8d1d4 | d333pav/Pizzas | /AbsPizza/Roast.cpp | C++ | cpp | 333 | no_license | #include <string>
class Roast_Light{
public:
virtual std::string ingredients() = 0;
std::string get_roast() {
return roast;
}
private:
std::string roast = "light";
};
class Roast_Default{
public:
virtual std::string ingredients() = 0;
std::string get_roast() {
return roast;
}
private:
std::string roast = ... |
621eecbd56f19bec796f0a3b4e4c27faff6a8103 | 78e96e82c423753f360062406f92d430a2896202 | AhmedAlaa10/As-Rigid-As-Possible | /arap/main.cpp | C++ | cpp | 9,137 | no_license | #include <igl/opengl/glfw/Viewer.h>
#include <igl/readOFF.h>
#include <chrono>
#include <igl/arap.h>
#include "VertexSelectionPlugin.h"
#include "ARAP_Compute.h"
enum ARAP_MODE {
OWN,
LIBIGL
};
const char* usage_hint =
"Usage: arap [MODE] [FILENAME]\n\
\n\
MODE: can be either 'own' or 'libigl'\n\
FI... |
7c362621fa9613caa6987db4427f4ad671827e9e | cdc764f1daa86058c492a36ec19c3a69fbdf0403 | mohdashraf/Algorithms-HacktoberFest | /reverse_linked_list.cpp | C++ | cpp | 1,301 | no_license |
#include <bits/stdc++.h>
using namespace std;
struct Node {
int data;
struct Node* next;
};
void reverseUtil(Node* curr, Node* prev, Node** head);
void reverse(Node** head)
{
if (!head)
return;
reverseUtil(*head, NULL, head);
}
void reverseUtil(Node* curr, Node* prev, Node** head)
{
/* If l... |
ff797e53e9f2e330275b12149845dc8941f69c71 | 78fb0b0910c5a018bdbf74de58caba89a4a0bb52 | joaorabelo1121/Sistema-de-Operadora-de-Celular | /Date.cpp | C++ | cpp | 520 | no_license | #include "Date.h"
Date::Date(){
this->dia=0;
this->mes=0;
this->ano=0;
this->hora=0;
this->minuts=0;
};
Date::Date(unsigned int _dia, unsigned int _mes, unsigned int _ano, unsigned int _hora, unsigned int _minuts){
this->dia=_dia;
this->mes=_mes;
this->ano=_ano;
this-... |
e1c043d3a44e29e3951152f0f67163810ba033fb | 773681c6c001d834e59357f51a48beb2f2f9e863 | ca2/app2018 | /appseed/aura/user/user/user_print_job.cpp | C++ | cpp | 489 | no_license | #include "framework.h" // from "base/user/user.h"
//#include "base/user/user.h"
namespace user
{
print_job::print_job(::aura::application * papp) :
::object(papp),
::job(papp),
::user::job(papp),
thread(papp)
{
m_iPageStart = -1;
m_iPageCount = -1;
m_iPrintingPage =... |
a4d78d5bd77217f7e68615f7b260de3c252a223c | 1fe47bbaf9ee98b154e8b75c80deddc62b95f2b1 | DVDemon/mai_oop | /Example117_Future/main.cpp | C++ | cpp | 812 | no_license | #include <iostream> // std::cout
#include <future> // std::async, std::future
#include <chrono> // std::chrono::milliseconds
// a non-optimized way of checking for prime numbers:
bool is_prime (int x) {
for (int i=2; i<x; ++i) if (x%i==0) return false;
return true;
}
int main ()
{
// call ... |
2babccf6fbc4a3d2c0d92b46eeed818423867edd | 6c42d15e9819b71e2f9d642d56b7a5607235a77c | ayush547/Trie-Multi-Pattern-Matching | /trie_matching_extended.cpp | C++ | cpp | 2,470 | no_license | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int const Letters = 4;
int const NA = -1;
//Node of Trie
struct Node
{
//A G T C are the allowed characters
int next[Letters];
bool patternEnd;
Node()
{
... |
262e9a578140e8e2ed6168e24a1352ae25da9c45 | a8c6aa5102d3638f9eb49c0508036324fc0b4626 | hechenyu/book_code | /libtr1/funobjbind/rule4.cpp | C++ | cpp | 609 | no_license | #include <iostream>
#include <tr1/functional>
using std::tr1::bind;
using std::cout;
int no_args()
{
return 0;
}
struct one_arg
{
int operator ()(int i) const
{
return i;
}
typedef int result_type;
};
struct three_args
{
three_args(int v): val(v) {}
int f(int i, int j) const
{
return val + 2 * i + 3 * ... |
01fafc8c666dfed5060ebf9da2f252aed94b2bc0 | 502eff24732e86e780a14743ad3612512a583089 | levibyte/IC_thermal_modeling | /src/parser/ICnode.cpp | C++ | cpp | 442 | no_license | #include "ICnode.hpp"
namespace parser
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// class ICNode
//
void ICnode::setX(double x)
{
m_X = x;
}
void ICnode::setY(double y)
{
m_Y = y;
}
void ICnode::setW(double w)
{
m_W = w;
}
double ... |
1460fbbe68d7bd2027a5582d7770d8f11b4c767b | d60477752ac991324c8d344a57747228962aaa1c | FeutreEnBois/CPP-SFML-Snake-Game | /Textbox.cpp | C++ | cpp | 1,341 | no_license | #include "Textbox.h"
Textbox::Textbox() {
Setup(5, 9, 200, sf::Vector2f(0, 0));
}
Textbox::Textbox(int l_visible, int l_charSize, int l_width, sf::Vector2f l_screenPos) {
Setup(l_visible, l_charSize, l_width, l_screenPos);
}
Textbox::~Textbox() {
Clear();
}
void Textbox::Setup(int l_visible, int l_... |
56543afd63bd0e292fe5036497025cab611e7a81 | 7eb311ed715ea87b99fee3a3d5a64317439fd946 | niuxu18/logTracker-old | /second/download/squid/gumtree/squid_repos_function_3421_squid-3.4.14.cpp | C++ | cpp | 496 | no_license | void
clientReplyContext::processOnlyIfCachedMiss()
{
debugs(88, 4, "clientProcessOnlyIfCachedMiss: '" <<
RequestMethodStr(http->request->method) << " " << http->uri << "'");
http->al->http.code = Http::scGatewayTimeout;
ErrorState *err = clientBuildError(ERR_ONLY_IF_CACHED_MISS, Http::scGatewayTi... |
89d35ad1d965930ea970da53ade1a86b1afc2e06 | eca15a02d639084a2f859c94397ff49aeb94a6e1 | SJFinlayson/3D-MazeGame | /common/shaders.cpp | C++ | cpp | 5,335 | no_license | #include <stdio.h>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <sstream>
using namespace std;
#include <stdlib.h>
#include <string.h>
#include <GL/glew.h>
#include "shader.hpp"
GLuint LoadShaders(const char * geometry_file_path, const char... |
a6f8f3af3f112d38a29b7bc9e4f86f1f73aa1e30 | 298e14eef806c9de8823d1d8a97b2cf02d6eee6e | italovinicius18/contests | /icp/contest_9/C.cpp | C++ | cpp | 299 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(NULL);
int n;
cin >> n;
vector<int> v(n);
for(int i=0;i<n;i++){
cin >> v[i];
}
sort(v.begin(),v.end());
cout << v[(n/2)] - v[(n/2)-1] <<endl;
return 0;
} |
b0a5541d4b681df7c05192dab4bb5aa35e422ff7 | 192e16a12720071eedb37b815a59de76a49b2108 | kdongh/RKModelCMPI | /basis.cpp | C++ | cpp | 7,002 | no_license | //
// Created by DongHoon Kim on 11/16/20.
//
#include "basis.h"
basis::basis(int basisInteger, CNVector_t waveFunctionIn, CNVector_t leftWaveFunction, CNVector_t rightWaveFunction, double *parameterIn){
parameterTomap(parameterIn);
mapToparameter();
basis::basisInteger = basisInteger;
basis::wave... |
4a7fb6de02dbd9685047b1dd0c692c9d351f2304 | 2cbfd87907f9463275485a04be4970958bc2bfd5 | ccdxc/logSurvey | /data/crawl/git/new_hunk_964.cpp | C++ | cpp | 272 | no_license | logerror("'%s': Non-absolute path denied (base-path active)", dir);
return NULL;
}
rlen = snprintf(rpath, sizeof(rpath), "%s%s", base_path, dir);
if (rlen >= sizeof(rpath)) {
logerror("base-path too large: %s", rpath);
return NULL;
}
dir = rpath;
}
|
0d84e34cf458235948cc2ddea0b491db0d782bbf | 06407b073ebd7e828c6f83fbeb620a3039b2ca84 | temper8/FBReader-Tizen | /zlibrary/text/src/area/ZLTextArea.cpp | C++ | cpp | 5,693 | no_license | /*
* Copyright (C) 2004-2010 Geometer Plus <contact@geometerplus.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 2 of the License, or
* (at your option) any later ver... |
c6d06ffaa0fa5aa6fa45769096ab28ee99c606f4 | 359f0a7e00b84612856c4f7fdbb2223130f7fed9 | kkishi/atcoder | /contests/abc244/abc244_c/main.cc | C++ | cc | 531 | no_license | #include <bits/stdc++.h>
#include <iomanip>
#include "macros.h"
void Main();
int main() {
std::cout << std::fixed << std::setprecision(20);
Main();
return 0;
}
using namespace std;
#define int i64
#define wt_flush(...) \
do { \
wt(__VA_ARGS__); \
cout.flush(); \
} while (0)
... |
d025c5f047d60908f1ae9dd3c82da2dd91127a9a | ea9c01525c2e88f4ea50d25571d3c28413b8c2c3 | gfh16/Geant4 | /examples/extended/field/field04/include/F04Trajectory.hh | C++ | hh | 4,322 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
33a2f79a4c1c5d1f28b7fe97c523e2b569357823 | b35f7861fe4b35476607ebe2aa2d09a87ecc74d9 | rstylo/SurrealEngine | /SurrealEngine/SceneManager.cpp | C++ | cpp | 1,580 | no_license | #include "SceneManager.h"
#include "Scene.h"
#include "Entity.h"
SceneManager::SceneManager()
{
Scene* startScene = new Scene();
currentScene = startScene;
//startScene->AddEntity(new Entity(1, 5, 1));
}
void SceneManager::Init(InputHandler* _inputHandler, HWND* _hwnd, HWND* _hwnd2)
{
currentScen... |
1366b38fdb28db2775bfe71b037546e99408c9c0 | 774b2f7cc14e71af812489d40979e43ab28e7e8d | mfisher1996/asembly_crypto | /DecryptData_Initial.cpp | C++ | cpp | 2,606 | no_license | // DecryptData.cpp
//
// THis file uses the input data and key information to decrypt the input data
//
#include "Main.h"
//////////////////////////////////////////////////////////////////////////////////////////////////
// code to decrypt the data as specified by the project assignment
int decryptData(char ... |
3bf4757ef40948c6d1c2584cbac1b36d89ac61d4 | 733926cd1f0e2a599f73a8730968133ee9c20115 | seanjparker/competitive-programming | /CodeForces/Contests/1040/A.cpp | C++ | cpp | 777 | no_license | #include <bits/stdc++.h>
#define INF 0x3f3f3f3;
typedef long long ll;
using namespace std;
//0 -> white
//1 -> black
//2 -> no suit
int main() {
int n, a, b; cin >> n >> a >> b;
int c[n];
for (int i = 0; i < n; i++) {
scanf("%d", &c[i]);
}
map<int, int> v = {{0, a}, {1, b}};
int cost = 0;
for (i... |
bf476f6592770b67895404c5f4baaaffa7f948c3 | 633f497f1649990d9024be7e8908f0f283ac855c | crazelee/my-algorithm | /SortStack.cpp | C++ | cpp | 994 | no_license | #include <iostream>
#include <stack>
using namespace std;
class SortStack
{
public:
static stack<int>* sort(stack<int>* stackData){
stack<int>* stackHelp = new stack<int>;
while(!stackData->empty()){
int dTop = stackData->top();
stackData->pop();
while(!stackHe... |
86da14e55cf11ac5775386d93c4488c694c30370 | 1badde9b5e3d1aa2b2af53d68890b1550249af82 | dubhater/vapoursynth-temporalmedian | /src/temporalmedian.cpp | C++ | cpp | 11,470 | permissive | #include <algorithm>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <VapourSynth.h>
#include <VSHelper.h>
enum {
MaxRadius = 10,
MaxDiameter = MaxRadius * 2 + 1
};
template <typename PixelType>
static void process_plane_scalar(
const uint8_t *srcp8[MaxDiameter],
uint8_t *... |
4758e238bd5a419a64e5fb3d9c9102ca7d9eb03d | 381dc3f2dc4fb2ffe374748d7e865149612bba29 | toki-debug/URI | /Beginner/1142.cpp | C++ | cpp | 215 | no_license | //1142 - PUM
//Arissa Yoshida
#include <stdio.h>
#include <stdlib.h>
int main () {
int n,a,b;
scanf("%d",&n);
for(a=1;a<=(n*4);a++){
if(a%4==0){
printf("PUM\n");
}else{
printf("%d ",a);
}
}
}
|
0a14c459883e16fe940ca7ac79baad41fe5ce3e4 | 52cde005018c86900f1c5bf413e7639ed424a088 | Servicerobotics-Ulm/ComponentRepository | /ComponentTTS/smartsoft/src/ParameterStateStruct.cc | C++ | cc | 1,460 | no_license | //--------------------------------------------------------------------------
// Code generated by the SmartSoft MDSD Toolchain
// The SmartSoft Toolchain has been developed by:
//
// Service Robotics Research Center
// University of Applied Sciences Ulm
// Prittwitzstr. 10
// 89075 Ulm (Germany)
//
// Information abo... |
f50cb3c816a3fb206adf6a741242e3e04460d7a9 | 73545fe900ba76b1477a0c0739e3b8514c90a4f2 | arturomurra/PRACTICA | /Cliente.cpp | C++ | cpp | 446 | no_license | #include "Cliente.h"
#include <iostream>
using namespace std;
Cliente::Cliente(){
this->nombre = "Sin nombre";
this->rfc = "Sin rfc";
}
Cliente::Cliente(string nombre, string rfc){
this->nombre = nombre;
this->rfc = rfc;
}
string Cliente::getNombre(){return this->nombre;}
string Client... |
57ea8d4bad025ba7145d50be0f608e6ba3607059 | 321178fa4b0a5430265eba27da7955c4c303293e | Only1Loatheb/GKOM_OpenGL | /gl_04/gl_04.cpp | C++ | cpp | 17,499 | no_license | #include <iostream>
#include <cmath>
#define GLEW_STATIC // GLEW lista rozszerzen OpenGL
#include <GL/glew.h>
#include <GLFW/glfw3.h> //handles windows creation
#include <SOIL.h> //handles images
#include <glm/glm.hpp> // GLM handles matrix mathematics
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_... |
42281d9c6489a0ec3a709f8535208b4e856a09d2 | 5cf24eb0ee5e10f8bc175b0894ca2581798f686d | PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition | /Chapter08/code/ZombieArena.cpp | C++ | cpp | 5,057 | permissive | #include <SFML/Graphics.hpp>
#include "Player.h"
using namespace sf;
int main()
{
// The game will always be in one of four states
enum class State { PAUSED, LEVELING_UP, GAME_OVER, PLAYING };
// Start with the GAME_OVER state
State state = State::GAME_OVER;
// Get the screen resolution and create an SFML windo... |
b981f132698ab81741939c2b2ffc6ca6363eca79 | cad61c42fc1c7ef140f2f3c2ceba449e3958b1fd | massbrowser/android | /media/blink/watch_time_reporter.cc | C++ | cc | 12,685 | 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 "media/blink/watch_time_reporter.h"
#include "base/power_monitor/power_monitor.h"
namespace media {
// The minimum amount of media playback wh... |
ba9a09d10abe843752befac24478a0888c803004 | bf98f76c7503098ebe9dbc0ef94a3f649c6d4142 | BlackLuny/cyberweapons | /Encryption/crypto32/forkjoin.cpp | C++ | cpp | 3,661 | permissive | // forkjoin.cpp - written and placed in the public domain by Wei Dai
#include "pch.h"
#include "forkjoin.h"
#include "queue.h"
#include <memory>
NAMESPACE_BEGIN(CryptoPP)
Fork::Fork(unsigned int n, BufferedTransformation *const *givenOutPorts)
: numberOfPorts(n), outPorts(n)
{
currentPort = 0;
for ... |
e67a8b2444bc6319c7398b14f7f0e3f993317f6e | 92d69107093edfbd35244f9f3be258ca33d3b8c8 | jpeach/trafficserver-plugins | /esi/lib/Stats.cc | C++ | cc | 1,766 | permissive | /** @file
A brief file description
@section license License
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 und... |
51e8aec6d803feaafea04db4db3f505cd932d3a0 | 70a3e5bdd5e24729dbdfbd0f87e6da1b02261f5c | sysfce2/rtype | /client/src/handlers/JoinHandler/JoinHandler.cpp | C++ | cpp | 910 | no_license | /*
** EPITECH PROJECT, 2020
** B-CPP-501-BDX-5-1-rtype-albert.corson
** File description:
** JoinHandler
*/
#include "JoinHandler.hpp"
#include "Protocol.hpp"
#include "engine/core/components/PositionComponent.hpp"
#include "handlers/SpawnHandler/SpawnHandler.hpp"
#include "nlohmann/json.hpp"
#include "scene_loader/S... |
3f32995220d11b8668d2d666045c04699ce55911 | ae237d77d465ca5316e6c40e85953ecbe7dff184 | hackifme1/Leetcode | /Maths/Add Minimum Number of Rungs.cpp | C++ | cpp | 1,986 | no_license | // By Chandramani Kumar
// Keep moving and must be simple bro!!!!!
// Espérons le meilleur mais préparez-vous au pire 😎
/* Problem Statement :
You are given a strictly increasing integer array rungs that represents the height of rungs on a ladder. You are currently on the floor at height 0, and you want to reach th... |
f1929288031e3f3c86e57103f555ac2b4f4bd65b | 352da0778f72ae0fcb64d03f42c7a73efd8f6608 | KraemerDEM/couchbase-lite-core | /Replicator/Replicator.cc | C++ | cc | 30,096 | permissive | //
// Replicator.cc
//
// Copyright 2017-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
// in that file, in accordance with the Business Source License, use of this
// software will be gov... |
6e58e22de51a63b61bcc4fad0076bb0752bf4914 | 6bed3e95f51b00ede406fa95ac8e5e7a3250b507 | ashinek/C-plus-zaliczenie | /Zadania/zad_5_kawa/main.cpp | C++ | cpp | 26,869 | no_license | #include <iostream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include<time.h>
#include<windows.h>
#include <fstream>
using namespace std;
void pieniadze()
{
system("cls");
cout<<"\n##################################################\n";
cout<<"#------------------------------------------------#\n";
cout... |
ab4c3cf7bbeab2263d7ca2957a3e94a9da63995e | 42f9cd32e9a1875c18d88129e382ff09e309e7b7 | volcomboud/gitoverhere | /main.cpp | C++ | cpp | 301 | no_license | #include <iostream>
void calculer(int we, int x);
int main(){
int we = 2;
int x=0;
int y =1;
std::cout<<"c<est ca"<<std::endl;
calculer(we,x);
return 0;
}
void calculer(int we, int x){
int resultat = 0;
resultat=we*x;
std::cout<<"Le resultat est "<<resultat<<std::endl;
}
|
d9636b42fd0c69ab2f3ea2ed8e62ba8896a6675b | 47e1bbae1c26685ec5b3e00cba2c7317ec6e3f53 | ggml1/Competitive-Programming | /UVa/10963.cpp | C++ | cpp | 360 | permissive | #include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
int t; cin >> t;
while(t--){
int w; cin >> w;
set<int> dif;
for(int i = 0; i < w; ++i){
int x, y; cin >> x >> y;
dif.insert(abs(x - y));
}
if(dif.size() == 1) cout << "yes" << endl;
else cout << "no" << endl;... |
5ea0b389d3721beeabca055c60e36c0cd07fa662 | 7fcef04213a2c5006e7e56e6522cdf4a34f7fc4a | horance-liu/Sprout | /sprout/valarray/logical.hpp | C++ | hpp | 3,228 | permissive | /*=============================================================================
Copyright (c) 2011-2017 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.tx... |
58cf10092d71595bf780d7b2c316bdf011750a13 | 8e05ba412c672789ef343c9609de713f40c09163 | EvAn-HuAngBiu/Leetcode | /LeetCode-CPP/28.cpp | C++ | cpp | 501 | no_license | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
class Solution {
public:
int strStr(string haystack, string needle) {
int s1 = haystack.size(), s2 = needle.size();
if (!s2) {
return 0;
}
for (int i = 0;... |
3533ffaddf454b45a3838be46f7ad1f5b80d1be1 | 9111fcb43c51df095c5cda9652136e26c5bbc0ab | PierreLeBlond/Orangutan | /src/scene/objectnode.cpp | C++ | cpp | 4,310 | no_license |
#include "scene/objectnode.h"
#include <iostream>
ObjectNode::ObjectNode()
{
}
void ObjectNode::setObject(std::shared_ptr<Object> object)
{
_object = object;
}
void ObjectNode::addChild(std::shared_ptr<ObjectNode> node)
{
_childs.push_back(node);
}
void ObjectNode::removeChild(std::shared_ptr<ObjectNode> ... |
b8a58c7f442edbd246a2e90bb2c6d4df83ca1478 | 1d5d90eca61a42ac0a17c5fd9db768d81c298d3a | 2bite/ARK-SDK | /SDK/ARKSurvivalEvolved_PrimalItemConsumable_Egg_Owl_Gen2_classes.hpp | C++ | hpp | 891 | permissive | #pragma once
// ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_PrimalItemConsumable_Egg_Owl_Gen2_structs.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------... |
5a83993369f642ef7943b23b52c229efe41b9297 | 0706144567b6e9c0e5124e5edac3f21dfe5827e4 | corefan/taichi | /src/texture/perlin.cpp | C++ | cpp | 3,714 | permissive | #include <taichi/visual/texture.h>
TC_NAMESPACE_BEGIN
// Adapted from the Java reference implementation here http://cs.nyu.edu/~perlin/noise/
class PerlinNoiseTexture : public Texture {
protected:
public:
void initialize(const Config &config) override {
}
virtual Vector4 sample(const Vector3 &coord) cons... |
240ddcce03aafdb90e4bd88115b38c6b24b7f4ba | 11a49030cb9c5ba80e7095fa123ae64f40b17347 | colinhect/daydream | /source/tests/scenetests/source/main.cpp | C++ | cpp | 1,359 | permissive | ///////////////////////////////////////////////////////////////////////////////
// This source file is part of Daydream.
//
// Copyright (c) 2018 Colin Hill
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// d... |
36dcf00c667c64ced8cdd55dece5b91c308c6dc7 | e80939f9f6f4952ca7e5d711bf79e482bbd8c887 | tee3/static_object_arena_allocator | /object_arena_allocator.hpp | C++ | hpp | 1,593 | no_license | #ifndef object_arena_allocator_hpp_
#define object_arena_allocator_hpp_
#include <cstddef>
/// Uses an object arena to perform allocations.
template<class ObjectArena>
class object_arena_allocator
{
public:
typedef ObjectArena object_arena_type;
typedef typename object_arena_type::value_type value_type;
publi... |
f0248677f78df32bf147ff4ea7fd875fe202e747 | 12bba54a75299fbde10bc5e32feaffe9c8ac44e0 | organization0012/cpp_library | /cpp/data_structure/w-tinylfu/bloom_filter.hpp | C++ | hpp | 3,636 | no_license | /* Copyright 2017 https://github.com/mandreyel
*
* 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,
* merg... |
d5656714ffbd988fe3a7df8b4af5c2c0899e2de0 | 1f73f3bef2bb34c4f0b7c97291bc8309ff154dff | dtbinh/caspl | /Barak/C/Servers SPL/client/src/WhatsAppUser.cpp | C++ | cpp | 11,748 | no_license |
#include "../include/WhatsAppUser.h"
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/thread.hpp>
using namespace std;
const int MESSAGE_CHECK_INTERVAL = 1000;
WhatsAppUser::WhatsAppUser(string serverAddress, int serverPort):_userName(""), _phone(""),_client(),_cookie(""), loggedIn(0){
_client... |
6c1d672ec2feb969f8faf92a983c0013676041e0 | d43f3383692c0758bcf98a9a77dc2e04f0016377 | Smolyarov/u2 | /firmware/src/sensors/lsm303_mag.hpp | C++ | hpp | 1,348 | no_license | #ifndef LSM303_MAG_HPP_
#define LSM303_MAG_HPP_
#include "i2c_sensor.hpp"
#include "marg_data.hpp"
#define LSM303_MAG_I2C_ADDR 0b0011110
#define LSM_MAG_RX_DEPTH 8
#define LSM_MAG_TX_DEPTH 4
class LSM303_mag: private I2CSensor {
public:
LSM303_mag(I2CDriver *i2cdp, i2caddr_t addr);
sensor_state_t ge... |
870422cbab311833865c5bea1f1257d1f25a9d22 | e10a5239afe098765d4d1c017eb32e099d3289a1 | acc-cosc-1337-summer-2020-classroom/acc-cosc-1337-summer-2020-jerAub | /src/classwork/10_assign/main.cpp | C++ | cpp | 728 | permissive | //main
#include "employee.h"
#include "engineer.h"
#include "sales_employee.h"
#include<iostream>
int main()
{
const int SIZE = 2;
Employee* employeeList[SIZE]; //reserve memory
//create instances of Employee of type Engineer and SalesPerson in dynamic memory
employeeList[0] = new Engineer(2000,... |
b49d94e34d5602e78bd0e7f8db0f8d5e1979ada4 | 70f822b0b8178e5319a5312f093eedb61f1b117c | Alipipe/TOP-chain | /src/xtopcom/xutility/xmerkle.hpp | C++ | hpp | 9,749 | no_license | /**
* Merkle implementation. For odd nodes, don't copy last one, just hash it as next level node.
* Very special case is the nodes' number is 2^N + 1, the last node will be odd N times
*/
#pragma once
#include <string>
#include <vector>
#include <list>
#include <cmath>
#include "xutility/xhash.h"
#include "xbase/x... |
93a1d11edae659a199480921df0c4f498af73e20 | 2578c8cc0b952e93444cd78650f3e31adf25ef17 | Whatsapp-Protocol/llvm-project | /clang/lib/Frontend/CompilerInvocation.cpp | C++ | cpp | 187,238 | permissive | //===- CompilerInvocation.cpp ---------------------------------------------===//
//
// 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
//
//===---------------------------... |
26b006445ebaa008f8f828446e426c03514f2cc1 | 2f66169ba0629158e2d91ff66bffa0b6058949a2 | lythro/ProjectHeartbeat | /Constant.cpp | C++ | cpp | 547 | no_license | #include "Constant.h"
#include "string.h"
#include "stdlib.h"
void Constant::getRGB( unsigned char id, unsigned char *r, unsigned char *g, unsigned char *b ) {
*r = this->r;
*g = this->g;
*b = this->b;
}
// r g b
void Constant::setConfig( char* config ) {
char del[] = " ";
// r
char* ptr = strtok( config, del ... |
a2fc23c54eb7644a2c5eab5b61d604364286e155 | d543f501bb29ee50cec2252f02ddeedfe6f8cf6b | DanielNeander/my-3d-engine | /U2_3D/Src/tools/U2MeshBuilder.cpp | C++ | cpp | 63,158 | no_license | #include <U2_3D/Src/U23DLibPCH.h>
#include "U2MeshBuilder.h"
//#include <U2_3D/src/Object/U2WinFile.h>
U2MeshBuilder* U2MeshBuilder::ms_pQsortData = 0;
U2MeshBuilder::U2MeshBuilder() :
m_vertexArray(32768, 32768),
m_triangleArray(32768, 32768),
m_groupEdgeArray(32768, 32768),
m_skinCtrls(64),
m_tmInterpCtr... |
ed58d9a7e7176aba16614f2a052a913a6eda575f | 0a28ba93651c4bd40308d4c9e3616b0924f83c77 | CristhianArce/Maratones | /Elefantes.cpp | C++ | cpp | 380 | no_license | #include <iostream>
#include<algorithm>
#define MAX 100001
using namespace std;
int main(){
int t,M,W,x=1,pesos[MAX];
cin>>t;
while(x<=t){
cin>>M>>W;
for(int i=0;i<M;i++){
cin>>pesos[i];
}
sort(pesos,pesos+M);
int cont=0,ele=0;
for(int j=0;j<=M;j++){
if(cont<=W){
cont=cont+pesos[j];
... |
ccbfe6b295572c39b0fa28ead5a4f941d0a67270 | 38739ad021aa6b24feb4d2364458a99b27ec53da | Justin179/C | /Lab52/main52.cpp | C++ | cpp | 299 | no_license | /*
* main52.cpp
*
* Created on: 2017¦~12¤ë23¤é
* Author: Administrator
*/
#include <iostream>
#include "Foo.h"
using namespace std;
int main(int argc, char **argv) {
cout << "result=" << myVar << endl;
const int myVar2 = 500;
cout << "myVar2=" << myVar2 << endl;
return 0;
}
|
f7cec7eebb597255fceac31d339d36bc6171853a | 6ecc465e38944ee7e5b143feae6d5a4dc0daa552 | Shra1-25/temp_test | /plugins/temp_test.cc | C++ | cc | 7,773 | no_license | // -*- C++ -*-
//
// Package: StuffProd/temp_test
// Class: temp_test
//
/**\class temp_test temp_test.cc StuffProd/temp_testr/plugins/temp_test.cc
Description: [one line class summary]
Implementation:
[Notes on implementation]
*/
//
// Original Author: Shravan Sunil Chaudhary
// Created: Sun,... |
0f1905fd382325aa927f6797c25f8b10ff330399 | abe32efab5e18a3acb7fdd1a891e6b3c4df67f3a | tignear/squall | /squall/squall_vmstd.hpp | C++ | hpp | 1,571 | permissive | #ifndef SQUALL_VMSTD_HPP_
#define SQUALL_VMSTD_HPP_
#include <squirrel.h>
#include <sqstdio.h>
#include <sqstdaux.h>
#include "squall_vm.hpp"
#include <stdarg.h>
namespace squall {
namespace detail {
template <class T>
void pf(HSQUIRRELVM v, const T* s, ...);
template <>
void inline pf<char>(HSQUIRRELVM v, const ... |
9777fce42c1f622ff84806ba1071ec40e1f47ecd | 0a557b97a340f0f1d66920485918cc5a80545970 | kweide/f18 | /lib/semantics/check-arithmeticif.cc | C++ | cc | 2,090 | permissive | // Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
79a1f69a9fbf45449b11764afd9f30f1104b50c8 | 60c2f072e2853277c8d773049499416ae24b215f | kor-Chipmunk/WinSock_in_C | /Chapter 03 소켓 주소 구조체 다루기/NameResolution/NameResolution/소스.cpp | C++ | cpp | 1,639 | no_license | #pragma comment(lib, "ws2_32")
#include <WinSock2.h>
#include <stdio.h>
#define TESTNAME "www.example.com"
// 소켓 함수 오류 출력
void err_display(char *msg)
{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, WSAGetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT... |
191db1d55a98e490a7bcd48b72b49d110d68a861 | 8781e62b35d85f66f0dfdca139274ebe37f34734 | therenow9/COSC-220-Advanced-c- | /labs/Lab_5/bar.cpp | C++ | cpp | 235 | no_license |
/*********************************************
* bar.cpp
* Implementation of Bar class
*
*********************************************/
#include "bar.h"
Bar::Bar(float val) : y(val)
{}
float Bar::getY() const
{
return y;
}
|
6cbd382c39cd781cd908caf99629be777a26e072 | 4ff792046f9a988802c152acba7b1db95177d185 | YusufSherif/HashGraph | /Vertex.hpp | C++ | hpp | 270 | permissive | //
// Created by Yusuf Sherif on 5/28/20.
//
#ifndef GRAPH_VERTEX_HPP_
#define GRAPH_VERTEX_HPP_
#include <iostream>
template <typename KEY>
class Vertex {
private:
protected:
public:
Vertex() = default;
virtual ~Vertex() = default;
};
#endif //GRAPH_VERTEX_HPP_
|
f79c579df02158c2474ebb8ccedfce0bc886b86f | 4c858928651345c6f6744e1f15ae0ebb9aeffc24 | Andersbakken/CPlusPlus | /src/plugins/projectexplorer/allprojectsfilter.cpp | C++ | cpp | 2,668 | no_license | /****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this f... |
9f47db5c806df01ba0ef431520f404d81dc2be79 | 71286a74900ca0c8f149527a888159ea7641e753 | nickchops/dpi | /example/src/PixelDensityExample.cpp | C++ | cpp | 617 | permissive | #include "s3e.h"
#include "IwGx.h"
#include "PixelDensity.h"
#include <sstream>
int main(int argc, char* argv[])
{
IwGxInit();
IwGxSetColClear(0x1f, 0x1f, 0xc0, 0x7f);
char ppi[5];
sprintf(ppi, "%d", PixelDensity::GetScreenPPI());
while (!(s3eKeyboardGetState(s3eKeyEsc) & S3E_KEY_STATE_DOWN) &&
!(s3eKeyboa... |
2522102b72fe46bacce50f1f168cfb6ca0f63b1a | eeeaee326d5cf597e4f84f38539b992730f77a60 | boydlee/CefSharp | /CefSharp/Request.cpp | C++ | cpp | 1,462 | permissive | #include "stdafx.h"
#include "Request.h"
namespace CefSharp
{
String^ CefRequestWrapper::Url::get()
{
return toClr(_wrappedRequest->GetURL());
}
void CefRequestWrapper::Url::set(String^ url)
{
if(url == nullptr)
{
throw gcnew System::ArgumentException("cannot ... |
46650ff430e58bd3eb79f71530df4e8a8908e752 | a9d3d80fe97cd02b37e8bf9da614a568db184e01 | jfeser/earley | /grammar.hpp | C++ | hpp | 1,568 | permissive | #ifndef GRAMMAR_H
#define GRAMMAR_H
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <cassert>
typedef int symbol;
typedef std::vector<symbol> rule;
class Grammar {
private:
int symbol_count;
int nonterminal_count;
int terminal_count;
std::unordered_map<std::string, sym... |
8ed9ede1465e76f4eade06064bfe8fc3218c621c | 8f5df9756231035a25c528f6876ef5099da218d6 | Stepets/life_simulation | /Logics/SimpleLogics.cpp | C++ | cpp | 1,067 | no_license | #include "SimpleLogics.h"
#include "../Actions/Eat.h"
#include "../Actions/Move.h"
#include <iostream>
void SimpleLogics::willToEat ( Creature& creature ) {
creature.creatureActions.push_back ( new Eat );
}
void SimpleLogics::creatureWill ( World* world, Creature& creature ) {
willToEat ( creature );
... |
b04c931424e3d4d309ae7a80b8ada0845b72d39f | fd4f8073873499279436c36debd0818084a00b4f | djmerrill/cse141pp-archlab | /libarchlab/PCMDataCollector.hpp | C++ | hpp | 829 | no_license | #ifndef PCM_DATA_COLLECTOR_INCLUDED
#define PCM_DATA_COLLECTOR_INCLUDED
#include"DataCollector.hpp"
#include <cpucounters.h>
class PCMMeasurementInterval;
class PCMMeasurement: public Measurement {
friend PCMMeasurementInterval;
SystemCounterState pcm_system_counter_state;
std::vector<SocketCounterState> pcm_s... |
0c14b015f32728a89d5214d7bfccfced1ad70dc6 | a74ec79e87b73cbb7ab0da927b56db84dc704bd4 | SanthoshKumar503/c_cpp_program_files | /cpp_constructor_demo2.cpp | C++ | cpp | 337 | no_license | #include<iostream>
using namespace std;
class con
{
private:
int x,y;
public:
con(int a,int b)
{
x=a;
y=b;
}
int getadd()
{
return x+y;
}
};
int main()
{
int n1,n2,r;
cout<<"Enter the two numbers:";
cin>>n1>>n2;
con c=con(n1,n2);
r=c.getadd();
cout<<endl<<"Add of two:"<<r;... |
a6bc60730c098f1b4e1211775f43619e4ba347f4 | ff3c29105bff709f125feec7b31a09beb7af29bb | svn2github/angelscriptsdk | /samples/game/source/scriptmgr.cpp | C++ | cpp | 10,681 | no_license | #include "scriptmgr.h"
#include "gamemgr.h"
#include "gameobj.h"
#include <iostream> // cout
#include <stdio.h> // fopen, fclose
#include <string.h> // strcmp
#include <assert.h>
#include "../../../add_on/scriptstdstring/scriptstdstring.h"
#include "../../../add_on/scriptbuilder/scriptbuilder.h"
#include "../../../ad... |
50af2999cd55de0ee50c6dabc066f5c5a96ebf3c | 7c4c9b4b39e993db7ffa8f131daa840692f64888 | rdiaz002/DataStructures | /DataStructurePractice/DataStructurePractice.cpp | C++ | cpp | 251 | no_license | // DataStructurePractice.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include "Trie.h"
int main()
{
std::cout << "Hello World!\n";
Trie myTrie();
myTrie.insert("Hello", 6);
}
|
7b7d998e52b10af800aa27a7c279931f75d1c7a0 | b050b09cebae50110ed6abc6d2a38ce68ba9bbdc | isliulin/ServerCode | /游戏组件/南京麻将_JYZ/机器人服务/AndroidUserItemSink.cpp | C++ | cpp | 55,998 | no_license | #include "Stdafx.h"
#include "AndroidUserItemSink.h"
#include <strsafe.h>
#include <algorithm>
////////////////////////////////////////////////////////////////////////////////////////////
//游戏时间
#define IDI_ANDROID_ITEM_SINK 100
#define IDI_START_GAME_A (IDI_ANDROID_ITEM_SINK+0) //开始时间
#define IDI_SHOOT_DICE_A ... |
1946c702127e444c6eb8a4adb12bf86ab1c72559 | 4caab7e80ac9d96d0ef2255fda2cb93a756c48cf | seacn10/NetEngine | /NetEngine/WHThread.cpp | C++ | cpp | 3,424 | no_license | #include "StdAfx.h"
#include "WHThread.h"
struct tagThreadParameter
{
bool bSuccess;
HANDLE hEventFinish;
CWHThread * pServiceThread;
};
CWHThread::CWHThread()
{
m_bRun=false;
m_uThreadID=0;
m_hThreadHandle=NULL;
return;
}
CWHThread::~C... |
1eadd9a72a77995f056586660b563b144665b0e1 | 9159d60f8b96f4038358663c978284b5e102aac2 | Sumerin/Sem8Projects | /SOWW/MPI_Prime_non_blocking/main.cpp | C++ | cpp | 5,356 | no_license | #include <stdio.h>
#include <mpi/mpi.h>
#include <time.h>
#define L 1900000
#define R 2000000
#define N 1000
#define COUNT ((R - L) / N)
//#define SHOW_DEBUG
//#define SHOW_RESULT
int IsPrime(int a)
{
for (int i = 2; i < a; ++i)
{
if (a % i == 0)
{
return 0;
}
}
... |
6f43e9dd9e54df38b729b416efa19f85a66c5c37 | 66f504b5d279368a0140d0a9995dd0c5968fb253 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14275/function14275_schedule_36/function14275_schedule_36.cpp | C++ | cpp | 1,197 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14275_schedule_36");
constant c0("c0", 128), c1("c1", 256), c2("c2", 2048);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"),... |
4c361e941ea930ca13e71be200843c15c077f3c8 | 83bf3f8c0c22e1e70f1cef76952efea251199992 | d2000garcia/origin | /Diego_Garcia_2-11-20_Problem2.cpp | C++ | cpp | 532 | no_license | //this is my first c++ program
#include <iostream>
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main(){
//Initializing tracker variables and sum
int tracker3 = (1000-(1000%3))/3;
int tracker5 = (1000-(1000%5))/5;
int sum = 0;
int i = 0;
//Loop that does calculations
while (i < ... |
a76f81d670fe6b55ecfd2bd1998c6e8e926455cd | d637d6083458b271140b07a5f26c470380a2ab1f | pragyajaiswa05l/Data_structure_algorithm | /Binary_search/koko_eating_banana.cpp | C++ | cpp | 1,231 | no_license | class Solution {
public:
bool isvalid(vector<int>&piles,int banana_can_be_eatten,int h){
int time_sum = 0;
for(int i =0 ; i < piles.size();i++){
time_sum += (int)ceil(piles[i]*1.0/banana_can_be_eatten*1.0);
if(time_sum > h){
return false;
}
... |
34a06d94de8c2e507563569449209cd00423cb83 | 767cdeb269ee9c2c0e3b2138d88e9638d7b443d8 | archer811/ACM | /contests/20140725_bnu/f.cpp | C++ | cpp | 1,446 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<algorithm>
#include<vector>
#include<set>
#include<ctime>
using namespace std;
const int maxn=100000+100;
struct node
{
int l,r;
int id;
bool friend operator <(node a,node b)
{
if (a.l!... |
b6fb8cd4b77913e7535ca4f6d0dcb1a196e7ed66 | fe3cd21fdd16e4b92a12b049055b3dd01bac3863 | yangzhu6263736/cocos2d-x-lite | /tools/simulator/libsimulator/lib/runtime/Runtime.cpp | C++ | cpp | 10,767 | permissive | /****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
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 re... |
e382f01b6116625152ddc7720ef934edf82d378f | 48b21ac43caed3b74b3e9f9a4a6fafd2bf1b0cbb | mychangle123/Chromium-WebCL | /chromium-webcl/src/net/http/http_server_properties.cc | C++ | cc | 1,730 | permissive | // Copyright (c) 2012 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 "net/http/http_server_properties.h"
#include "base/logging.h"
#include "base/stringprintf.h"
namespace net {
const char kAlternateProtocol... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.