text stringlengths 8 6.88M |
|---|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Arjan van Leeuwen (arjanl)
*/
#ifndef GRID_LAYOUTER_H... |
// note: skip duplicated candidates
class Solution {
public:
vector<vector<int>> combinationSum2(vector<int>& candidates, int target) {
sort(candidates.begin(), candidates.end());
vector<vector<int>> combinations;
vector<int> combination;
combinationSum(candidates, target, 0... |
#include <bits/stdc++.h>
#define N 8
using namespace std;
void backtrack(int c);
bool put(int r, int c);
int row[N], a, b, cont = 1, ld = 0, rd = 0, ptt = 0;
int main()
{
int t;
scanf("%d", &t);
while(t--)
{
scanf("%d %d", &a, &b); a--; b--;
cont = 1;
printf("SOLN COLUMN\n"... |
//Chuong trinh chop tat 3 LED sang dan, tat dan
const int analogWritePin[] = {35, 36, 37}; //Ket noi LED voi 3 chan 35 36 37
//Tuong ung voi chan PC4 PC5 PC6
void setup()
{
// put your setup code here, to run once:
//Cau hinh cac chan PC4=6 la output
for (int thisPin = 0; thisPin <=3; thisPin++)
{
pinMode(a... |
int pot = A0;
int LED = 3;
int potVal;
int brightnessVal;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int potVal = analogRead(pot);
int mapVal = map(potVal, 0, 1023, 0, 255);
analogWr... |
#include "LqFche.h"
#include "LqAlloc.hpp"
#include "LqTbl.hpp"
#include "LqLock.hpp"
#include "LqDef.hpp"
#include "LqFile.h"
#include "LqAtm.hpp"
#undef max
static const float __FloatMax = 9999e+32f * 9999e+32f * 9999e+32f;
#define LqFcheTblRemove(Tbl, Elem) LqTblRowRemove(Tbl, Elem, TblNext, _LqFcheIndexByVal, ... |
#include "Utils.hpp"
#include <optional>
#include <unordered_map>
void left_trim(std::string& s)
{
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) {
return !std::isspace(ch);
}));
}
void right_trim(std::string& s)
{
s.erase(
std::find_if(s.rbegin(), s.rend(), [](int ch) {... |
#include <map>
#include "ProcessFactory.h"
#include "GameCmd.h"
#include "HeartBeatProc.h"
#include "HallRegistProc.h"
#include "HallHeartBeatProc.h"
#include "LoginComingProc.h"
#include "StartGameProc.h"
#include "BetCallProc.h"
#include "BetRaseProc.h"
#include "AllinProc.h"
#include "LookCardProc.h"
#include "Thro... |
#include "gtest/gtest.h"
#include "PrologInterface.h"
#include <sstream>
static int glob_argc;
static char **glob_argv;
static void verifyUnboundStr(PrologVariable variable) {
std::stringstream ss;
ss << PrologVariable();
// Unbound variables should start with "_L".
ASSERT_EQ(ss.str().substr(0, 2), "_L");
}... |
#pragma once
#include <iostream>
#include <iomanip>
#include <unistd.h>
#include "gbcon.h"
using namespace std;
class Timer {
public:
unsigned char div = 0; // increments at 16.384kHz
unsigned char tima = 0; // increments at TAC rate
unsigned char tma = 0; // tma->tima when (tima++) > 0xFF
unsigned char tac... |
#include <iberbar/RHI/Device.h>
namespace iberbar
{
namespace RHI
{
void DefaultRender( IDevice* pDevice )
{
}
}
}
iberbar::RHI::IDevice::IDevice( UApiType nApiType )
: m_nApiType( nApiType )
, m_bIsWindow( false )
, m_ContextSize( 0, 0 )
, m_ClearColor( 1.0f, 1.0f, 1.0f )
, m_CallbackCreated()
, m_... |
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
const double ep1 = (sqrt(5.0) - 1.0) / 2.0;
const double ep2 = (sqrt(5.0) + 1.0) / 2.0;
int main() {
int a, b;
while(cin >> a >> b) {
if(a == 0 && b == 0) break;
if(b > a) {
int temp;
temp = b;
b = a;
a = temp;
}
... |
/*
* =====================================================================================
*
* Filename: exercise1.cc
*
* Description:
*
* Version: 1.0
* Created: 05/19/2014 22:25:55
* Revision: none
* Compiler: gcc
*
* Author: Zhile Zou (Robin), zouzhile@y... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2000-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* Yngve Pettersen
*/
#ifndef _URL_DYNAMIC_ATTRIBUTE_MAN_H
#define... |
#include "msg_0xcf_updatescore_stc.h"
namespace MC
{
namespace Protocol
{
namespace Msg
{
UpdateScore::UpdateScore()
{
_pf_packetId = static_cast<int8_t>(0xCF);
_pf_initialized = false;
}
UpdateScore::UpdateScore(const String16& _itemName, int8_t _update_remove, const String16& _scoreName, int32_t _value)
: _pf_i... |
/*
在这里说明思路
这道题用数组的下标来记录序号,用数组本身的数字记录序号出现的次数
*/
#include<iostream>
using namespace std;
int main()
{
int arr[100] = {0};
int num, i;
while (cin >> num, num >= 0)
{
arr[num]++;
}
int max = arr[0];
for (i = 0; i < 100; i++)
{
if (max < arr[i])
max = arr[i];
}
int flag = 0;
for (i = 0; i < 100; i+... |
// 80
#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+2;
struct lable{
string name;
int father;
};
map<string,int> id;
lable str[maxn];
string sub[maxn];
int pre[maxn],inx,output[maxn],inxo,n;
void tolower(string &s){
for(int i=0;i<s.size();++i)if(s[i]>='A'&&s[i]<='Z')s[i]+=32;
}
void s... |
// KEGIES.h: Singleton - Handle overall GUI and events
#pragma once
#ifndef __AFXWIN_H__
#error "Error window"
#endif
#include "resource.h"
class CKEGIESApp : public CWinApp
{
public:
CKEGIESApp();
virtual BOOL InitInstance();
virtual int ExitInstance();
afx_msg void OnAppAbout();
DECLARE_MESSAGE_MAP()
afx... |
//对象数组
class Sample
{
public:
void Sample() {cout<<"This is a sample!"<<endl;}
};
int main(int argc,char** argv)
{
Sample* mySampleArray=new Sample[4];
delete [] mySampleArray;
}
//指针数组
int main(int argc,char** argv)
{
Sample** mySampleArray=new Sample*[4];
for(i=0;i... |
//Andrea Peña Calvin
//#include "tablero.h"
//#include "cartas.h"
#include "puntuacion.h"
#include "jugador.h"
#include <conio.h>
const int VMIN = 0;//valor minimo aceptado en las opciones de juego
const int VMAX = 2;//valor maximo aceptado en las opciones de juego
/////////////////
int leeOpcion() {
... |
/*
137.03599913
*/
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <set>
#include <vector>
#include <string>
#include <iostream>
#include <map>
#include <cstring>
#define loop(i,s,e) for(int i = s;i<=e;i++) //including end point
#define pb(a) push_back(a)
#define sqr(x) ((x)*(x))
#define CI... |
#include <catch2/catch.hpp>
#include <cstdint>
#include <omtalk/Handle.h>
using namespace omtalk;
using namespace omtalk::gc;
TEST_CASE("EmptyScope", "[garbage collector]") {
RootHandleScope rootScope;
REQUIRE(rootScope.handleCount() == 0);
}
TEST_CASE("EmptyInnerScope", "[garbage collector]") {
RootHandleScop... |
#ifndef HW_TIMER_H
#define HW_TIMER_H
#ifdef ANDROID
#include <sys/time.h>
#else
#include <Windows.h>
#endif
namespace HW
{
class Timer
{
public:
Timer()
{
this->restart();
}
void restart()
{
#ifdef ANDROID
timeval val;
gettimeofday(&val,NULL);
m_start_time = double(val.tv_sec)* 1000.0f + dou... |
//*********************************************************************************
// Universidad de Costa Rica
// Estructuras de Computadores Digitales II
// Tarea 1: Simulador de Cache
// I Ciclo 2017
//
// ... |
#include <stdio.h>
#include <string.h>
char *nurinpäin(char *pMerkkijono) // Funktio joka syötetään merkkijonolle
{
char *pAlku = pMerkkijono; // Ensimmäinen osoitin merkkijonon alkuun
char *pLoppu = pAlku + strlen(pMerkkijono) - 1; // Toinen osoitin merkkijonon loppuun
while (pLoppu > pAlku) ... |
#pragma once
class QWidget;
class PassedTest;
class PassedTestForm;
namespace PassedTestAssembler {
PassedTestForm *assembly(const PassedTest &passedTest,
QWidget *parent = nullptr);
}
|
#include <iostream>
using namespace std;
int findTransitionPoint(int a[], int n)
{
int lb = 0, ub = n-1;
while (lb <= ub)
{
int mid = (lb+ub)/2;
if (a[mid] == 0)
lb = mid+1;
else if (a[mid] == 1)
{
if (mid == 0 || (mid > 0 && a... |
#include <Wire.h>
/* pins */
const uint8_t led_pin = 13;
volatile bool led_on = false;
/* messages */
const uint8_t msg_on = 0x1;
const uint8_t msg_off = 0x2;
/* i2c addresses */
const uint8_t adr_slave = 0x02;
volatile bool scomm = false;
volatile bool next = msg_on;
void TC7_Handler (void)
{
uint32_t statu... |
#include "03_StackAndQueue/04_Hanoi/Hanoi.h"
#include "demo_func.h"
using namespace std;
void test_Hanoi_demo() {
int scale = 0;
cout << "pls input Hanoi's scale:";
cin >> scale;
sq_stack_t x = {0};
sq_stack_t y = {0};
sq_stack_t z = {0};
init_stack_sq(&x);
x.stack_name[0] = 'x';
init_stack_sq(&y);
... |
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
class Farm{
public:
int n = 0;
int m = 0;
int num = 0;
int matrix[50][50] = {0,};
bool visited[50][50] = {false, };
void setFarm(){
cin >> m >> n >> num;
for(int i = 0; i < num; i++){
int x... |
/**
* @file conv_1d.cc
* @author Gerbrand De Laender
* @date 31/03/2021
* @version 1.0
*
* @brief E091103, Master thesis, HLS testing
*
* @section DESCRIPTION
*
* 1D convolution of arrays A and B with storage of B.
*
*/
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <assert.h>
... |
#include<iostream>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
double r[1001000],c[1001000];
int main()
{int n;
while (cin >> n && n)
{for (int i = 0; i < n; i++)
cin >> r[i] >> c[i];
sort(r,r+n);
s... |
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int cal_digit(ll X){
int count = 0;
while(X){
X/= 26;
count++;
}
return count;
}
int main(){
ll N;
cin >> N;
int x = cal_digit(N);
vector<ll>A(x); //26進数の桁数ぶんの配列
for(int i = 0; i<x; i++){
A[i]... |
class Solution {
public:
int uniquePaths(int m, int n) {
int A[102][102] = {};
A[0][1] = 1;
for(int i=1;i<=m;i++)
for(int j=1;j<=n;j++)
A[i][j] = A[i][j-1] + A[i-1][j];
return A[m][n];
}
}; |
// Created on: 1992-09-22
// Created by: Gilles DEBARBOUILLE
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of th... |
#pragma once
#include "Test.h"
#include <memory>
#include "VertexArray.h"
#include "VertexBuffer.h"
#include "IndexBuffer.h"
#include "Shader.h"
#include "Texture.h"
namespace test {
class TestTexture2D : public Test
{
public:
TestTexture2D();
~TestTexture2D();
void OnUpdate(float deltaTime) override;
vo... |
#include "font.hpp"
static GLuint FONT_VAO = 0;
static GLuint FONT_VBO = 0;
static shader_t *FONT_SHADER;
static std::map<GLchar, glyph_t> glyphs;
void setup_text_renderer(shader_t *shader, char const * font_path )
{
assert(shader);
FONT_SHADER = shader;
FT_Library ft;
if ( FT_Init_FreeType(&ft) ) ... |
/*
** EPITECH PROJECT, 2018
** cpp_indie_studio
** File description:
** Math.hpp
*/
#ifndef Math_HPP
#define Math_HPP
#include "Point.hpp"
#include <cstddef>
class Math
{
public:
Math() = delete;
static size_t roundUp(size_t numToRound, size_t multiple);
static size_t manhattanDistance(Point const & from, Poin... |
#ifndef __VIVADO_SYNTH__
#include <fstream>
using namespace std;
// Debug utility
ofstream* global_debug_handle;
#endif //__VIVADO_SYNTH__
#include "max_pool_opt_compute_units.h"
#include "hw_classes.h"
struct in_in_update_0_write0_merged_banks_2_cache {
// RAM Box: {[0, 112], [0, 127], [0, 31]}
// Capacity: ... |
#include "stdafx.h"
#include "Editor.h"
#include <Physics/Utilities/CharacterControl/CharacterProxy/hkpCharacterProxy.h>
#include <Physics/Utilities/CharacterControl/StateMachine/hkpDefaultCharacterStates.h>
#include <Physics/Collide/Filter/Group/hkpGroupFilter.h>
#include <Physics/Utilities/Collide/Filter/Gro... |
#pragma once
#include <QStyledItemDelegate>
#include <QPainter>
class UserItemDrawer : public QStyledItemDelegate
{
Q_OBJECT
public:
UserItemDrawer(QObject* parent);
~UserItemDrawer();
private:
virtual QSize sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const;
virtual void paint(QPai... |
#pragma once
#include "cocos2d.h"
USING_NS_CC;
class Game : public Layer
{
public:
Game(void);
~Game(void);
CREATE_FUNC(Game);
static Scene* createScene();
virtual bool init();
virtual void menuCallBack(Ref * obj);
static int sepWidth;
static int sepHeight;
Vector<SnakeNode *> allBody;
};
|
#include <iostream>
using namespace std;
template<typename T>
struct Node {
Node *next = nullptr;
T value;
};
template<typename T>
class list {
public:
Node<T> *head;
int size;
list() {
head = nullptr;
size = 0;
}
~list() {
clear();
}
void add... |
/*
Find next higher number with same digits.
Example 1 : if num = 25468, o/p = 25486
25468
21765
25761
26751
_
Example 2 : if num = 21765, o/p = 25167
Example 3 : If num = 54321, o/p = 54321 (cause it's not possible to gen a higher num than tiz with given digits ).
*/
#include <iostream>
#include <vector>
using ... |
// Copyright (c) 2020 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// 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.1 as published
// by the Free Software Foundation, with special ... |
#ifndef __ASSOCIATIVEARRAY_H__
#define __ASSOCIATIVEARRAY_H__
#include <string>
struct Node{
Node* next;
std::string key;
int value;
Node(std::string newk, int newv): next(NULL), key(newk), value(newv){}
};
class AssociativeArray{
private:
Node* top;
public:
AssociativeArray();
virtual ~AssociativeArray();
void cle... |
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Toolkits/BaseToolkit.h"
#define MY_EDITOR_API
class FPakMapToolsModuleEdModeToolkit : public FModeToolkit
{
public:
FPakMapToolsModuleEdModeToolkit();
/** FModeToolkit interface */
virtual void Init(con... |
#include "pitches.h"
float distanceM(int trigPin, int echoPin) {
digitalWrite(trigPin, LOW);
delayMicroseconds(3);
digitalWrite(trigPin, HIGH);
delayMicroseconds(5);
digitalWrite(trigPin, LOW);
// echo
float v = 331.5 + 0.6 * 20;
float tUs = pulseIn(echoPin, HIGH);
float t = tUs / 1000.0 / 1000.0 /... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2005 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef SVG_ANIMATION_INTERVAL_H
#define SVG_ANIMATION_INTERVAL_H
#ifd... |
/*
** EPITECH PROJECT, 2021
** htop-ncurses
** File description:
** htop
*/
#ifndef HTOP_HPP_
#define HTOP_HPP_
// struct Cursor {
// size_t x;
// size_t y;
// };
#include <iostream>
#include <curses.h>
#include <string>
#include "Module.hpp"
class Htop {
public:
Htop();
Htop(Htop const&... |
#include "stdafx.h"
#include "Bloom.h"
#include "PostEffect.h"
Bloom::Bloom()
{
InitShader();
InitRenderTarget();
InitAlphaBlendState();
InitConstantBuffer();
InitSamplerState();
}
Bloom::~Bloom()
{
if (m_disableBlendState != nullptr) {
m_disableBlendState->Release();
}
if (m_blurParamCB != nullptr) {
m_... |
//
// Created by biega on 10.03.2018.
//
#ifndef TANKSMAPGENERATOR_WATER_H
#define TANKSMAPGENERATOR_WATER_H
#include "tile.h"
class Water: public Tile{
public:
Water(int a, int b);
void onHit() override;
void onHover() override;
};
#endif //TANKSMAPGENERATOR_WATER_H
|
/**
* Copyright (c) 2007-2012, Timothy Stack
*
* 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 ... |
#include<iostream>
#include<array>
#include<cmath>
// The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million.
int main() // Very slow solution
{
// Use the sieve of Eratosthenes to find primes. This implementation seems quick enough but can be optimized.
size_t sum{0};... |
#include <string>
using std::string;
#include <vector>
using std::vector;
#include <iostream>
vector<string> &split( const string &str, const string &delimiters, vector<string> &elems, bool skip_empty = true ) {
string::size_type pos, prev = 0;
while ( ( pos = str.find_first_of(delimiters, prev) ) != string::n... |
#include<stdio.h>
int main()
{
int i,j,n;
printf("Press any Number: ");
scanf("%d", &n);
for(i=n; i>=1; i--)///this i using for per line
{
for(j=1; j<=i; j++)///this j is using for printing *
{
printf("*");
}
printf("\n");
}
}
|
#ifndef CLIENTLISTMODEL_H
#define CLIENTLISTMODEL_H
#include <QAbstractListModel>
#include <QModelIndex>
#include <QVariant>
#include <QHash>
#include <QList>
class ClientListModel : public QAbstractListModel
{
Q_OBJECT
public:
ClientListModel(QObject* parent = 0);
int rowCount(const QModelIndex &parent)... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <iostream>
#include "mp3manager.h"
#include "mp3filemanager.h"
#include "taglib/taglib/tag.h"
#include "bass/bass.h"
#include <string>
#include "mp3player.h"
#include <thread>
#include <QTimer>
#include <cstdlib>
MainWindow::MainWindow(QWidget *parent) :
Q... |
//
// Stack.hpp
// DataStructures
//
// Created by Tri Khuu on 2/5/18.
// Copyright © 2018 TK. All rights reserved.
//
#ifndef Stack_hpp
#define Stack_hpp
#include "../LinkedList/linked_list.hpp"
namespace Stack
{
template<class T>
class Stack
{
private:
LinkedList::SingleLinkedList<T... |
/*
* =====================================================================================
*
* Filename: vector_resize.cpp
*
* Description:
*
* Version: 1.0
* Created: 02/05/2014 15:46:27
* Revision: none
* Compiler: gcc
*
* Author: Ankit Goyal
* Organiz... |
#pragma once
#include "..\resource.hpp"
namespace leaves { namespace pipeline
{
template <typename Impl>
class buffer : public resource
{
using traits_type = buffer_traits<Impl>;
protected:
buffer(
string name, // resource name
size_t elem_size, // element size
size_t elem_count, // elemen... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
// only gravity will pull me down
// Shortest Common Supersequence
int t;
cin >> t;
string str1, str2;
while (t--) {
cin >> str1 >> str2;
int m=str1.size(), n=str2.size();
int dp[m+1][n+1];
for(int i=... |
#pragma once
class Point_2D {
public:
double x;
double y;
Point_2D();
Point_2D(double x, double y);
}; |
/* -*- mode: c++; tab-width: 4 -*-
**
** Copyright (C) 2009 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Test for Protocol Buffer wire format and proto types.
**
** Jan Borsodi
*/
group "protobuf.order";
require... |
/*
The contents of this file are dedicated by all of its authors, including
Michael S. Gashler,
to the public domain (http://creativecommons.org/publicdomain/zero/1.0/).
*/
#include <stdio.h>
#include <stdlib.h>
#include <exception>
#include <iostream>
#include <vector>
#ifdef WINDOWS
# include... |
/*
* Developer : Prakriti Chintalapoodi - c.prakriti@gmail.com
Code Reference : SIFT Implementation by Jun Liu
*/
#include "sift.h"
// Constructor that sets number of octaves and scales
sift::sift(Mat source, int num_octaves, int num_scales)
: source(source), num_octaves(num_octaves), num_scales(num_scales)
... |
#include <iostream>
namespace vstd {
template<typename For, typename T>
void uninitialized_fill(For beg, For end, T const& x) {
For p;
try {
for (p=beg; p!=end; ++p)
::new (static_cast<void*>(&*p)) T(x); // construct T in the *p
} catch (...) {
for (For q=beg; q!=p; ++q)
... |
#pragma once
#include "external/miniaudio.h"
#include "conductor.h"
#include "func.h"
#include "sink.h"
class Sink;
class Audio : public QObject {
Q_OBJECT
Q_PROPERTY(QString outName READ outName WRITE setOutName NOTIFY changed)
Q_PROPERTY(QString inName READ inName WRITE setInName NOTIFY changed)
... |
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int vx[] = {1,-1,0,0};
int vy[] = {0,0,1,-1};
bool map[100][100] = {false};
class CrazyBot
{
public:
struct Point
{
int x;
int y;
};
double dirProb[4];
void setDirProb(int east, int west, int south, int north)
{
this->dirPro... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software ASA 2009-2011
*
* WebGL GLSL compiler -- symbol table.
*
*/
#include "core/pch.h"
#ifdef CANVAS3D_SUPPORT
#include "modules/webgl/src/wgl_base.h"
#include "modules/webgl/src/wgl_string.h"
#include "modu... |
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe ResourceRibbon.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "EditorRibbon.h"
/* CodeP... |
#pragma once
#include <iostream>
using namespace std;
class Complex
{
public:
Complex(double xx = NULL, double yy = NULL);
void dis();
Complex& operator+=(const Complex& another);
Complex& operator++();
const Complex& operator++(int);
friend ostream& operator<<(ostream& os, const Complex& c);
friend istream& op... |
#include<bits/stdc++.h>
using namespace std;
main()
{
char a, b;
while(cin>>a>>b)
{
if(a==b)cout<<"H"<<endl;
else
cout<<"D"<<endl;
}
return 0;
}
|
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "ObjectInfo.h"
#include "InteractorComponent.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class FPS_TEST_5_API UInte... |
//
// Iterator.cpp
// Sorted_Doubly_Linked_List
//
// Created by 세광 on 2021/08/12.
//
#include "Iterator.hpp"
Iterator::Iterator(const DoublyLinkedList &dlist) : dList(dlist), pCurPointer(dlist.GetpFirst()) {}
Iterator::~Iterator() {}
DoublyLinkedList Iterator::GetdList() const { return dList; }
NodeType* Iterato... |
// ----------------------------- PaintPot ----------------------------
// | Copyright (C) 2018 - Yuriy Murenko |
// | free for non-commercial use |
// | www.murenko.com |
// |--------------------------------... |
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow ui;
app.setApplicationVersion (VERSION);
app.setApplicationName (APP_NAME);
if(ui.init())
{
ui.show();
return app.exec();
}
else
{
r... |
#ifndef GAMEBOARD_H
#define GAMEBOARD_H
#include <QTableWidget>
#include "cellbrush.h"
#include "gamecell.h"
#include "gamelogic.h"
class GameBoard : public QTableWidget
{
Q_OBJECT
public:
explicit GameBoard(QWidget *parent = 0);
~GameBoard();
void refresh();
void SetNumberRowsColumns(int rows, i... |
#include "ODBCStatement.hh"
#include "errors.hh"
#include "ConnectionAwareStatement.hh"
#include "delegation.hh"
#include "StatementCommands.hh"
namespace NC {
using NC::StatementCommands;
using NC::ODBCConnection;
const char* ODBCStatement::js_class_name = "ODBCStatement";
Nan::Persistent<v8::FunctionTemplate> OD... |
// Copyright Ben Tristem 2016.
#pragma once
#include "GameFramework/GameMode.h"
#include "BEGameCome.generated.h"
/**
*
*/
UCLASS()
class BUILDINGESCAPE_API ABEGameCome : public AGameMode
{
GENERATED_BODY()
};
|
#include "benchmark.hh"
using namespace tensor;
static void BM_TensorInitialization(benchmark::State &state)
{
size_t dim = state.range(0);
for (auto _ : state)
Tensor<int32_t, 5>({dim, dim, dim, dim, dim});
}
BENCHMARK(BM_TensorInitialization)->RangeMultiplier(2)->Range(2, 4 * sizeof(size_t));
static void... |
#include <iostream>
#include<stdlib.h>
#include<time.h>
#include<math.h>
using namespace std;
int n;
int lanzamientos_dardos(int n)
{
int dardos=0;
for(int i=0;i<n;++i)
{
double x,y;
srand(time(0));
x=rand()/(double)RAND_MAX;
y=rand()/(double)RAND_MAX;
if(sqrt(x*x+y*y... |
/*
* This code finds the state of water in given
* temperature and altitudes (in each 300 meters
* boiling point drops 1 degree celsius)
* (*1) ---> if(unit=='C'){
* printf("Celsius");
* }
* else {
* printf("Fahrenheit");
* }
*/
#include <stdio.h>
#include <st... |
#include <movement.h>
#include <sensorbar.h>
using namespace constants;
SensorBar mySensorBar(SX1509_ADDRESS);
int *stones;
boolean *side;
/*
Drive.cpp contains all the functions related to movement of the robot through the drive motors.
This file needs a lot of thought and redesigning as we test things and make de... |
// ----------------------------------------------------------------------------
// Copyright (C) 2002-2006 Marcin Kalicinski
//
// 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)
//
// For more information,... |
// 오답사유 : for(int j = 0; j <= sqrt(i); j++) 와
// for(int j = 0; j < sqrt(i)+1; j++)는 다르다
#include <iostream>
#include <cmath>
#define FOR(x,s,e) for(int (x) = (s); (x) < (e); x++)
using namespace std;
int main()
{
int in_start, in_end, p_min;
long long p_sum;
int check;
p_sum = 0;
p_min = -1;
... |
ReactDOMRe.renderToElementWithId(
<App message="Welcome to React and Reason" />,
"root",
);
|
#include <bits/stdc++.h>
using namespace std;
const int maxn = 5010;
int n;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d%d", a[i].x, a[i].y);
}
return 0;
}
|
/*
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
*/
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), ... |
/*
........eWorld ReSearch 2004
........Alessandro Polo
........http://www.ewgate.net
........=====================
........This software is freeware. Project is Open Source.
........Keep Author's Credits if you use any part of this software.
........=====================
........Project State: Completed
........Projec... |
#include "Spark.h"
#include "SparkIO.h"
/* SparkIO
*
* SparkIO handles communication to and from the Positive Grid Spark amp over bluetooth for ESP32 boards
*
* From the programmers perspective, you create and read two formats - a Spark Message or a Spark Preset.
* The Preset has all the data for ... |
#include<stdio.h>
int main ()
{
int i,n=0,a[100000],a1=0,a2=0,a3=0,a4=0;
for(i=0;i<100000;i++)
{
scanf("%d",&a[i]);
if(a[i]!=1&&a[i]!=0)
{
break;
}
n++;
}
n--;
for(i=0;i<n;i++)
{
if(a[i]==0 && a[i+1]==0)
{
a1++;
}
else if(a[i]==0 && a[i+1]==1)
{
a2++;
}
else if(a[i]==1 && a[i+1]=... |
//
// Created by payaln on 20.02.2019.
//
#include "Actions.h"
void Actions::Build() const {
auto run = new RunAction;
auto event = new EventAction(run);
auto track = new TrackAction(event);
SetUserAction(new StepAction(track));
SetUserAction(track);
SetUserAction(event);
SetUserAction(run)... |
#include "DrawScene.h"
#include "Camera.h"
#include "Keyboard.h"
#include "text2D.hpp"
#include "ObjFile.h"
#include <windows.h>
#include <shellapi.h>
#include <iostream>
std::string global_PathsToObjects="";
void DropCallback(GLFWwindow* window, int count, const char** paths)
{
int i;
for (i = 0; i < count;... |
#pragma once
#include <ionshared/misc/named.h>
#include "construct.h"
namespace ionir {
class Pass;
typedef ionshared::PtrSymbolTable<Type> Fields;
struct Struct : public Construct, public ionshared::Named {
Fields fields;
Struct(std::string name, Fields fields);
void accept(Pa... |
#include <iostream>
#include "Log.h"
int multiply(int a , int b) { // function with int as a return and 2 parameters
return a * b;
}
int sum() { // function with int as a return but no parameters
return 4 + 4;
}
int main() {
initLog(); // we need the header file with the declaration
std::cout << mult... |
#include <heap.h>
#include <sequtils.h>
int main(int argc, char **argv)
{
std::vector<int> data;
populate_rand(data, 100);
// sort in small to large order
std::vector<int> asc;
Heap<int> h1(data);
while(!h1.empty()) {
asc.push_back(h1.remove());
}
// sort in large to small order
std::vector<int... |
/*
https://www.acmicpc.net/problem/1924
*/
#include <iostream>
#include <string>
using namespace std;
namespace DAY {
enum {
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
};
const int MONTH[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
const string DAY[7] = { "SUN", "MON", "TUE", "WED", "THU",... |
#ifndef ISA_LOAD_H
#define ISA_LOAD_H
#include <map>
#include <functional>
#include "formats.h"
/*
* LOAD-type instruction implementation
*/
namespace selen {
namespace isa {
struct LOAD
{
enum {TARGET = OP_LOAD};
typedef formatI format_t;
explicit LOAD(format_t l) : data(l)
{}
void perf... |
#pragma once
#include "bound_buffer.hpp"
extern "C" void getJson(bound_buffer * target, char const * const);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.