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 |
|---|---|---|---|---|---|---|---|---|
f929d38c03bece27a05de138f42f2ac9c6f18e3f | 7f57f5ef1d4073dfbdc2bbbd2438abb2dc2f19f8 | nathansoz/cs161 | /week3/strings.cpp | C++ | cpp | 1,422 | no_license | #include <iostream>
#include <string>
using namespace std;
int GetNumAlphaCharsInString(string *my_str)
{
//Use is alpha function to find alpha chars.
int alphaCount = 0;
for(int i = 0; i < my_str->length(); i++)
{
if(isalpha(my_str->at(i)))
{
alphaCount++;
}
... |
358584ca571870104aeb525094cb8c21288da1ab | b63ac61a212c627e25156fbba4ff00d89fab3bea | Subtselnyi/Archiver | /archivedialog.cpp | C++ | cpp | 2,834 | no_license | #include "archivedialog.h"
#include "ui_archivedialog.h"
#include <QPushButton>
#include <QFileDialog>
#include <QCompleter>
#include <QFileSystemModel>
#include <QMessageBox>
#include <QDebug>
ArchiveDialog::ArchiveDialog(vector <string> allPathes,QWidget *parent) :
QDialog(parent),
ui(new Ui::Arch... |
3d816a8372278745264cfb55afe4c88aac3b42cd | aa0f17137f605111ba5b7263ce8cea32ab8a4861 | mariospr/chromium | /chrome/browser/android/explore_sites/explore_sites_service_impl_unittest.cc | C++ | cc | 7,794 | permissive | // Copyright 2018 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/android/explore_sites/explore_sites_service_impl.h"
#include "base/feature_list.h"
#include "base/message_loop/message_loop.h"
#... |
cd438f4a52cb77d5e86a3e509e9b70ecb3f81b60 | e6669d42fde991ff038e03746abb68b6b50462d7 | rusty1s/pytorch_cluster | /csrc/cpu/graclus_cpu.cpp | C++ | cpp | 2,224 | permissive | #include "graclus_cpu.h"
#include "utils.h"
torch::Tensor graclus_cpu(torch::Tensor rowptr, torch::Tensor col,
torch::optional<torch::Tensor> optional_weight) {
CHECK_CPU(rowptr);
CHECK_CPU(col);
CHECK_INPUT(rowptr.dim() == 1 && col.dim() == 1);
if (optional_weight.has_value()) {
... |
002e2d0d7ee905930f60e6e7b8a545dd5ddac019 | 5064151ac16a23cf3b6c860b6941e4cbdc9c1188 | bucaklilar6-web/vnx-search | /generated/include/vnx/search/SearchFrontendAsyncClient.hxx | C++ | hxx | 5,827 | no_license |
// AUTO GENERATED by vnxcppcodegen
#ifndef INCLUDE_vnx_search_SearchFrontend_ASYNC_CLIENT_HXX_
#define INCLUDE_vnx_search_SearchFrontend_ASYNC_CLIENT_HXX_
#include <vnx/AsyncClient.h>
#include <vnx/Module.h>
#include <vnx/addons/HttpRequest.hxx>
#include <vnx/addons/HttpResponse.hxx>
#include <vnx/search/query_optio... |
67ecc3775970c8fb3b236e0c266a50c864b58782 | f69b79c8a03407b90d218ec400b465e74523998c | FrankNaets/chrono | /src/chrono/solver/ChSolverSORmultithread.cpp | C++ | cpp | 17,163 | permissive | //
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2010-2011 Alessandro Tasora
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file at the top level of the distribution
// and at http://projectchrono.org/license-chrono.txt.
//... |
71c751d473db628700fa2c91a00fb66d4e5838f0 | c0f8120bea3015d444785ec1b7d741ee271f5aa3 | zhaozyi/kattis_problem | /licensetolaunch.cpp | C++ | cpp | 283 | no_license | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int min = INT32_MAX, d = 0;
for (int i = 0; i < n; ++i) {
int a;
cin >> a;
if (min > a) {
min = a;
d = i;
}
}
cout << d << endl;
} |
98858954c996f054cf0c78b5470cf6a8a0c34696 | 0a7844b1daa66e8927833349b5eb6b75149eecc3 | a798447431/Qt_Project | /beatMouse/myitem.cpp | C++ | cpp | 1,204 | no_license | #include "myitem.h"
#include <QPixmap>
#include <QDebug>
#include "handler.h"
#include <QCursor>
myItem::myItem()
{
this->setPixmap(QPixmap(":/bg/picture/bg1.png"));
this->start = false;
this->mouse = false;
this->setCursor(QCursor(QPixmap(":/mouse/picture/pictureUp.png")));
}
void myItem::setPic(QStr... |
063ce3fbaacd7728c044d62c714317d09fe214ae | 10c7ba5c5af1b6c5a12b477cc39ace187fe04dcb | RussellJerome/DeepRockGalacticSDK | /SDK/FSD_ABP_Bosco_functions.cpp | C++ | cpp | 7,376 | no_license | // DeepRockGalactic SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "FSD_ABP_Bosco_parameters.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function ABP_Bosc... |
2a48a723cb559deb3ffa72f767a85d73d0caa2d2 | a45fa60f22a0f95dce4806f87beaed2dbd04e7c0 | ORO-mlm/ORO-Core | /src/httprpc.cpp | C++ | cpp | 6,199 | permissive | // Copyright (c) 2015-2017 The Bitcoin Core developers
// Copyright (c) 2017-2020 The PIVX developers
// Copyright (c) 2021- The ORO developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "httprpc.h"
#include "base... |
3029d67a8b12e5b320a6b7277af823c4ec1e6222 | c6b677700057511ff84a450e08f4f2320188b23b | 1765155167/Linux | /fork/siganl/raise_abort.cpp | C++ | cpp | 883 | permissive | #include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <signal.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <unistd.h>
#include "hqf_log.h"
void myfun(int no)
{
std::cout << "捕捉到" << no << std::endl;
}
int main()
{
//捕捉信号
... |
a52344e83156123306c64268299133b48fb136d5 | 1221dd1ebee3a9d9b088fd599e868f42663df0d0 | alexisde-vencent/webfr | /test/webfr/web/FullTest.cpp | C++ | cpp | 19,993 | no_license | #include "FullTest.hpp"
#include "webfr/web/app/Client.hpp"
#include "webfr/web/app/ControllerWithInterceptors.hpp"
#include "webfr/web/app/Controller.hpp"
#include "webfr/web/app/BasicAuthorizationController.hpp"
#include "webfr/web/app/BearerAuthorizationController.hpp"
#include "webfr/web/client/HttpRequestExecutor.... |
2089377d6b77f2d2ed4ef1aaf508dd60081e6567 | 6d4b1bd6510f7547a5ce6c67bf31d8b06636172f | euseibus/engine | /src/modules/voxel/World.cpp | C++ | cpp | 6,330 | no_license | /**
* @file
*/
#include "World.h"
#include "core/Var.h"
#include "core/Log.h"
#include "core/Common.h"
#include "core/Trace.h"
#include "io/File.h"
#include "core/Random.h"
#include "core/Concurrency.h"
#include "voxel/polyvox/AStarPathfinder.h"
#include "voxel/polyvox/CubicSurfaceExtractor.h"
#include "voxel/polyvo... |
701d85072e1295c97beb9f9258e8a4e9c7bc6643 | 183dad8c56d4a2e3e7c63463b9a6a286f105b868 | 5ace/chromium | /ash/wm/tablet_mode/tablet_mode_window_drag_delegate.cc | C++ | cc | 14,536 | permissive | // Copyright 2018 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/wm/tablet_mode/tablet_mode_window_drag_delegate.h"
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf_layout_manager.h"
#inc... |
40dfda1575d8426a1badac19576a95e3ba3deae6 | 5226e581a4526b2a5746c85217532b43c05713e3 | SVladimir20/OOP.-Lesson-6 | /3-5.cpp | C++ | cpp | 3,704 | no_license | #include <iostream>
#include <vector>
using namespace std;
class Card
{
public:
enum class Card_value
{
Ace = 1,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack = 10,
Queen = 10,
King = 10,
};
enum class Suit
{
Spades,
Hearts,
Diamonds,
Clubs
};
Card(Card_value v, Sui... |
bcb64bd8bc23db7d5df51cb006cabdafd2de04cc | 64eba4dca97d92c084c3ea5665949e57c400778c | M45UDrana/DS-Algo-Problem-Solving | /codeforces/600A.cpp | C++ | cpp | 1,265 | no_license | #include <bits/stdc++.h>
using namespace std;
bool isnum(string g)
{
for(int i = 0; i < g.size(); i++)
{
if('0' > g[i] or g[i] > '9')
return false;
}
if(g.size() == 0 or (g.size() > 1 and g[0] == '0'))
return false;
return true;
}
int main()
{
string s, g = ""; cin ... |
b9ab767d880e2aed0195ba0d414217fa4b2fe91e | 81acaee4c55281175fddcd819df43e457f3d0148 | ssabishek/DSA_CPP | /Backtracking/ratinamaze.cpp | C++ | cpp | 1,436 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution
{
vector<string> s;
public:
void dfs(int i, int j, int n, vector<vector<int>> &m, vector<vector<int>> &vis, string str)
{
if (i < 0 || i >= n || j < 0 || j >= n)
return;
if (m[i][j] == 0 || vis[i][j] == 1)
... |
d71336eaec97687976d14a25a60f9347e8051d87 | 1b9f7bf33d321cecee90abfda042b0cf4b9052af | agunturu/RIFT.ware | /modules/ext/yang/protobuf-c/protobuf-c/protoc-c/c_message_field.cc | C++ | cc | 27,923 | permissive | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistri... |
f6648a81bd586b64aa114c0cbdbeb276d1c83b85 | 84bcab4ea274818a967caf7a758a9db0e168c97d | Krish03na/Leetcode-solutions | /DFS/Increasing_Order_Search_Tree.cpp | C++ | cpp | 1,428 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : v... |
d4ad8a78eac8c870e99d71df5bc3a6997ff390e8 | 3f58e0ece62dbe1387638ea2f6cbf06e61caf90c | JoachimKoenigslieb/pyhpc-fpga | /src/host.cpp | C++ | cpp | 57,764 | no_license | #include <iostream>
#include <string.h>
#include <sys/time.h>
#include <algorithm>
#include <math.h>
#include <xtensor/xarray.hpp>
#include <xtensor/xnpy.hpp>
#include <xtensor/xview.hpp>
#include <xtensor/xio.hpp>
#include <xtensor/xadapt.hpp>
#include <xcl2/xcl2.cpp>
#include <runKernels.h>
#define X 6
#define Y 6... |
5d83cee1aca02743684ef9ab70716688b00ab959 | d8fbee46270dddce26466bb9f9ce9c2ed13f0c3f | joelnb/nsis | /NSIS/tags/v201/Source/util.cpp | C++ | cpp | 13,914 | no_license | #include "Platform.h"
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <string.h>
#include "exedata.h"
#include "exehead/fileform.h"
#include "util.h"
#include "strlist.h"
#ifndef _WIN32
# include <ctype.h>
#endif
int g_dopause=0;
extern int g_display_errors;
extern FILE *g_output;
void dopause(voi... |
d5de14f7bdd2b16de72732e94e8577cb4634b5e2 | 9f9c08a2ffb55c6ee85cda9714033540e7fa6157 | jasarsoft/kckf-pr1 | /grupa/2017_02/2017_03_14/z1_bruto2neto_v1.cpp | C++ | cpp | 801 | no_license | #include <iostream>
using namespace std;
float bruto2neto(float b, int d, int u, float t)
{
//t procenat u decimalnom obliku 0.15 = 15%
float n;
float p = 1 - t + d * 0.05 + u * 0.04;
n = b * p;
return n;
}
void main()
{
int o;
do
{
system("cls");
cout << "1. Mostar (15%)";
cout << "2. Banja Luka (17%)"... |
b425170a388be60a1c7ca19b294c863bd6a663c7 | fdcdae9a05e862b29fcdcaf8a5defce6d1a77ca4 | sohelarman1100/Linked-List | /creating stack by linked list.cpp | C++ | cpp | 1,029 | no_license | #include<bits/stdc++.h>
using namespace std;
struct node
{
int value;
struct node* point;
};
struct node* head;
struct node* temp;
struct node* last;
int sz=0,n;
void Push(int x)
{
sz++;
if(sz>1)
{
temp=(struct node*)malloc(sizeof(struct node));
temp->point=head;
}
temp->val... |
d52cb28fe1219be7e84b9e11a38bd8046dac3b43 | ecb505e2bf36483c49ed022ff57c22c20a5a0cc0 | andrew-nechai/c-labs | /1/1.1.cpp | C++ | cpp | 770 | no_license | //Нечай Андрей
//24.Дан массив из N вещественных чисел. Переписать все его элементы в обратном порядке.
#include <conio.h>
#include <string.h>
#include <stdio.h>
#include <iostream>
void task(float *mas, int n){
int i,n2;
float buf;
n2 = n - 1;
n = n/2;
for (i=0; i<n; i++) {
buf = *(mas+i);
*(mas+i) = *(... |
27802dcfdfca4bd299f3e27ebc4bc8e28448fb07 | add1f339294323b60ce01ff8cd60115729affba6 | paandahl/tripfinger-ios | /geometry/geometry_tests/mercator_test.cpp | C++ | cpp | 2,839 | permissive | #include "base/SRC_FIRST.hpp"
#include "testing/testing.hpp"
#include "geometry/mercator.hpp"
#include "base/math.hpp"
#include "base/macros.hpp"
#include "base/logging.hpp"
UNIT_TEST(Mercator_Grid)
{
for (int lat = -85; lat <= 85; ++lat)
{
for (int lon = -180; lon <= 180; ++lon)
{
double const x... |
e1bb4d15ed27c7aeff7e9068a9764dc3ee67c083 | 50df5e8ce161686c48e1f076190fa623c9bf7958 | MarineBaron/Piscine_CPP | /D06/ex01/main.cpp | C++ | cpp | 2,473 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... |
a18f1c19fecca1454b924bf85a8d95d214ca83c5 | 3aff6d346c7e40c1a8b59cd7d50d7e7b966ce6f3 | jnmaloney/PesimTemplate | /main.cpp | C++ | cpp | 1,823 | no_license | #include <stdio.h>
#include "graphics.h"
#include "RenderSystem.h"
#include "RenderQueue.h"
#include "WindowManager.h"
#include "MenuManager.h"
#include "imgui.h"
// #include "imgui_impl_glfw.h"
// #include "imgui_impl_opengl3.h"
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#include <emscripten/html5.h>
#endif
#includ... |
f29f7a0208169018793ab4f4dc693bfc93ae5f26 | 69581989862bb36f08f333da1c9670fe8f4215f5 | weltling/parle | /lib/parsertl14/include/parsertl/state_machine.hpp | C++ | hpp | 6,511 | permissive | // state_machine.hpp
// Copyright (c) 2014-2023 Ben Hanson (http://www.benhanson.net/)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef PARSERTL_STATE_MACHINE_HPP
#define PARSERTL_STATE_MACHINE_HPP
... |
4c7b3f6379e2694a3cd597d031eec4ccd473322a | 9bc2d2ea69081769879e201cfc0907ac249b1287 | AdrianGuo/MQTT-hc | /Libraries/Event.hpp | C++ | hpp | 583 | no_license | #ifndef EVENT_HPP_
#define EVENT_HPP_
#include "Typedefs.h"
#include "Locker.hpp"
#define WAIT_INFINITE (-1)
#define WAIT_IMMEDIATE (0)
typedef pthread_cond_t event_t;
typedef event_t* event_p;
class Event : public Locker {
private:
event_p m_pEvent;
u8_t m_byWaitingThreads;
bool_t m_... |
66aab928960c25e671051f02201a171cc3a78189 | 84c7a7a00d4bd931f9daaab71d1620759534c551 | violetForeden/chromium | /chrome/browser/ash/login/login_api_data_for_next_login_attempt_pref_cleaner.cc | C++ | cc | 1,138 | permissive | // Copyright 2021 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/ash/login/login_api_data_for_next_login_attempt_pref_cleaner.h"
#include "chrome/browser/browser_process.h"
#include "chrome/com... |
006ccc0382a0d4316710d79af4443b614fc656d1 | 45097421b067f37f6687eb08456f45996ffd87f5 | Da-Huang/Top-S | /Lint/Minimum Size Subarray Sum.cc | C++ | cc | 349 | no_license | // #redo
int minimumSize(vector<int> &nums, int s) {
int i = 0, j = 0;
int sum = 0;
int ans = -1;
while (i < (int)nums.size()) {
if (j < (int)nums.size() && sum <= s)
sum += nums[j++];
else
sum -= nums[i++];
if (sum >= s) {
if (ans == -1 || ans > j - i) {
ans = j - i;
... |
e7b38661b842971535741dbcdf67abcb2e1c64be | b65cf51667c0929446283906e63ea4da26aa3d08 | itlbv/qor | /src/ai/btree/Behavior.cpp | C++ | cpp | 253 | no_license | #include "Behavior.h"
Behavior::Behavior(const char *name_a, BTreeNode *root_a)
: name_(name_a),
root_(root_a) {}
BTreeStatus Behavior::run(Mob &m) {
return root_->run(m);
}
const char *Behavior::getName() {
return name_;
}
|
7845df7522802572d67f0fc498a7474b9e6fabcb | 01d430dd9918085508be1da28c3290b3f8188f3f | da475/ece4960-hp-da475 | /Jan18_week01/test_inf_nan.cpp | C++ | cpp | 1,133 | no_license | #include <iostream>
#include <cmath>
using namespace std;
static void isPosInf(double num)
{
if(signbit(num) == 0 && isinf(num) == 1)
cout << num << " is positive infinity" << endl;
else
cout << num << " is not positive infinity" << endl;
}
static void isNegInf(double num)
{
if(signbit(num) == 1 &&... |
898708ed5a81c779c3c3d0ad4ec43f1d7e840f25 | b1af732879e35f571b7dc9d3dea8661737219e93 | my697020/objProject | /11周实验题一/MainFrm.cpp | C++ | cpp | 1,877 | no_license |
// MainFrm.cpp : CMainFrame 类的实现
//
#include "stdafx.h"
#include "第十一周实验一.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
static UINT indica... |
028fc8238c6cf36b448686a0b4c29107124f5a49 | e1c3dbf53167cddeb04e7d9316cf119a58af0240 | grayhacker91/Algorithm | /beajoon/11055/main.cpp | C++ | cpp | 459 | no_license | #include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
int A[1000] = { 0, };
int sum[1000] = { 0, };;
for (int i = 0; i < n; i++) {
cin >> A[i];
sum[i] = A[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (A[i]>A[j] && sum[i] < sum[j]+A[i]) {
sum[i] = sum[j] + A[... |
0aabfd489613f8dadf98b4c6e3fb20278e9e2504 | d0b24526611b8516d4bfc1824ff0b40272d0c842 | hannahlawrence/sinctransform | /helper/directsinc.hpp | C++ | hpp | 983 | permissive | #ifndef __sincdirect__hpp__included__
#define __sincdirect__hpp__included__
void directsinc1d(int ifl,int numlocs,int numeval,double *a1,double *klocs, complex<double>* q,complex<double> *ans);
void directsincsq1d(int ifl, int numlocs,int numeval,double *a1,double *klocs, complex<double>* q,complex<double> *ans);
void... |
8975d2cd6d3b1856202c1d850a608b543dd286d4 | 27e9e124fcee6f3d001cd1ba3ff803da7012678f | kuym/burning-man | /Audio/firmware/signalgen.cpp | C++ | cpp | 1,286 | no_license | #include <GalagoAPI.h>
#include <LPC13xx.h>
using namespace Galago;
unsigned int System_divideClockFrequencyRounded(unsigned int n, unsigned int d);
int main(void)
{
system.setCoreFrequency(72000000UL);
// timer shutdown
*LPC1300::Timer1Control = LPC1300::TimerControl_Reset;
*LPC1300::Timer1MatchControl = 0;
... |
f2e69ac4818f69df501484c2e5f3197d8a3fd176 | b0cf8a66ce3dbfd132047419bf2cba7efa30f79b | Rumpa06/14-06-codes | /swans and eggs'.cpp | C++ | cpp | 368 | no_license | #include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int age[n];
int temp=0;
int count=0;
if(n>=0)
{
for(int i=0;i<n;i++)
{
cin>>age[i];
if(age[i]<=0)
{
count++;
}
if(age[i]>0 && count==0)
{
for(int j=1;j<=4;j++)
{
if(age[i]>=52)
{
temp+=4;
}
age[i]++;
}
}
}
cou... |
dd0c894d618542b0573b6e19e261ea8bb11d90ee | ed4878338a5db032d02113e50c13873d03a619da | Xeltania/Advanced-Shaders | /Terrain/Terrain/src/Shader.cpp | C++ | cpp | 7,927 | no_license | #include <shader.h>
Shader::Shader(const char* vertexPath, const char* fragmentPath, const char* geometryPath, const char* tessControlPath, const char* tessEvalPath)
{
// 1. retrieve the vertex/fragment source code from filePath
std::string vertexCode;
std::string fragmentCode;
std::string geometryCode;
std::stri... |
476704341ff538beadf11bd94613f32013083c8b | 8136716d66f535196f23410bb18a225daa77e638 | unknownbrackets/maxcso | /7zip/CPP/7zip/Common/StreamObjects.cpp | C++ | cpp | 7,003 | permissive | // StreamObjects.cpp
#include "StdAfx.h"
#include <stdlib.h>
#include "../../../C/Alloc.h"
#include "StreamObjects.h"
STDMETHODIMP CBufferInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
if (processedSize)
*processedSize = 0;
if (size == 0)
return S_OK;
if (_pos >= Buf.Size())
ret... |
40aa594d58adaf90a63582d078b591d1365f7233 | d646c10dc900f4965ddf51c74a199dce7088d123 | WillowOfTheBorder/boost.simd | /test/function/simd/frexp.cpp | C++ | cpp | 1,374 | permissive | //==================================================================================================
/*!
@file
Copyright 2016 NumScale SAS
Copyright 2016 J.T. Lapreste
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/... |
75b789ca1724579a68d6c3bd7156ee31649eda12 | f8d1cfd64835d5864f239b8525672a037f0060c2 | bluekidds/jtorch | /tests_jtorch/src/main_jtorch_test.cpp | C++ | cpp | 11,969 | no_license | // THE CPP FUNCTIONALITY HERE IS TO BE TESTED AGAINST "jtorch_test.lua" SCRIPT
#include <stdlib.h>
#include <cmath>
#include <thread>
#include <iostream>
#include <limits>
#include "jtorch/torch_stage.h"
#include "jtorch/jtorch.h"
#include "jtorch/tensor.h"
#include "jtorch/spatial_convolution.h"
#include "jtorch/spat... |
dae4a71661590f0c0cdaa0595d36c2a3ac0baa87 | bebc018f2577c4f969268a4da02f4492e2c9a72d | leizton/protobuf | /adoc/src/trivial.cc | C++ | cc | 609 | no_license | // 获取当前程序的运行目录的绝对路径
// #include <unistd.h>
bool GetRuntimeAbsolutePath(std::string& path) {
char buffer[PATH_MAX];
int len = readlink("/proc/self/exe", buffer, PATH_MAX);
if (len <= 0) {
return false;
}
path.assign(buffer, len);
size_t pos = path.find_last_of("/\\");
if (pos == std::string::npos || po... |
27fa35d6179d4e548df187cd84d285038866c8bf | a5efb42d284e9c90eb8c616ecd98b3cb4e080410 | viswana/algorithms-datastructs | /problems/epi/BinarySearchTrees/BstFromPreorder.cpp | C++ | cpp | 1,982 | no_license | #include <iostream>
#include "utils.h"
#include <vector>
#include <limits>
#include <queue>
using namespace std;
template <typename T>
btnode<T>* BstFromPreorderHelper(vector<T>& preorder, int lo, int hi) {
if (!preorder.size() || lo > hi) return NULL;
btnode<T>* root = new btnode<T>(preorder[lo]);
int leftTreeE... |
7de6df3d824cf84b4e54ec117e34b743012cec38 | 39ca5752b8e4a189477b787fb5e8a54e8fcf4f4a | uel-dataexchange/Opencascade_uel | /src/Xw/Xw_WidthMap.cxx | C++ | cxx | 2,804 | no_license |
#include <Xw_WidthMap.ixx>
#include <Aspect_WidthOfLine.hxx>
// Routines C a declarer en extern
//extern "C" {
#include <Xw_Cextern.hxx>
//}
//-Static data definitions
static char *ErrorMessag ;
static int ErrorNumber ;
static int ErrorGravity ;
static XW_STATUS status ;
Xw_WidthMap::Xw_WidthMap ()... |
4456a89f74d48ae345eff9d5eded5296e8684054 | a267eeef743292c128f07ded75130294785d0965 | nbalfour/antelope_contrib | /bin/location/cluster/cluster.cc | C++ | cc | 8,826 | no_license | #include "stock.h"
#include "coords.h"
#include "arrays.h"
#include "db.h"
#include "elog.h"
#include "pf.h"
#include "gclgrid.h"
#include "glputil.h"
void usage()
{
cbanner("$Revision$ $Date$",
"db [-savenull -v -pf pfname]",
"Gary Pavlis",
"Indiana University",
"pavlis@indiana.edu") ;
elog_die(0,"Exit on u... |
72ad11a0d0f2d60cb0015245ac4a1c4e5e9ea809 | e5c51faf7024b715a4857fddb3dae887419f08b9 | Ganz7/ns3_802.11aa | /examples/wireless/EDCA_AODV_a.cc | C++ | cc | 20,034 | no_license | /**
* CONFIGURATION:
* Node id: node0 _____ node1 _____ node2
* IP address 10.0.0.1 10.0.0.2 10.0.0.3
* Position Vector (code lines ~335) (0,0,0) (50,0,0) (100,0,0) meters
* Tx Power (code lines ~375) 40 mW 40 mW 40 mW = 16.0206 dBm
*
* INFORMATION/PURPOSE:
* Distances b... |
9a9d914be717a09fdf70ccd651bd80d7ca5b4199 | b226994a8c5e5c94f5ed98fb6f07fb4c8111d4c5 | ccdxc/logSurvey | /data/crawl/collectd/hunk_359.cpp | C++ | cpp | 1,483 | no_license | }
if (total_num == 0)
- average = NAN;
- else
- average = total / total_num;
- printf ("%lf average |", average);
- for (i = 0; i < values_num; i++)
- printf (" %s=%lf;;;;", values_names[i], values[i]);
-
- if (total_num == 0)
+ {
+ printf ("WARNING: No defined values found\n");
return (RET_WARNING);
+ }
... |
fe2d6f50090b9edc4767fe9d8b1f65f5d69d2df1 | d11458b2ee4413268f6839b1f24a2dd8c74a9135 | jhuber6/qcor | /handlers/token_collector/pyxasm/pyxasm_token_collector.hpp | C++ | hpp | 476 | permissive | #pragma once
#include "token_collector.hpp"
namespace qcor {
class PyXasmTokenCollector : public TokenCollector {
public:
void collect(clang::Preprocessor &PP, clang::CachedTokens &Toks,
std::vector<std::string> bufferNames,
std::stringstream &ss, const std::string &kernel_name) overri... |
eda604fb5955dd73bb4c0c4bfa4d2d99b3e0248e | 45b81410d4f6d527e779c62f5b53290ad19d75a4 | eshikafe/wxSynfig | /src/studio/gui/widgets/widget_keyframe_list.cpp | C++ | cpp | 16,526 | no_license | /* === S Y N F I G ========================================================= */
/*! \file widget_keyframe_list.cpp
** \brief A custom widget to manage keyframes in the timeline.
**
** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2007 Chris Moore
** Copyright (c... |
79bc4afd39c157e0c0a24a7c69caf09b055847ab | b1caeb2c49e0501509dacafcabd14014eb6bac69 | metux/chromium-suckless | /third_party/openh264/src/codec/decoder/core/src/parse_mb_syn_cavlc.cpp | C++ | cpp | 48,711 | permissive | /*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* 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 abo... |
df399ed40b4e3b29d968b26114d7537cc097e628 | 38a50ad9bd1e0a216f587109ccfd13d001cd6b21 | Tiger20111/Biometry | /demonstration/camera.cpp | C++ | cpp | 739 | no_license | #include "camera.h"
#include <ctime>
void Camera::recordVideo(double time) {
VideoCapture vcap(0);
if (!vcap.isOpened()) {
cout << "Error opening video stream or file" << endl;
return;
}
int frame_width = vcap.get(CV_CAP_PROP_FRAME_WIDTH);
int frame_height = vcap.get(CV_CAP_PROP_FRAME_HEIGHT);
VideoWriter v... |
ffd0bb8f5f3218daf2eb858fb7a339b23d01ce52 | 1295f85d512559a2e55f0f8974d0fceeddb7b813 | niuxu18/logTracker-old | /second/download/squid/gumtree/squid_repos_function_2227_squid-3.1.23.cpp | C++ | cpp | 1,519 | no_license | static void
idnsSendQuery(idns_query * q)
{
if (DnsSocketA < 0 && DnsSocketB < 0) {
debugs(78, 1, "WARNING: idnsSendQuery: Can't send query, no DNS socket!");
return;
}
if (nns <= 0) {
debugs(78, 1, "WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!");
retu... |
6a9079b25fce23d6beca1bbd1d7ed9cfb4b550a3 | c61e9b4fedb1b042e29ddc66dcf0515bedb677f3 | devSoyoung/algorithm-study | /InputOutput/baekjoon_2741.cpp | C++ | cpp | 352 | no_license | // endl로 개행을 출력하면 시간초과가 뜸
// endl은 느리기 때문에, 개행이 필요하면 \n을 사용하자
// 참고링크 : https://www.acmicpc.net/board/view/21731
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << i << "\n";
}
return 0;
} |
819e2098269b50effc437fc24507fcc8f11e23c5 | a35d3e405a4afe2781d35dc41f3487805f61ab47 | gobytecoin/gobyte | /src/pow.cpp | C++ | cpp | 6,179 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <pow.h>
#include <arith_uint256.h>
#include <chain.h>
#include <chainpa... |
d6a423ea8770ae7eada902ee312925e15a9d32f3 | 05fbfa90aaa8a5482a1aa91ef1ae9972f26acde2 | mittalprince/Everyday-Stuff | /c++/HackerEarth/litle-monk-and-edge-count.cpp | C++ | cpp | 1,172 | no_license | /* Probelm statement link -->
https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/little-monk-and-edge-count/
*/
#include<iostream>
#include<list>
#include<vector>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
struct node{
... |
15e3c65acc0616db2cd2c258fe0e1e7dbe46d14b | 54e017a5f82f62df10e111419f731d03938240eb | niuxu18/logTracker-old | /second/download/curl/gumtree/curl_new_log_181.cpp | C++ | cpp | 563 | no_license | puts(
" late the result.\n"
"\n"
" size_download The total amount of bytes that were\n"
" downloaded.\n"
"\n"
" size_upload The total amount of bytes that were\n"
" uploaded.\n"
"\n"
" size_h... |
caa9ff0f7ae2e15528fe32956c33f6347944f78a | ef95dab504e433653c99ccfdeae0625df62aae10 | gitrahulgit/C-programs | /123WHILE.CPP | C++ | cpp | 870 | no_license | /*********************************************************************
KRISHNA KANT DUBEY
Sec-2,Hanuman mandir,Bhilai
( C.G.) 490 006 Mob.: 9893038337
**********************************************************************
Project No.-
Program for the following Output ( using while loop.) :
1
12
... |
f1ef217e8cc04be7ff7e837908fd900f65dc7484 | 06cf40990cb516e9d08bce858b1b72c17bf71bd2 | adityagupta1089/ComputeLibrary | /src/core/GLES_COMPUTE/kernels/GCArithmeticAdditionKernel.cpp | C++ | cpp | 6,317 | permissive | /*
* Copyright (c) 2016-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... |
f33606b67c3ae10bf0408eeca594d54f51b6cd41 | bba70f51b7263e7c6f0edfb367ec2800eecbb56e | rajnishgeek/DSandAlgorithmPracticeSolution | /Dynamic Programming/length-of-longest-subsequence.cpp | C++ | cpp | 969 | no_license | /*
Given an array of integers, find the length of longest subsequence which is first increasing then decreasing.
**Example: **
For the given array [1 11 2 10 4 5 2 1]
Longest subsequence is [1 2 10 4 2 1]
Return value 6
*/
in longestSubsequenceLength(const vector<int> &A)
{
int n = A.size();
vector<int> lis(n, 1... |
d2fb70bb8b4c8526329aefe2a5f2041f99b780f8 | 4a59dc2f138ec3c6cabd451ac30560f5f66d70b7 | mark-fox/BattleTank_Game | /BattleTank/Source/BattleTank/Private/TankMovementComponent.cpp | C++ | cpp | 1,285 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "TankMovementComponent.h"
#include "TankTrack.h"
void UTankMovementComponent::Initialise(UTankTrack* LeftTrackToSet, UTankTrack* RightTrackToSet) {
LeftTrack = LeftTrackToSet;
RightTrack = RightTrackToSet;
}
void UTankMovemen... |
b940476d8d14ba238933fd054356e8dbfe2f32ae | e43deefd8f240e90b19212c3d15eecde170c2147 | snowflakedb/libsnowflakeclient | /deps/boost-1.75.0/libs/interprocess/test/upgradable_mutex_test.cpp | C++ | cpp | 6,023 | permissive | //////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2004-2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interpr... |
c7beafb156e8133fd14410fae116247f7a8b85b5 | 12a87e4901ce023b28aba454a3822e0817bca856 | xiaoyaolanyun/QPanda-2 | /test/QPanda.Core.test/QPanda-2.0.Core-test.cpp | C++ | cpp | 5,465 | permissive | #include <iostream>
#include <limits>
#include "ClassicalCondition.test.h"
#include "Utilities/OriginCollection.h"
#include "QPanda.h"
USING_QPANDA
using namespace std;
TEST_F(ClassicalConditionTest, testClassicalConditionADD)
{
auto c1 = m_qvm->Allocate_CBit();
auto c2 = m_qvm->Allocate_CBit();
c1.set... |
630829b4e3a88bcab9af9ca959ae2dea7e5e4776 | 18eae2748143059e27583b00d32a5059b6d6aa34 | khoapham12397/CodeForces | /1253E1.cpp | C++ | cpp | 1,495 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef pair<int, int> ii;
typedef pair<int, ii> i3;
typedef long long ll;
int n,m;
int dp[81][100010];
ii a[81];
void solve() {
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i].first >> a[i].second;
}
sort(a, a + n);
dp[0][... |
73986f5c0017769f8ad71d8673f1ca5a5c493b10 | 07399da166f462db5b01c97b9608670b66767326 | amsraman/Competitive_Programming | /15-295/F21/Contest 13/F.cpp | C++ | cpp | 1,653 | no_license | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll n, m, x, y, vx, vy;
ll egcd(ll a, ll b, ll &x, ll &y) {
if(b == 0) {
x = 1, y = 0;
return a;
}
ll res = egcd(b, a % b, y, x);
y -= (a / b) * x;
return res;
}
int main() {
cin >> n >> m >> x >> y >> vx >> v... |
4c2eca77e3daa124bbd231eba50d7ccfbd6c8034 | 9d655e6685aa772bdb6305e8c544036eb35302d3 | eyangch/competitive-programming | /Codeforces/1285/b.cpp | C++ | cpp | 888 | permissive | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int T;
ofstream fout("b.out");
cin >> T;
for(int testcase = 0; testcase < T; testcase++){
ll N, c[100000], total = 0, tmax = INT_MIN, current;
cin >> N;
for(int i = 0; i < N; i++){
cin >... |
637ac3d4ed502dc9a295db2f5fbbf79c54815b41 | ace98fdf6e837c679a93cb87e3eb099f4dea6c6c | bino7/chromium | /base/trace_event/trace_event_unittest.cc | C++ | cc | 120,256 | 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 "base/trace_event/trace_event.h"
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <cstdlib>
#include <memory>
#include <u... |
b9fe3a94b555b17fa4d69b7b2609044ba043695e | 74ad1c8f9139a370182274a0c868b53953fbc40a | oshiroy/jsk_recognition | /jsk_pcl_ros/src/organized_multi_plane_segmentation_nodelet.cpp | C++ | cpp | 35,446 | no_license | // -*- mode: C++ -*-
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, Ryohei Ueda and JSK Lab
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted pr... |
f2b7c327226232e211d7edbe3eb6cb89c5fbdbd5 | 2dd4ba725c05cb1a602d1390884fcece46ccff14 | NewSpring/Apollos | /ios/Pods/boost/boost/test/utils/runtime/parameter.hpp | C++ | hpp | 1,154 | permissive | // (C) Copyright Gennadiy Rozental 2005-2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
a673e9667af766f6688325e633cf8e2a894607c2 | 63d6b9a0cc2d69a6dc17547aa0df6f52ae79a8c4 | willimjian/Browser | /Browser/BrowserUI.cpp | C++ | cpp | 12,758 | no_license | #include "StdAfx.h"
#include <sstream>
#include <string>
#include <ShellAPI.h>
#include <iphlpapi.h>
#include "Browser.h"
#include "BrowserUI.h"
#pragma comment(lib,"Iphlpapi.lib")
enum client_menu_ids
{
CLIENT_ID_REFRESH = MENU_ID_USER_FIRST,
CLIENT_ID_SAMPLE,
};
CBrowserHandler::CBrowserHandler(CBr... |
4ecc07f47a665981937a3b1e609cc2fbbca0dfb9 | 337620d094324f6116ecd46e30cff1dff6100df4 | sl424/hunting-game | /game.cpp | C++ | cpp | 7,397 | permissive | /***************************************************
* Program Filename: game.cpp
* Author: Chewie Lin
* Date: 12 Mar 2016
* Description:game class functions
***************************************************/
#include "game.hpp"
/*****************************************
* Function: game()
* Description: defa... |
ae2328ea188d7fc4dc3ede4ae704733408d5d16d | 21a767d75ef5403bafeb35219302e9c55c7b6e17 | ailnk0/pdfium | /fxjs/xfa/cjx_model.cpp | C++ | cpp | 3,090 | permissive | // Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fxjs/xfa/cjx_model.h"
#include <vector>
#include "fxjs/js_resources.h"
#include "fxj... |
897c580b11d58f41d523caec1859d13749dc8ce2 | 9d70677731d797e3953a9de2b1cb717f2b5c4e54 | felipepolido/clmclogger | /example/RosExamplePublisher.cpp | C++ | cpp | 522 | no_license | #include "ros/ros.h"
#include "std_msgs/Float64.h"
#include <sstream>
int main(int argc, char **argv)
{
ros::init(argc, argv, "number_publisher");
ros::NodeHandle n;
ros::Publisher inc_pub = n.advertise<std_msgs::Float64>("chatter", 1000);
ros::Rate loop_rate(100);
double data = 0;
std::cout << "Publish... |
2d92b914ef64cb093c2c756dfa7ef7661ca7a84e | b512ae0d1fef8c2041e1dfab92aebbac65817ad0 | marc-beauchesne/metaProgrammingFun | /metaProgrammingFun/metaProgrammingFun.cpp | C++ | cpp | 379 | no_license | // metaProgrammingFun.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "standAlones\factorial.h"
#include <iostream>
using namespace std;
int main()
{
const int valToFac = 10;
const int facVal = factorial<valToFac>::retVal;
cout << "Factorial of " << valToFac << " = " << f... |
46955a6bbbe8ca0630233661b1bfc98ad88d5c5f | 276b2d0bcbeac12f75b5166fe5ecb72a008d606f | liuq901/code | /POJ/p_3385.cpp | C++ | cpp | 421 | no_license | #include <cstdio>
#include <cstdlib>
int a[100010];
int main()
{
int n,d;
scanf("%d%d",&n,&d);
for (int i=1;i<=n;i++)
{
int x;
scanf("%d",&x);
a[x]++;
}
int ans=0;
for (int i=0;i<=n;i++)
{
if (a[i]<=d)
continue;
while (a[i]>d)
{
ans+=a[i]/d;
... |
c1d6441c6027012c34d35cdc63f41b4628fceb86 | 3bf3384627b1d127da30edc00c69d015fe17e0e5 | FikkleG/cheaterPyControler | /cheetah-gym/cheetah_gym/envs/lcmTypes/cpp/control_t.hpp | C++ | hpp | 5,070 | no_license | /** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY
* BY HAND!!
*
* Generated by lcm-gen
**/
#ifndef __control_t_hpp__
#define __control_t_hpp__
#include <lcm/lcm_coretypes.h>
#include "spi_command_t.hpp"
class control_t
{
public:
int8_t reset;
/// true to reset the simulation ... |
946e17c213da762233ca748f32a09622f7267151 | f590a9c807369426dc3ad3d33caee19e77a8160a | thezha/TIM-VX | /src/tim/vx/ops/relational_operations_test.cc | C++ | cc | 10,985 | permissive | /****************************************************************************
*
* Copyright (c) 2021 Vivante Corporation
*
* 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 ... |
ab2bb6d36ca59098367171c524c7b4dddfd550db | 249c02473f243fd0d597bb16e01c50ba5fecec11 | wtksyjpy/C-Practise | /WordCount/WordCount/main.cpp | C++ | cpp | 452 | no_license | //
// main.cpp
// WordCount
//
// Created by Hank on 11/23/14.
// Copyright (c) 2014 Hank. All rights reserved.
//
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main(int, char **) {
map<string, int> dict;
string s;
while(cin>>s)
++dict[s];
map<string, int>:... |
596de964cea3825f755e14419c72541e91e14c32 | 5f126a8cf81d8f8f3f616a72c1b44faef4e0edab | ShellAlbert/deploy-tx2 | /p16_no_gui/rtsp/net/poller/EPollPoller.cpp | C++ | cpp | 2,642 | no_license | #include <assert.h>
#include <unistd.h>
#include <string.h>
#include "rtsp/net/poller/EPollPoller.h"
#include "rtsp/base/Logging.h"
static const int InitEventListSize = 16;
static const int epollTimeout = 10000;
EPollPoller* EPollPoller::createNew()
{
return new EPollPoller();
}
EPollPoller::EPollPoller() :
... |
4b0698b2ac52f8b84afb5182af3f79b571e0d637 | 844b7436b2861f681c3e5c150981022a1cc2004c | zhouwei-jxau/Examination-Exercise-System | /Exam/Login.cpp | C++ | cpp | 6,269 | no_license | #include "stdafx.h"
#include "Login.h"
Login::Login()
{
this->imageHeadpartrait = new QLabel();
this->imageHeadpartrait->setPixmap(QPixmap(SystemVariable::RESOURCEPATH+QString::fromLocal8Bit(SystemVariable::THEMEPATH)+SystemVariable::ICONPTH+QString::fromLocal8Bit("headpartrait.jpg")));
this->imageHeadpartrait->se... |
139f62b6be009f99273c2d8fb41743d7b94518d4 | 298e7c3117da239bdced9c2c831a99a8435753e5 | sunjing0420/ofweek1-JingSun | /src/ofApp.cpp | C++ | cpp | 3,142 | no_license | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(0, 0, 0);
for(int i=0; i<1000; i++){
newPos[i] = ofVec2f(ofGetWindowWidth() / 2+50*(2*cos(i*0.1)-cos(i*0.2)), ofGetWindowHeight() / 2+ 50*(2*sin(i*0.1)-sin(i*0.2)));
Pos[i... |
1c28a8f2a291a5dfd2626e2f8b06eb9059278dae | 305dcd278712105b1a3208d86d8236346d611887 | dolpstar/ZLMediaKit | /src/Extension/H265Rtp.cpp | C++ | cpp | 10,694 | permissive | /*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
... |
78002bc694803529ec685deda82ce278ead5351f | 1e9bcff498ba429e9588227b088d3ee64b1a2b78 | pdarb/finalProject | /TAMS/Transportation/Plane.hpp | C++ | hpp | 583 | no_license | #ifndef _PLANE_HPP_
#define _PLANE_HPP_
#include "Route.hpp"
#include "Ticket.hpp"
#include "TransportationFactory.hpp"
#include "ConcreteRoute.hpp"
#include "ConcreteTicket.hpp"
#include "Transportation.hpp"
class PlaneEconomy : public TransportationFactory {
public:
Transportation* generate() {
... |
26fe548bbd1a8f946dea113932846da33dea701a | f4b25116c0836e5b145ace2d63f87ec52bd8233f | romange/gaia | /examples/movies_join.cc | C++ | cc | 8,166 | permissive | // Copyright 2019, Beeri 15. All rights reserved.
// Author: Roman Gershman (romange@gmail.com)
//
// Example MR that processes movies dataset dataset:
// https://www.kaggle.com/rounakbanik/the-movies-dataset/
#include <rapidjson/error/en.h>
#include <re2/re2.h>
#include "base/init.h"
#include "base/logging.h"
#incl... |
ad07304dabd87afab5aa75f269fc21954a495300 | 2de2b1203e7500d7eae848c571e83aff1dc0674e | ddcc/rr | /src/RecordCommand.cc | C++ | cc | 26,161 | permissive | /* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
#include "RecordCommand.h"
#include <linux/capability.h>
#include <spawn.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <sysexits.h>
#include <time.h>
#include "preload/preload_interface.h"
#include "Flags.h"
#include "Record... |
a950bf8943e50beea50f3195eb10d3c18f403b63 | 3d90c2741ba23a4d5400dc10aba95282f3851a6c | shas9/codehub | /Codeforces/Round/Round 725/B.cpp | C++ | cpp | 1,022 | no_license | // Lights will guide you home
#include <bits/stdc++.h>
#define slld(longvalue) scanf("%lld", &longvalue)
#define ll long long
#define pll pair < ll, ll >
#define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define bug(x) printf("BUG %lld\n", x)
#define pb push_back
#define mxlld LLONG_MAX
#... |
e01496054721ced59e611ae6f394f373878043d0 | b393c35112f6566b46be32deadf46819281f6272 | Actinium-project/Actinium-ng | /src/wallet/walletdb.cpp | C++ | cpp | 49,103 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/walletdb.h>
#include <fs.h>
#include <key_io.h>
#include <proto... |
b9af312e18ac09143e83e7270788d0bcbba99487 | 6dfe2a3d44f79f0093fc15bc94aa26a3919fc370 | wmamunhossain/competitive-programming | /Recursion and Backtracking/codeforces 22-May.cpp | C++ | cpp | 848 | no_license | #include<bits/stdc++.h>
using namespace std;
int N;
int col[7];
int par[7];
int tbl[7][7];
int ans;
int get()
{
int sum = 0;
for(int i=0; i<=N-2; i++)
{
for(int j=i; j<N-1; j+=2)
{
sum+=tbl[par[j]][par[j+1]];
sum+=tbl[par[j+1]][par[j]];
}
}
return sum... |
bde62ba713ccb1d216e50677c4ddce1d90002e63 | 997ad738d24b7e9a69c872e1c1f33deb7c620e63 | xyuan/fuchsia | /src/devices/testing/fake-object/test/fake-object-test.cc | C++ | cc | 5,796 | permissive | // Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/fake-object/object.h>
#include <lib/zx/event.h>
#include <lib/zx/vmo.h>
#include <zircon/rights.h>
#include <array>
#include <climits> // P... |
b1081ab35bfff06092e72a76d64b486de5b2675c | 1828617f6ba53942a7556213851ebd8a10387fcd | district10/matplotplusplus | /examples/appearance/colormaps/colormap/colormap_3.cpp | C++ | cpp | 221 | permissive | #include <matplot/matplot.h>
int main() {
using namespace matplot;
auto [x, y, z] = peaks();
surf(x, y, z);
colormap(palette::summer());
colormap(palette::default_map());
wait();
return 0;
} |
88140af29113e81d750ae70614795e912192f9ef | 3a452c2c51a5b8772fe305e3d2d51ada552c2408 | kitesoft/Roomer-PMS-1 | /Extras/DevExpress VCL/Library/RS17/Win64/cxSchedulerTimeGridView.hpp | C++ | hpp | 56,149 | no_license | // CodeGear C++Builder
// Copyright (c) 1995, 2012 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'cxSchedulerTimeGridView.pas' rev: 24.00 (Win64)
#ifndef CxschedulertimegridviewHPP
#define CxschedulertimegridviewHPP
#pragma delphiheader begin
#pragma option push
... |
fbe063e9927aafad75b5e9e9d02578c4b74eeafc | e35189a84080692a59dd36794856c9ef62e59d34 | ZackSungy/Learn-C-Language | /HeavySetArray/main.cpp | C++ | cpp | 583 | no_license |
#include<stdio.h>
void f(int n, int *P, int *A, int cur)
{
int i, j;
if (cur == n)
{
for (i = 0; i < n; i++)
printf("%d ", A[i]);
printf("\n");
}
else
for (i = 0; i < n; i++)
if (!i || P[i] != P[i - 1])
{
int c1 = 0, c2 = 0;
for (j = 0; j < cur; j++)
if (A[j] == P[i])
c1++;
for (j = 0; j < ... |
b8f3cbf2b8482da41c9f3adac5b4a64481730fa4 | 9e3e7456f2ec6bd52ee4689b771ba302ac70d6a2 | enzo1982/smooth | /classes/io/drivers/driver_socket.cpp | C++ | cpp | 3,543 | permissive | /* The smooth Class Library
* Copyright (C) 1998-2019 Robert Kausch <robert.kausch@gmx.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of "The Artistic License, Version 2.0".
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRA... |
ccd65a91ab8f096d794dc20d7e134c59ca224064 | d6bd2ba8c4f156d64e44a0b1b271ae651ed0109f | alennex/2017_project | /qt/shaohsuan@192.168.1.38/lib/alignment.cpp | C++ | cpp | 23,938 | no_license | #include "alignment.h"
Alignment::Alignment() {
using namespace std::placeholders;
icmap00 = {
{ "IC0000", std::bind( &Alignment::IC0000, this, _1, _2, _3, _4) },
{ "IC0001", std::bind( &Alignment::IC0001, this, _1, _2, _3, _4) },
{ "IC0002", std::bind( &Alignment::IC0002, this, _1, _2, _3, _4) },
{ "IC000... |
1f40e4aad4597fee96e1e922b3008f8d69e4482f | cebabb23a8bbb224dd5c0320079f9fc9c1ce96ab | fucoin/fucoin | /src/qt/bitcoingui.cpp | C++ | cpp | 29,670 | permissive | /*
* Qt4 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2012
*/
#include <QApplication>
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "optionsdialog.h"
#include "aboutdialog.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "walletframe.h"
#include "... |
ecc8b7edc9d0235807c070b27c21e19552342d19 | 55a53f3c838a014a6b16fb075480f86ac4cf2d73 | parkjinmyoung/NewRepo3 | /GameFramework/PP15.FSM/main.cpp | C++ | cpp | 845 | no_license | #include<SDL.h>
#include "Game.h"
const float FPS = 60.0f;
const float DELAY_TIME = 1000.0f / FPS;
Uint32 frameStart, frameTime;
int main(int argc, char* argv[])
{
std::cout << "game init attempt...\n";
if (TheGame::Instance()->init("Chapter 13", 100, 100, 640, 480, false))
{
std::cout << "game init success!\n... |
bc1f6bc194a416b7851deedaa212a25557408450 | 75208ea922264b23c1ed2f1f446364ef55a0909b | hashikawau/backups | /study.windows/skeleton.cpp | C++ | cpp | 3,270 | no_license | #include <windows.h>
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
HWND hWnd;
MSG msg;
WNDCLASSEX wc;
LPSTR lpszClassName = "app01.cpp";
LPSTR lpszTitle = ... |
e193e391260502967bdb8ee8bf976f7c6d6b7e32 | 3bc074407a829ccdd402372f84464b69d16541f7 | ajgappmark/KlotskiSGX | /klotski/llvmProgram/llvm/lib/MC/MCCodeView.cpp | C++ | cpp | 21,507 | permissive | //===- MCCodeView.h - Machine Code CodeView support -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
521d11c76178257eb28e9fc4ae498bb924a7a93f | c5f61375b99b68e6fadb1c63a65c1a320cc8fb2d | highfence/HopStep | /HopStep/HopStepTest/CoreObjectTest.cpp | C++ | cpp | 4,678 | no_license | #include "pch.h"
#include "CppUnitTest.h"
#include "..\HopStepEngine\HopStep.h"
#include "..\HopStepEngine\CoreObject\Object\NameTypes.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace HopStepTest
{
TEST_CLASS(HNameTest)
{
public:
TEST_METHOD(HName_DetectTrailingDigitFromStringTest)
... |
5e2b946d20b659611b28a115f10cbfce12b4cca9 | b46fd0a7a3e3feceae637fb23a2e16d6f372b339 | robbinfan/vespa | /searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.cpp | C++ | cpp | 869 | permissive | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bucketsessionbase.h"
namespace proton::bucketdb {
BucketSessionBase::BucketSessionBase(BucketDBOwner &bucketDB, IBucketCreateNotifier &bucketCreateNotifier)
: _bucketDB(bucketDB.takeGuard()),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.