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
197e5660f6baee47fb6220661817c68cf017ebb6
df465f045ba00960e7aec17f95e285687df03d04
DanielFreire1984/course-basic.middle-level.cpp
/017_class.cpp
C++
cpp
1,345
no_license
/** * This file shows a basic example of the * how to building a class objectc in * C++ language. * * @author: Daniel Freire * @date: 03/17/2007 * * Note: In this example is created a class * with three attributes name, cpf and age * as public attribute. */ #include <iostream> #include <string.h> using n...
f7c950dd3176853507ed77d57effe23a58a90592
6a8fb878600ffddb23b84d80d2ede983dd6cffcb
lxmiccio/QtCppExercises
/Cpp/Listing12-1/main.cpp
C++
cpp
262
no_license
#include <iostream> int main() { std::cout << "true = " << true << std::endl; std::cout << "false = " << false << std::endl; std::cout << std::boolalpha; std::cout << "true = " << true << std::endl; std::cout << "false = " << false << std::endl; }
f95e25afef64036df5f39cdd60a6b731d9ad6911
1107034d19e2bebec27073ee451a46ba535dcb3a
horikawahorikawa/gazebo-PR
/gazebo/rendering/Visual.hh
C++
hh
25,394
permissive
/* * Copyright (C) 2012-2015 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
e3cbe59ca9600eaefd37cc66bdc176053f7e7ba0
013da07915a18313052447b74e2882b38939558a
RenShuhuai-Andy/code-for-book-BeginningAlgorithmContests2nd
/第3章/例题/开灯问题.cpp
C++
cpp
454
no_license
#include <stdio.h> #include <string.h> #define maxn 1010 int a[maxn]; int main() { int n,k,first=1;//n盏灯,k个人 memset(a,0,sizeof(a));//0代表关,1代表开 scanf("%d%d",&n,&k); for(int i=1;i<=k;i++)//i代表人 for(int j=1;j<=n;j++)//j代表灯 if(j%i==0) a[j]=!a[j]; for(int i=1;i<=n;i++)//遍历所有灯 if(a[i]) { if(first) f...
35dbde9285cb192cd195563cc5a5aeb4944085db
9dcdfaf0edf98bfb9997e1395e56862d78de8c79
vbadanov/itex-demo
/platform/http/include/http/parser.hpp
C++
hpp
1,702
no_license
#ifndef HTTP_PARSER_HPP_ #define HTTP_PARSER_HPP_ #include <stdexcept> #include <string> #include <utility> #include <http_parser.h> #include <http/message.hpp> namespace http { //=============================================================================== class Parser { public: Parser() = delete; ...
c73f5e7f91db1a90d3b76c7723884a57fab43fc2
a30be30708f503fbfe2f7f3745ac6b84db578097
ilovebob/pat
/甲级/1032. Sharing (25)/1032. Sharing (25)/main.cpp
C++
cpp
696
no_license
// // main.cpp // 1032. Sharing (25) // // Created by 祝暾 on 2017/7/13. // Copyright © 2017年 祝暾. All rights reserved. // #include <cstdio> struct NODE { bool flag; int nextpos; }node[100000]; int main(int argc, const char * argv[]) { int n1,n2,n,a,b; char temp; scanf("%d %d %d",&n1,&n2,&n); ...
737a7f7bde01e6a7a55a7c8c3bd13b3d3f354ca4
8ae2bd2304c1f7bd17f43458c77719b3c5916fc5
wlzhao/nn-merge
/src/distopt.cpp
C++
cpp
5,262
no_license
#include "distopt.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <xmmintrin.h> #include <ammintrin.h> #include <iostream> using namespace std; float DistOpt::L2SqrSIMDExt(const float* vc1, unsigned int loc1, const float* vc2, unsigned int loc2, unsigned int nDim, floa...
3cfbba495338062fd95c8497e34fe0ad23cf1bb5
ebeafad1224cc2ff8b44e111c2804ee2f4a6680d
Alaxe/noi2-ranking
/2017/solutions/C/DPT-VTarnovo/traffic.cpp
C++
cpp
1,095
no_license
#include <iostream> #include <stdio.h> #include <math.h> using namespace std; int n,m,a[640][640],l1,ot; int re(int r1,int r2) { int q1=-1,q2=-1,q3=-1,q4=-1,mi; if(r1==0 || r2==0 || r1==n-1 || r2==m-1)return 0; if(a[r1+1][r2]>=1 && r1!=n-1 ) { l1=1; q1+=re(r1+1,r2)+a[r1+1][r2]+1; } if(a[...
737fbaa85ec2c71e45ef5e39d6b931c6b0fa518a
7019ff6b9c9b8c8e6563c0d4b3da7353419b9750
Sandiagal/colorTagX
/colorTagX/GeneratedFiles/Release/moc_barwindow.cpp
C++
cpp
5,649
permissive
/**************************************************************************** ** Meta object code from reading C++ file 'barwindow.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.1) ** ** WARNING! All changes made in this file will be lost! ***********************************************************...
d5f9aed8f156073e7a8c3913508ed9af2ae4ea9b
8cbef3b2a9534049c16b8ba87ebf8d243aa11a6c
XinJiangQingMang/fight
/my_client/MyShell/DlgProIntro.cpp
C++
cpp
3,528
no_license
//********************************************************** // ´úÂë±à¼­Æ÷ //********************************************************** // DlgProIntro.cpp : implementation file // #include "stdafx.h" #include "myshell.h" #include "DlgProIntro.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE st...
befe463ec473b7ce5590fda615732625c56c4035
ded52719bee30c4156b299282844416e37582dc0
szsteven/SMTK
/smtk/attribute/testing/cxx/unitJsonItems.cxx
C++
cxx
8,724
permissive
//========================================================================= // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
7ce0af0da71ba026d128fdba982323842f21b7fb
a1902f97e60dc5afa5cce4f267443097f7342633
jashrathod/Competitive-Coding
/C++/Dynamic Programming/lcs.cpp
C++
cpp
669
no_license
// LONGEST COMMON SUBSEQUENCE #include <iostream> #include <string.h> using namespace std; int max(int a, int b) { return (a>b) ? a : b; } int lcs(string s1, string s2) { int m=s1.size(), n=s2.size(); int a[m+1][n+1]; for(int i=0; i<=m; i++) { for(int j=0; j<=n; j++) { ...
4bb0eee61472b654f89fb11cd0190e7333f68721
4ab70412fff9bb964846a568066b11b40bc2cff0
summerHearts/AlgorithmPro
/算法时空/数组/leetcode-16 部分排序/main.cpp
C++
cpp
2,515
permissive
// // main.cpp // leetcode-16 部分排序 // // Created by 佐毅 on 2020/5/17. // Copyright © 2020 dfjr. All rights reserved. // /** 给定一个整数数组,编写一个函数,找出索引m和n,只要将索引区间[m,n]的元素排好序,整个数组就是有序的。注意:n-m尽量最小,也就是说,找出符合条件的最短序列。函数返回值为[m,n],若不存在这样的m和n(例如整个数组是有序的),请返回[-1,-1]。 示例: 输入: [1,2,4,7,10,11,7,12,6,7,16,18,19] 输出: [3,9] 来...
e7478f3f4eeb75b33f76a05ed7d3e5a04a7c7483
d2c0354daa6154ed501b0a1982d34e59987b5cf7
lijian8/AHCI-WS2016-CPP
/main.cpp
C++
cpp
5,928
no_license
/* libraries */ #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/objdetect/objdetect.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> /* function prototypes */ void detect(cv::Mat &, cv::CascadeClassifier &, cv::CascadeClassifier &, cv::CascadeClassifier &); voi...
93a48bcea53aa8b17bd4acb3733b2b0a4b920d70
d1ac5df5c7662bee2b6cb47eaf3edd0a08eb4efc
hemanshu95/programs
/BrokenTelephone.cpp
C++
cpp
692
no_license
#include<bits/stdc++.h> using namespace std; #define sd(x) scanf("%d",&x) #define pd(x) printf("%d",x) #define slld(x) scanf("%lld",&x) #define ss(x) scanf("%s",x) int A[100000],n,r,i,flag; int main() { int t; sd(t); while(t-->0) { r=0; flag=1; sd(n); sd(A...
7a89e4a4d25c512f569f07efa6d6ea97376d8545
9f7295d29cb9aeac94bc6e8807f48c4bf6e8255e
allstarschh/training-handout
/opengl/common/fullscreenquad.cpp
C++
cpp
3,121
permissive
#include "fullscreenquad.h" #include <QOpenGLContext> #include <QOpenGLFunctions> FullScreenQuad::FullScreenQuad(QObject *parent) : QObject( parent ), m_positionBuffer( QOpenGLBuffer::VertexBuffer ), m_textureCoordBuffer( QOpenGLBuffer::VertexBuffer ), m_vao() { } void FullScreenQuad::setMateri...
2e08741b9197c8c6a0fc99b60b3a5d9f1ca6208d
b85190b0d99cf611fc41e65b01250d12bd1c3032
cpuguy96/motion-controlled-game
/controller/mpu9255.cpp
C++
cpp
29,212
permissive
#include <Arduino.h> //MPU9255 10-DOF IMU Class //For EE445L Final Project at UT Austin ECE #include <Wire.h> #include "mpu9255.h" mpu9255::mpu9255() { Wire.begin(); //write registers to set up (datasheet) //make sure the imu is a mpu9255 int id = i2cRegRead8(IMU_I2C_ID, MPU9255_WHO_AM_I); if (id != MPU925...
96580b49efa19e7bb9413ef03204c14cf2576981
b6ed7687a9cc658d15fe8bd209e883a14caf8b0b
DolgopolovaMaria/Old
/Hw-1/homework1/Task3/ConsoleApplication3/Task3.cpp
C++
cpp
641
permissive
// ConsoleApplication3.cpp: определяет точку входа для консольного приложения. // #include "stdafx.h" #include <iostream> using namespace std; const int n = 5, m = 3; int A[m + n]; int i; void change(int *massiv, int first, int last) { int j, k; for (j = first; j <= ((last - first)/2 + first); j++) { k = massiv[j...
cec7a31ac400bbbe4a250b5dabb4f96771953c7b
41881caa734bedd21ec4c9c41808a7ecfd238ddc
wokickic/cpp
/Ch03/Ch03/03_1.cpp
C++
cpp
770
no_license
// // main.cpp // Ch03 // // Created by 이승원 on 2017. 2. 3.. // Copyright © 2017년 wokic. All rights reserved. // #include <iostream> #include <cstdio> using namespace std; struct Point{ int xpos; int ypos; void MovePos(int x, int y); void AddPoint(Point &pos); void ShowPosition(); }; void...
9efcba81151e87dd8ca41a916923e6c6ec4ac521
61a131b3f433ee8ce98a0144c8cc52f2cbd1f690
msorins/IronCoders
/evaluator/arhiva/Triunghi2/sources/227.cpp
C++
cpp
289
no_license
#include<iostream> using namespace std ; int main() { int L, C, r, q, S; cin>>L>>C ; S = (L-1) * L / 2 ; r = S % 9 ; if (r == 0) r = 9 ; r++ ; if (r == 10) r = 1 ; q = C % 9 ; if (q == 0) q = 9 ; r += (q - 1) ; if (r > 9) r -= 9 ; cout<<r<<"\n" ; return 0 ; }
ad6ce8b62472763e41cdb33a5d8553a369900941
6fffb304c326dc7b9d97fa28d69957df44b7cd31
dylancm4/Interview-Prep
/Level 2/Arrays/WaveArray.cpp
C++
cpp
1,374
no_license
// // WaveArray.cpp // // // Created by Dylan Miller on 1/17/17. // // /* Given an array of integers, sort the array into a wave like array and return it, In other words, arrange the elements into a sequence such that a1 >= a2 <= a3 >= a4 <= a5..... Example Given [1, 2, 3, 4] One possible answer : [2, 1...
e59de6c97bf58c8a29a1a017555a1fe52f3a9882
069275f1289a98c425e21695b7697449d68f9981
Fiction52s/Breakneck
/Breakneck/VectorMath.cpp
C++
cpp
3,496
no_license
#include "VectorMath.h" #include <iostream> using namespace std; using namespace sf; double cross( sf::Vector2<double> a, sf::Vector2<double> b ) { double ax = a.x; double ay = a.y; double bx = b.x; double by = b.y; return ax * by - ay * bx; //return a.x * b.y - a.y * b.x; } double length( sf::Vector2<double>...
0ba433366024e19bea9de9aa47f1ec0e57c3118f
f85a2beeac50f3d2ae193729a2ce74f89ac023cf
TackyTortoise/AoC17
/AoC17/AoC17/Day_17/Challenge_17.cpp
C++
cpp
790
no_license
#include "Challenge_17.h" Challenge_17::Challenge_17() {} Challenge_17::~Challenge_17() {} void Challenge_17::Run() { P2(); } void Challenge_17::P1() { int steps = 376; vector<int> spinLock; spinLock.push_back(0); int currentPos = 0; for (int i = 0; i < 2017; ++i) { int insertPos = (currentPos + steps) % sp...
e06a7ca9a9fa887d6f53b70bd79a536d80c52df1
69f1e2da78af9dfba5267522ec3a41e1c1110048
Adrian-alu0101024363/IA
/src/main.cpp
C++
cpp
1,024
no_license
#include <windows.h> #include <iostream> //#include "../headers/car.h" #include "../headers/astar.h" using namespace std; int main (int argc, char *argv[]) { string filename; filename = argv[1]; zone_t zona(15,15); zone_t zona2; zona2.readFromFile(filename); COLOR_PINK; cout << "La nueva ...
ec3c7099ca2b77abd117bee0b9a7bdffa1d2b407
1c170320f53df43c67064e980deead1bf126ecc2
Mtcno/Rance4-MAKO32
/MAKO32/MAKO32.cpp
C++
cpp
4,415
no_license
#include <windows.h> #include <stdio.h> #include <string> #pragma comment(lib,"Winmm.lib") #define DLLEXPORT __declspec(dllexport) #ifdef __cplusplus #define DLLEXTERN extern "C" #else #define DLLEXTERN extern #endif UINT wDeviceID; UINT __stdcall GetDevId(int a1) { UINT result; MCI_OPEN_PARMS mciOpenParms; ...
546cd09967777491cd729ba9722510db8e2d1464
8dd7caa522e002e9cc73d25c39581c49dd0b9866
alikhan880/ADS
/Algorithms and data structure/pf.cpp
C++
cpp
221
no_license
vector<int> prefix_function (string s) { int n = (int) s.length(); vector<int> pi (n); for (int i=1; i<n; ++i) { int j = pi[i-1]; while (j > 0 && s[i] != s[j]) j = pi[j-1]; if (s[i] == s[j]) ++j; pi[i] = j; } return pi; }
1a6cab7ecdf406a594aaae3ddf80c20ced7730eb
042b6d8c3af109242b8745de3671a96cbf751547
alexshires/eos
/eos/rare-b-decays/exclusive-b-to-d-dilepton-large-recoil.cc
C++
cc
29,466
no_license
/* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* * Copyright (c) 2010, 2011, 2012, 2013, 2014 Danny van Dyk * Copyright (c) 2011 Christian Wacker * Copyright (c) 2014 Frederik Beaujean * Copyright (c) 2014 Christoph Bobeth * * This file is part of the EOS project. EOS is free software; * you can redistribute...
5e87bd167865f0ebbddb38c4c8ac98f48d268156
6b742b05951a654375d3505398e8b22630a909d5
AndrewWayne/OI_Learning
/P1197.cpp
C++
cpp
1,711
permissive
#include <cstdio> #include <iostream> using namespace std; struct Edge{ int from,to,nxt; }edge[400400]; int n,m,u,v,k,nume,head[400400],hit[400400],temp,numblock,ans[400400]; bool hitted[400400]; int dad[400400]; int find(int x){ if(dad[x]==x)return x; return dad[x]=find(dad[x]); } void unionn(int x,int y){...
eab42ce662e9068c9d8761ca7cdb8d91a1e3bf7d
e68f7d954a4c8ce198e04dbcea9c8f24850dfe2a
iwenskowicz16/Final-Project-Language-Detection
/main.cpp
C++
cpp
480
permissive
#include <vector> #include <iostream> #include <string> #include "obj.h" int main(int argc, char *argv[]){ if(argc != 2){exit(EXIT_FAILURE);} //checks to make sure there is only 1 input std::string testString = argv[1]; OBJ::OBJ test = OBJ(testString); //runs the functions std::vector<int> freq = test.getNum()...
717a5f073311638d721601bffac9629a97c33314
73817ecf3c5e469f9e5ec904975323d2a51cf181
HarborYuan/Practice
/cpp/test149933/pD.cpp
C++
cpp
379
permissive
#include <iostream> #include <algorithm> using namespace std; #define MAXN 10086 char ans[MAXN],str[MAXN]; int main() { long m,l,r,k,i,j,len,pos; cin>>ans; cin>>m; while (m--) { cin>>l>>r>>k; len=r-l+1; k%=len; for (i=l-1;i<=r-1;i++) { pos=(i-l+1+k)%len+l-1; str[pos]=ans[i]; } for (i=l-1;i<=r-...
e7c019e2a013931febc272931c8a020063dd75b9
3afdc0109fca144c2722d9a7fa2b06a4dbf58afd
tryanaditya/mainmain
/supporting libraries/pyside/PySide-1.2.4/pyside_build/py3.5-qt4.8.7-64bit-release/pyside/PySide/phonon/PySide/phonon/phonon_audiooutputdevicemodel_wrapper.cpp
C++
cpp
92,858
no_license
/* * This file is part of PySide: Python for Qt * * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). * * Contact: PySide team <contact@pyside.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2...
c6ea02ba8ed17eb0120b494363c6ec7aef890659
7cfd8a5695b6f40a20e551e75fc0725c1f55c12e
cristianogliari/pristontale
/src/TJBOY/clanmenu/Help.cpp
C++
cpp
31,647
no_license
#define LEVELUP_HELP_CPP #include <windows.h> #include <tchar.h> #include <math.h> #include <stdio.h> #include "tjclanDEF.h" #ifdef USE_PROSTONTALE //=========== 프리스턴소스인경우 #include "sinbaram\\SinLinkHeader.h" #include "HoBaram\\HoLinkHeader.h" #include "Language\\language.h" #include "HoBaram\\HoTe...
13bd4d94e62e7f3b498d71f9940d0718cac5d1d3
6a8fb1ce335a739ee70952868f2c4166eabe1325
zeno15/RTSDevelopement
/RTSDevelopement/RTSDevelopement/WorldUnitFoorint.cpp
C++
cpp
2,997
no_license
#include "WorldUnitFootprint.h" #include "Game.h" #include "MessageData.h" WorldUnitFootprint::WorldUnitFootprint(sf::Vector2f _position) : WorldObject(WorldObject::ObjectType::FOOTPRINT, _position, sf::Vector2f(32.0f, 32.0f), 1), m_Vertex(sf::Quads, 4), m_Type(Tile::Type::HEAVY_VEHICLE) { relocateOnPosition(); ...
a970023552e4007bf745f33db804c80d126c33ce
5eb34ffc6048ee7ee1c3c9509dc3d54b4acafa72
kairusL/KWSE
/VGP334/17_HelloSimpleAnimation/WinMain.cpp
C++
cpp
244
no_license
#include <KWSE/Inc/KWSE.h> #include"GameState.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) { KWSE::MainApp().AddState<GameState>("GameState"); KWSE::MainApp().Run({ L"SimpleAnimation" }); return 0; }
9147ac5895951b26c29da3aa80f6d8b57415d057
1bebdf41c92948517f776740ea1697b78b751f6d
zfzlinux/chromium
/chrome/browser/usb/usb_chooser_context.cc
C++
cc
22,859
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/usb/usb_chooser_context.h" #include <memory> #include <utility> #include <vector> #include "base/bind.h" #include "base/contain...
6a531fe1aa5eaf1be48bcdbcc1f29d107f6b11b0
a55ec7390120644ace3a2663654117a5f956a29e
BGCX067/faint-graphics-editor-svn-to-git
/branches/vc15/gui/math-text-ctrl.hh
C++
hh
1,239
permissive
// -*- coding: us-ascii-unix -*- // Copyright 2013 Lukas Kemmer // // Licensed under the Apache License, Version 2.0 (the "License"); you // may not use this file except in compliance with the License. You // may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
be1c907557214cc566a965c9ce8defd571ff27bc
85e72b12e0bf3898d419283a76ef1cde6bc3847c
biswanaths/competition
/cf/1037/c.cpp
C++
cpp
1,318
no_license
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
686054a726bcf2871c5d9deda565420ade883b44
a8f3664fd245f61ad786093516df13552a2702fb
matthiasdiener/mpich
/MPI-2-C++/src/intercomm.cc
C++
cc
2,083
permissive
// -*- c++ -*- // // Copyright 1997-2000, University of Notre Dame. // Authors: Jeremy G. Siek, Jeffery M. Squyres, Michael P. McNally, and // Andrew Lumsdaine // // This file is part of the Notre Dame C++ bindings for MPI. // // You should have received a copy of the License Agreement for the Notre // Dame ...
0bf88643c2418e90c49e17104704a1632e56e8b3
3c08eb29fcb7b1a26d90742b1cbb0985ef5512fc
shizukanaskytree/tensorflow
/tensorflow/compiler/jit/xla_launch_util.cc
C++
cc
30,063
permissive
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
b17d3da3bd613ba46757af07b13a656de54bcc63
ebb2182e7c96a38bb9c8e99905be4cdcda87ae2d
QPC-database/aws-sdk-cpp
/aws-cpp-sdk-alexaforbusiness/source/model/CreateSkillGroupResult.cpp
C++
cpp
994
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/alexaforbusiness/model/CreateSkillGroupResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #inc...
ca42c020fdeebf0a1fe4adff6e256b1c424fabc3
6fb86c6c64cd9484c07282de282c90d16be219d0
TommyTeaVee/IFFICE
/haibao.cpp
C++
cpp
2,728
permissive
#include "haibao.h" #include "mqoloader.h" #include <AR/ar.h> #ifndef __APPLE__ # include <GL/glut.h> #else # include <OpenGL/glut.h> #endif #include <stdio.h> #include <stdlib.h> static HAIBAO_ACT *haibao_act; static int q_num; char *getbuff1(char *buf,int n,FILE *fp){ char *ret; for(;;){ ret=fgets(buf,n,fp...
000137b08ecbe19c78740c317d3da277e80e95bd
547ec400d04a503b00b3167666d58506d29bb9a7
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE23_Relative_Path_Traversal/s01/CWE23_Relative_Path_Traversal__char_console_ifstream_84a.cpp
C++
cpp
2,394
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__char_console_ifstream_84a.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-84a.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: console Read input from the co...
0689753d693c063f8d4d5854c63da3d8b9d86099
0b935fd6c60b25bac0682113b52803ac9d4bfaf1
SamJWeissman/SamWeissmanCS3113
/ParticleSystemHW/NYUCodebase/Bullet.cpp
C++
cpp
1,239
no_license
#include "Bullet.h" const float PI = 3.141595359f; Bullet::Bullet(bool isEnemy) : isEnemyBullet(isEnemy) { size = .01f; speed = 0.0f; } void Bullet::impact() { x = 0.0f; y = -1.5f; speed = 0.0f; } void Bullet::fire(float xStart, float yStart, bool bigGun) { if (isEnemyBullet) { x = xStart + 0.0f; y = ySt...
185f0c60bd0c3b752a83bfa3420157054de0114b
ab7d64c4c15ad5fb2bfd8474376766a21cb5b19b
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/MP+dmb.sy+data-rfi-addr-ctrl-[fr-rf].c.cbmc.cpp
C++
cpp
76,085
no_license
// Global variabls: // 0:vars:4 // 7:atom_1_X10_1:1 // 4:atom_1_X0_1:1 // 5:atom_1_X4_1:1 // 6:atom_1_X8_0:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 8 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __...
f283fb549cd6f7125c838cda16c9aa6fde84fc2f
fdb81b871aea25f391dead49cce6db8ea4210db3
pahihu/POW
/Pow32/link32/link32.cpp
C++
cpp
4,624
no_license
/*************************************************************************** * * * ppppppppp oooooo www www xxxx * * pppppppppp oooooooo www www xxxxxx * * ...
7c9278048b81d99f287a78b223200a5bc2600550
2a669b4ec96814a8b586e3a203ae1632624e30bc
DalavanCloud/foundationdb
/flow/Trace.cpp
C++
cpp
34,867
permissive
/* * Trace.cpp * * This source file is part of the FoundationDB open source project * * Copyright 2013-2018 Apple Inc. and the FoundationDB project authors * * 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 c...
c65ef0f47329ab74b936a2d2414cfbddf3410a7d
f69afa808fa5f6606b3f68ed64bd7227a456f45e
luckpoy/CPPTest
/test5/linkarrway.cpp
C++
cpp
2,394
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Student { int Chinese_score; int Math_score; int English_score; int Total; float Ave; char *name; struct Student *next; }; struct Class { int grade; struct Class *next; }; void printLink(struct Student * head) { struct S...
fdbd32cc325817d29bbe0304f662a8531cf28bf2
3e808bc453373a5e76819fc1f080a1b6f3960bcf
moteesh-in2tive/chromium
/chrome/browser/ash/sharesheet/copy_to_clipboard_share_action_unittest.cc
C++
cc
5,059
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/sharesheet/copy_to_clipboard_share_action.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/sharesheet/...
e6dd3d8b03265d2082943012717b7954a26aab8c
bcacaff0141db7ae3f46d80dc37e65d681c8453d
shengxiaoyi1993/cpp-qt
/test_qss/test_qss/mainwindow.cpp
C++
cpp
269
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); ui->tabWidget->setContentsMargins(0,0,0,0); } MainWindow::~MainWindow() { delete ui; }
a68bf8be3c92e9c9a177f0d18c7f9604bf746488
50d1caa9294e019aeb3fc29df582d704195daf0d
tanvi-surana/hackerrank
/string construction.cpp
C++
cpp
858
no_license
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #inc...
db113204e0a538607b2c3d931813abbb59e9f274
032b8a3be0ec660df2501cf60ec7a7e207b88322
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE191_Integer_Underflow/s01/CWE191_Integer_Underflow__int64_t_fscanf_multiply_82_goodG2B.cpp
C++
cpp
1,237
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__int64_t_fscanf_multiply_82_goodG2B.cpp Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-82_goodG2B.tmpl.cpp */ /* * @description * CWE: 191 Integer Underflow * BadSource: fscanf Read data from the co...
0d40e0de9aa3cf87206eb73faf4069515bec1bc9
8b46e53299af0823167025acfcabc4528a7887a3
TusKabina/OP
/Vjezba6/Vjezba6Zadatak1/Vjezba6Zadatak 1/book.cpp
C++
cpp
306
no_license
#include "book.h" Book::Book() { } Book::Book(string author,string title, int year) { this->author = author; this->title = title; this->year = year; } Book::~Book() { } string Book::getAuthor() { return author; } string Book::getTitle() { return title; } int Book::getYear() { return year; }
012b415a706c4c63583c894e95c97bd59c41e148
77b3736d1c2705b36e36790b87217d03a0785e54
int-Frank/BSR-old
/Converter/main.cpp
C++
cpp
217
permissive
#include "curses.h" int main() { initscr(); raw(); attron(A_STANDOUT | A_UNDERLINE); mvprintw(10, 10, "HELLO WORLD"); attroff(A_STANDOUT | A_UNDERLINE); refresh(); getchar(); endwin(); return 0; }
efeb604ff10b7ed6ec0ead84c2343eae053e4675
54c5a9a6563808a52c25179209eccea14b6ddf22
tmpsantos/chromium
/content/browser/gpu/gpu_process_host.cc
C++
cc
36,182
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 "content/browser/gpu/gpu_process_host.h" #include "base/base64.h" #include "base/base_switches.h" #include "base/basictypes.h" #include "bas...
4e716013ff180ca56f3015009502dd42d41910e5
ec93c9906cf3d7e917ae51337536c4396a32f372
karunmatharu/Android-4.4-Pay-by-Data
/external/chromium/chrome/browser/chromeos/status/status_area_button.cc
C++
cc
4,327
permissive
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/status/status_area_button.h" #include "content/common/notification_service.h" #include "grit/theme_resources.h" #in...
f6eff6d5c80c156df487b5e9fbdecd067b463b7d
ac7b719c6ac0121b2131b418bf9a81ef8b7c0be2
Koloses/Vivaldi-browser
/chromium/third_party/blink/renderer/platform/exported/web_runtime_features.cc
C++
cc
24,264
permissive
/* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
b7accb7e3f4e575fc0680fa7aab0ca6966dadbe5
c331a43329271035fad1e1219e70f11507600b16
impolska742/dsa-450
/Arrays/(IC)3. Kth Smallest Element.cpp
C++
cpp
263
no_license
#include "useful.h" // Space complexity => O(N) // Time Complexity => O(N) int naiveSolution(int arr[], int n) { } int main(int argc, char const *argv[]) { int arr[] = { 1000, 11, 445, 1, 330, 3000}; int arr_size = 6; Display(arr, arr_size); return 0; }
3f8fcc9a9188b025acaf80625bf58be5f1101a4a
9b0fe34006992cd61741b7a31468ddb8cfebb9f0
maticanas/network_hw5
/http_inject/http_inject/소스.cpp
C++
cpp
15,551
no_license
#define _CRT_SECURE_NO_WARNINGS #define _WINSOCK_DEPRECATED_NO_WARNINGS #include "pcap.h" #include <stdio.h> #include <winsock2.h> #include <conio.h> #pragma comment (lib, "wpcap.lib") #pragma comment (lib, "ws2_32.lib" ) #define MAXBUF 0xFFFF #define MAXFILTERLEN 100 #define ETEHR_HEADER_LEN 14 #define MAXURL_L...
62625a82ebf16c76935723d8725fa937c7fc5b25
88cb000bcaa28ccf965c12873df8da4f2fc3b69a
josuperstar/gagnon2021-Deformable-Lapped-Textures
/HoudiniPlugin/texturingfluids/Core/Gagnon2020/DeformableGridsManager.cpp
C++
cpp
50,945
no_license
#include "DeformableGridsManager.h" #include <vector> #include <algorithm> #include <math.h> #include <SYS/SYS_Math.h> #include <UT/UT_Interrupt.h> #include <UT/UT_Matrix3.h> #include <UT/UT_Matrix4.h> #include <GU/GU_Detail.h> #include <GU/GU_PrimPoly.h> #include <PRM/PRM_Include.h> #include <PRM/PRM_SpareData.h> #in...
d31c227f6eb02c37fec65a289ec7d87653e3e323
fadb991acc7a610e601905ac1d52b2e941db4bef
jiintonic/weekend-task
/chuck-norris-joke-part2/HoundCpp/HoundJSON/YelpLocalSearchConversationStateElementJSON.cpp
C++
cpp
14,889
no_license
/* file "YelpLocalSearchConversationStateElementJSON.cpp" */ /* Generated automatically by Classy JSON. */ #pragma implementation "YelpLocalSearchConversationStateElementJSON.h" #include "YelpLocalSearchConversationStateElementJSON.h" YelpLocalSearchConversationStateElementJSON::TypeCommandKind YelpLocalSearchCon...
e598d0ef1082e4f85be965721bad2f91b1647bfd
f96b9bd2fea2804d7825222d33679cf69d311956
nwjs/chromium.src
/base/profiler/native_unwinder_android_unittest.cc
C++
cc
18,912
permissive
// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/profiler/native_unwinder_android.h" #include <sys/mman.h> #include <inttypes.h> #include <stdio.h> // For printf address. #include <string.h> #include <algori...
a80dcc2c5639c86dd7de5c64437f1be46f213217
c6690abb31c1586cf5ca3104c5934634062e2923
aasmc/ConcurrencyInAction
/chapter04/atm_system_example/interface_machine.cpp
C++
cpp
4,438
no_license
#include "interface_machine.h" #include "iostream" #include "mutex" std::mutex iom; messaging::sender interface_machine::get_sender() { return incoming; } void interface_machine::done() { get_sender().send(messaging::close_queue()); } void interface_machine::run() { try { for (;;) { ...
ea23ba85bed05801c5152e22407890112c18ea5f
877437f10d84cff1c8cb3db6eb0a7e71b346ae33
vinilivramento/PhysicalSynthesisDesignPatterns
/patterns/creational/prototype.hpp
C++
hpp
5,098
permissive
#ifndef PATTERNS_CREATIONAL_PROTOTYPE_HPP #define PATTERNS_CREATIONAL_PROTOTYPE_HPP #include <memory> #include <random> #include <common/utils.hpp> namespace creational { template<typename T> class PrototypeSolution { std::vector<T> m_solution; double m_quality; public: PrototypeSolution(std...
62a190ad1c718fcaf947fc517e839bb69b1e79ac
91cd784391be850ff304fdca212fae3b0bb4c7cb
mensong/IE5.5_vs2008
/Xindows/src/site/util/CellRangeParser.cpp
C++
cpp
4,903
no_license
#include "stdafx.h" #include "CellRangeParser.h" CCellRangeParser::CCellRangeParser(LPCTSTR szRange) { int nCurIndex; _fFailed = FALSE; _fOneValue = FALSE; if(szRange==NULL || *szRange==0) { goto Fail; } // Remove all the spaces, convert to uppercase, replace .. with : and /...
baffa6c776675cbe9259aece2c6d99e2e75c9b56
078c76e57aef0955795dbac994150c93ed24d49a
jessie150271/oj-practice
/cpp/1096.cpp
C++
cpp
793
no_license
#include <iostream> #include <iomanip> #include <vector> #include <string> using namespace std; int main() { int N; while (cin >> N) { vector<string>name,num1, num2; string ch,number1,number2; int token1 = 0, token2 = 0, token3 = 0; for (int i = 0; i < N; i++) { cin >> ch >> number1 >> ...
9b3545199bc8f7fa27959cec071ff297633e9684
3b362c9f08710d667873566981c6a6fce5909339
alisw/AliRoot
/PYTHIA8/pythia8210dev/src/SigmaEW.cc
C++
cc
100,202
permissive
// SigmaEW.cc is a part of the PYTHIA event generator. // Copyright (C) 2015 Torbjorn Sjostrand. // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details. // Please respect the MCnet Guidelines, see GUIDELINES for details. // Function definitions (not found in the header) for the // electroweak simul...
114ab87908e601a5dc91b4f95714e1e438a5cecd
02e7110761240694eb4f7636a04b335497f0d11e
Aaryan-R-S/Cpp-Tutorials
/Practice Problems/lagestElem.cpp
C++
cpp
277
permissive
#include<iostream> using namespace std; int main() { int myArr[]={23,5,7,7,0,-3,54,78,63,45}; int max = 0; for (int i = 0; i < 10; i++) { if (myArr[i]>max){ max = myArr[i]; }; } printf("Max val is: %d", max); return 0; }
8836b004570ab0b2913f71b84fa379dce329ec70
b5b3546ddb7e2f94b6da02ea1ade05ce0fbfdf69
anurupr/beefweb
/server/src/player_deadbeef/player_control.cpp
C++
cpp
7,337
permissive
#include "player.hpp" #include "../string_utils.hpp" namespace msrv { namespace player_deadbeef { namespace { class TrackQueryImpl : public TrackQuery { public: TrackQueryImpl(const std::vector<std::string>& columns) : formatters(compileColumns(columns)) { } ~TrackQueryImpl() = default; ...
7171c45b9c30a0e856e4b3f16aa7aa0c691fbd6a
6cea70ffabc79f3055a68e7cecc602baaf08e40e
kas1e/Odyssey
/odyssey-r155188-1.23/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.cpp
C++
cpp
3,984
no_license
/* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
d4d3ffc62ed0ca7bd2eb9ba9d72661f5c608599f
bbc7e975deb968155f0b4c95475d7dfe5cf25315
moranhazom/TCP_UDP_Networking_Project
/MessengerServerApp/src/Session.cpp
C++
cpp
1,903
no_license
/* * Session.cpp * * Created on: May 28, 2016 * Author: user */ #include "Session.h" namespace npl{ Session::Session(SessionHandler* sessionHandler, User *user1,User *user2) { this->handler = sessionHandler; this->userA = user1; this->userB = user2; this->active = true; start(); } void Session::run(){...
bb38cf0809a1d12a8cbd2e95b5e0cccf989c5f6b
1606857d0eee4de1b714974c94ac4519dc9ae9ca
Yan-Song/burdakovd
/contests/Зимняя школа/VS/Day5/Day5/j.cpp
C++
cpp
3,204
no_license
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <cstdlib> #include <vector> #include <string> #include <queue> #include <stack> #include <set> #include <map> using namespace std; typedef vector<int> VI; typedef vector<vector<int> > VVI; typedef pair<int,int> pii;...
37a107403887ef9f64738a38e28f859aec3de186
afef84093d885bff2e81e4a43ae501e2276b91f5
delucamarco/interviewprep-cpp
/scratch/BBPolymorphism.cpp
C++
cpp
843
no_license
#include <iostream> #include "BBPolymorphism.h" namespace brainbench { Base::Base() { std::cout<< "Base::Base()" << std::endl; } Base::~Base() { std::cout<< "Base::~Base()" << std::endl; } Derived::Derived() { std::cout<< "Derived::Derived()" << std::endl; } Derived::~Derived() { std::cout<< "Derived:...
6a90a735d3c8dd3145e490ab622fc884049ebc07
a751b5276fa6fce38a71717a344b2c70e6d1c963
vin-huang/Anakin
/saber/funcs/impl/arm/impl/conv3x3s1_direct.cpp
C++
cpp
199,678
permissive
#include "saber/funcs/impl/arm/impl/conv_arm_impl.h" #ifdef USE_ARM_PLACE namespace anakin{ namespace saber{ /* void conv_3x3s1_direct1(Tensor<ARM, AK_FLOAT, NCHW>& tensor_out, Tensor<ARM, AK_FLOAT, NCHW>& tensor_in, \ const float* weights, const float* bias, \ int group, int kernel_w, int kernel_h, int stri...
0ce12a5b8602d7e007cecc6f8f89cf72e590d2bf
8236451b96c8dca824f3ca7c80f7daf6e76789f3
benzoClang/llvm-project
/clang/lib/Driver/ToolChains/Gnu.cpp
C++
cpp
129,707
permissive
//===--- Gnu.cpp - Gnu Tool and ToolChain Implementations -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
468e671d342c20b503a320a1edf14241073efc77
362b165c7b4b4af5fc169796af467eb8bd37c4bd
lorena-ang/Data-Structures-Exercises
/Queue/main.cpp
C++
cpp
625
no_license
// // main.cpp // queue // // Created by Lore Ang on 19/1/2020. // Copyright © 2020 Lore Ang. All rights reserved. // #include <iostream> #include "Queue.h" using namespace std; int main() { Queue<string> miFila; miFila.push("A"); miFila.push("B"); miFila.push("C"); miFila.push("D"); ...
932d7b39ac2fea09d8a5138dd4a2b4630afe3cab
9ac6f59f92edfb696a13a73986d2d6d9c8fb4ad6
Computer-Science-Club-of-OCC/connect4
/vendor/windows/SFML-2.5.1/include/SFML/Graphics/VertexArray.hpp
C++
hpp
7,504
permissive
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages a...
afc38b054172e658dec17aedd8ab41c866ece4c5
70c574c81a8ce788979719d1b353ceded2cfcf53
hegongshan/algorithm-notes
/3.4小节——入门模拟->日期处理/ProblemE.cpp
C++
cpp
602
no_license
#include <cstdio> int month[13][2] = { { 0, 0 }, { 31, 31 }, { 28, 29 }, { 31, 31 }, { 30, 30 }, { 31, 31 }, { 30, 30 }, { 31, 31 }, { 31, 31 }, { 30, 30 }, { 31, 31 }, { 30, 30 }, { 31, 31 } }; bool isLeap(int year) { return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0); } int main() { int n; scanf("...
c5b8756ae3619844927a160df74b9f299b15b692
976bc747891a181ccd1349fd0283aa06a66f7cb1
imos/icfpc2015
/boost/math/special_functions/expm1.hpp
C++
hpp
11,583
no_license
// (C) Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_EXPM1_INCLUDED #define BOOST_MATH_EXPM1_INCLUDED #ifdef _MSC_VE...
616998016a37e1fb93646b3bc81ad62a3199153e
b450b03d55a26badb533c5b27f06fae43dab9dcd
wesckeley/competitive-programming
/nepsacademy/50-mobile.cpp
C++
cpp
275
no_license
#include <cstdio> int main(void) { int iA, iB, iC, iD; bool bAnswer; scanf("%d %d %d %d", &iA, &iB, &iC, &iD); bAnswer = (iA == (iB + iC + iD)); bAnswer &= (iD == (iB + iC)); bAnswer &= (iB == iC); (bAnswer == true) ? printf("S\n") : printf("N\n"); return 0; }
d9342ecd06ecf4f535d51ea76ea1db4c9944629d
43c5108e7bcfb5e88302441cfcef5269cad94d71
cbernet/cmssw
/DQMOffline/Trigger/src/HLTTauDQMOfflineSource.cc
C++
cc
7,109
no_license
#include "DQMOffline/Trigger/interface/HLTTauDQMOfflineSource.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataFormats/HLTReco/interface/TriggerEvent.h" using namespace std; using namespace edm; using namespace reco; using namespace l1extra; using namespace trigger; // // constructors and ...
7fbbb661b818c232eebf3b64b03488791746f0aa
e538b82d2ffeda5a88f8a2740fba0ff6db3f0dc6
ShowLove/Robotics_Club
/zebulon/projects/igvc/2011/src/igvc/examples/example_opencv.cpp
C++
cpp
20,480
no_license
///////////////////////////////////////////////////////////////////////////////////// /// /// \file example_opencv.h /// \brief A program to test some opencv algorithms. /// /// Author(s): David Adams<br> /// Created: 2011<br> /// Copyright (c) 2010<br> /// Robotics Laboratory and Club<br> /// University of Ce...
a099787de7acd2fcf754c08454ea8ff5ce34798c
b7644f3eb27c5a3d8c9d9883784f59ce5161fd59
sola-akiduki/c-src
/03_WHILEbun.cpp
C++
cpp
242
no_license
#include <iostream> using namespace std; int main() { int num = 1; while(1){ if(num==100){ cout << num << "回目です\n"; cout << "終了します\n"; break; } cout << num << "回目です\n"; num++; } return 0; }
b389263a28bf40b4f89380ab08d6739336fb41e7
223e24a9d29c95d8696d93e9646af92e739eb49a
Kidd-Ye/DataStructure-RadixSort
/RadixSort/RadixSort/main.cpp
C++
cpp
1,625
no_license
// // main.cpp // RadixSort // // Created by kidd on 2018/8/9. // Copyright © 2018年 Kidd. All rights reserved. // #include <iostream> int maxbit(int data[], int n) //辅助函数,求数据的最大位数 { int d = 1; //保存最大的位数 int p = 10; for(int i = 0; i < n; ++i) { while(data[i] >= p) { p *=...
1d1639c9714b493eff9822da833155f3588a018f
5716b3818164d5ced6a110262973997a4ae13d29
chromium/chromium
/third_party/blink/renderer/core/paint/ng/ng_inline_box_fragment_painter.cc
C++
cc
15,765
permissive
// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/paint/ng/ng_inline_box_fragment_painter.h" #include "third_party/blink/renderer/core/layout/background_bleed_avoidance.h" #include "t...
aec66b22978b1cc5b9e1271ea0e481743f9beac5
10b2c2d5e99022535a617043486190357a9963c6
eviallet/PiMusic
/xmlparser.cpp
C++
cpp
1,767
no_license
#include "xmlparser.h" QByteArray XmlParser::_xml; void XmlParser::parse(Track *track, QByteArray& xml) { XmlParser::_xml = xml; track->setTitle(infoValue("title")); track->setArtist(infoValue("artist")); track->setPath(infoValue("filename")); track->setYear(static_cast<unsigned short>(infoValue(...
42e60f273f17580b5e040fea9b7e80704fd0f1b5
4beeb7f6637d6d5a226f9108ec5e468ee8ab10c4
newdaytrue/PS
/BOJ/10996/10996.cpp14.cpp
C++
cpp
819
no_license
///////////////////////////////////////////////////// #ifdef _DEBUG #include "bits_stdc++.h" #else #include "bits/stdc++.h" #endif using namespace std; typedef pair<int, int> pii; typedef vector<vector<pii > > Edge; typedef unsigned long long llu; typedef long long ll; typedef priority_queue<pii > Pq; typedef vector<in...
a9807c6b849e50dbf49c78a1b4e4dcbc2bd6b6eb
181cc73be603499754bf07c6e42f0b734897ab02
chenbaihu/cpp_coding
/util/thread.cc
C++
cc
1,446
no_license
#include "thread.h" #include <errno.h> #include <string.h> #include <stdio.h> namespace util { Thread::Thread(const Function& function) :tid_(0), function_(function) { } Thread::~Thread() { if (IsRuning()) { Join(); } } bool Thread::Start() { int result = pthread_create(&tid_, NULL, Threa...
3662bdf7a890609be2dc30f720c89c19f98bf069
e267c78fcef0a4f96a88956815aa4ab83eba304f
BenziAhamed/swift
/lib/SIL/IR/OperandOwnership.cpp
C++
cpp
39,260
permissive
//===--- OperandOwnership.cpp ---------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
e7730f3243dcd12afa83d6b57076ae4b85e2e080
623468929a3f69dbc0f7ed6c4c79ddbad3e4f64f
bravesoftdz/realwork
/shared/ContextSearch/impl/Manage_i/ViewAsParts_i.cpp
C++
cpp
9,426
no_license
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Модуль: "w:/shared/ContextSearch/impl/Manage_i/ViewAsParts_i.cpp" // генератор файлов реализации C++ (.cpp) // Generated from UML model, root element: <<Servant::Class>> shared::ContextSearch::...
aa61473913e3722d489f1bbe40beeef1eb379743
bd481955287af0a672f86d6bfe6dd542700a8b3b
KrKush23/LeetCode
/Problems/0171. Excel Sheet Column Number.cpp
C++
cpp
233
permissive
class Solution { public: int titleToNumber(string s) { int n = s.length(); int ans{0}; for(char ch: s){ ans += pow(26,n-1) * (ch-'A'+1); n--; } return ans; } };
105e1ea77ea320ffcf6f01548f060c450ee16a85
963c5550a2864d034424d0f074ee4195398e00a3
dicehub/VTK
/Common/Core/Testing/Cxx/TestScaledSOADataArrayTemplate.cxx
C++
cxx
3,425
permissive
/*============================================================================== Program: Visualization Toolkit Module: TestScaledSOADataArrayTemplate.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
79c25f61f831908787539233ec17302fbbd3f3df
5ece3ec2894f038d95dfe253c025cb00161a5a2e
jcxioo/Cpp-ADV
/WordSegmentation.hpp
C++
hpp
1,035
no_license
/// /// @file WordSegmentation.hpp /// @author jcx(yxjcxstack@gmail.com) /// @date 2018-05-21 06:40:54 /// #ifndef __MY_WORD_SEGEMENTATION_H #define __MY_WORD_SEGEMENTATION_H #include "cppjieba/jieba.hpp" #include <iostream> #include <vector> #include <string> using std::cout; using std::endl; using std::v...
2e5e6cd08b45c47de2cdf3e4b6f92e9cb9cc9ea9
d0450eaf834f0e222a219304ffada2fc79265b96
withwind93/ACM_Code
/codeforces/229/c.cpp
C++
cpp
1,693
no_license
#include <limits.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <algorithm> #include <iostream> using namespace std; #define llg long long template<typename T> inline void checkMin(T& a, T b) { if (a > b) a = b; } template<typename T> inline void checkMax(T& a, T b) { if (a < b...
a6d5cccf9c714a68ebc478663c1e89c15730005f
d1fdf6b3cab47c68024c3fe6cbc3e20ffc9be2fb
capeanalytics/aws-sdk-cpp
/aws-cpp-sdk-iot/source/model/ListTopicRulesResult.cpp
C++
cpp
1,621
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...
01d5838760f62e81684e57bcbacbfb10a85d1722
51d359392d1dc97011436d9e84b35a930ae772da
andreatondelli/demo-ht16k33
/src/main.cpp
C++
cpp
967
permissive
/**************************************************************** * Simple test of ht16k33 library turning on and off LEDs */ #include "ht16k33.h" // Define the class HT16K33 HT; /****************************************************************/ void setup() { Serial.begin(57600); Serial.println(F("ht16k33 lig...
d037bc4f93915dd55393914ad43f0d7e5e6a9b12
963df72d4824dae6b8f8d3d99a6ca5741938b60f
alexandraback/datacollection
/solutions_5751500831719424_0/C++/r00T/A.cpp
C++
cpp
1,498
no_license
using namespace std; #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cctype> #include <climits> #include <iostream> #include <algorithm> #include <vector> #include <map> #include <stack> #include <queue> #include <string> typedef long long L; typedef unsigned long lon...
45db645de3d171b1966e3820192e0949eee8d66d
2708057b459b3d2a40ec69b59344d381d772e04f
sirkp/DSA
/17. Graphs/problems/p23*.cpp
C++
cpp
1,230
no_license
// https://practice.geeksforgeeks.org/problems/strongly-connected-component-tarjanss-algo-1587115621/1/?track=DSASP-Graph&batchId=154 void dfs(int u, vector<int> adj[], vector<bool>& visited, vector<int>& disc, vector<int>& low, vector<bool>& stackMember, stack<int>& Stack){ static int time = 0; visited[u] = tr...
2bb7c4a0af201b39bc338e9136b4db71ad4904c5
85fd31eae9dac29cce96733b2a10644a06d89616
anted/pripreme2015
/rjesenja/ioi2009_day1/mihael_raising.cpp
C++
cpp
1,224
no_license
#include <algorithm> #include <cstdio> using namespace std; const int MAXN = 55; int n, m; int mat[MAXN][MAXN]; int bio[MAXN][MAXN][MAXN][MAXN]; int dp[MAXN][MAXN][MAXN][MAXN]; int pom_dp[MAXN][MAXN]; int sum(int x, int y, int r, int c) { int rez = pom_dp[x+r-1][y+c-1]; if (x != 0) rez -= pom_dp[x-1][y+c-1]; ...
d04bb5844b1cebd999c1605ea42651b3395a3929
b68c225847ff3d0abf51ae9eb078ddf45d019f35
STEllAR-GROUP/hpx
/libs/core/algorithms/tests/unit/algorithms/foreach_prefetching.cpp
C++
cpp
3,486
permissive
// Copyright (c) 2016 Zahra Khatami // Copyright (c) 2016 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // 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) #include <hpx/init.hpp> #include <iostream> #inc...
1251255c2a2a2696f070ba2b19b30854c44e46b6
4c497197f6da20397db29ad949c086da5b26c9c7
PhilZ-cwm6/philz_touch_cwm6_device_vendor
/device/samsung/mondrianwifi/gps/utils/loc_target.cpp
C++
cpp
6,976
no_license
/* Copyright (c) 2012, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list ...