text stringlengths 8 6.88M |
|---|
#include <bits/stdc++.h>
#include <sys/resource.h>
using namespace std;
#include "State.h"
#include "Table.h"
#include "Algorithms/dfs.h"
#include "Algorithms/bfs.h"
#include "Algorithms/aStar.h"
#include "init.h"
#define DEBUG if(0)
#define lli long long int
int main(int argc, char **argv)
{
init;
n = atoi(argv[... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#include "core/pch.h"
#ifdef ACCESSIBILITY_EXTENSION_SUPPORT
#i... |
#ifndef MAGICWEAPON_H
#define MAGICWEAPON_H
#include <Weapon.h>
#include "Character.h"
class MagicWeapon : public Weapon
{
public:
MagicWeapon(string name="DEFAULT", int damages=1, int hit=85, int range=1, int crit=0, int worth=1, int uses = 40, WeaponType type=WeaponType::light);
virt... |
#pragma once
#include "Game.hpp"
#include "Entity.hpp"
#include <queue>
class botAI : public Entity
{
public:
void move();
bool alive;
void solve(int sr, int sc, int map[Game::MAP_HEIGHT][Game::MAP_WIDTH]);
void updatePath();
void initializeBot(int map[Game::MAP_HEIGHT][Game::MAP_WIDTH]);
bool r... |
#define Z_AT_DIALOGWINDOW 711197
#define Z_AT_SELLABLELIST 7401
#define Z_AT_SELLINGLIST 7402
#define Z_AT_BUYABLELIST 7421
#define Z_AT_BUYINGLIST 7422
#define Z_AT_CONTAINERINDICATOR 7408
#define Z_AT_ITEMINFO 7445
#define Z_AT_SLOTSDISPLAY 7404
#define Z_AT_TRADERLINE1 7412
#define Z_AT_TRADERLINE2 7413
#define Z_AT... |
// Created on: 1995-02-22
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-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 the G... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* @file
* @author Owner: Karianne Ekern (karie)
*
*/
#ifnd... |
#ifndef STATSUTILITY_H
#define STATSUTILITY_H
#include <cstdint>
#define ZERO 0
#define MINUTES_STRING "Minute(s)"
#define HOURS_STRING "Hour(s)"
#define DAY_STRING "Day"
#define WEEK_STRING "Week"
#define MONTH_STRING "Month"
#define SECONDS_IN_MINUTE 60
#define SECONDS_IN_HOUR 3600
#define SECONDS_IN_DAY 86400
#def... |
#include "hexagon.h"
#include <math.h>
#include <QVector>
#include <QPointF>
#include <QPolygonF>
#include <QPainter>
#include <QColor>
#include <string>
#include "type.h"
using namespace std;
Hexagon::Hexagon(int sideSize, float x, float y, int i, int j, enum Type type, QGraphicsItem * parent)
{
QVector<QPointF... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#include "core/pch.h"
#ifdef MEDIA_JIL_PLAYER_SUPPORT
#includ... |
// Copyright (c) 2017 Mikael Simberg
//
// 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)
// Simple test verifying basic resource_partitioner functionality.
#include <pika/ass... |
#ifndef CLOSEST_LIGHT_LOOP_FUNCTIONS_H
#define CLOSEST_LIGHT_LOOP_FUNCTIONS_H
#include <argos3/core/simulator/loop_functions.h>
#include <argos3/core/simulator/entity/floor_entity.h>
#include <argos3/core/utility/math/range.h>
#include <argos3/core/utility/math/rng.h>
#include <argos3/plugins/robots/loot-bot/simulator... |
// Encoding_Error.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <string>
#define WINDOW 25
int main()
{
std::string data;
std::vector<long long> encoded_data;
while (std::getline(std::cin, data)) {
... |
#pragma once
#include "BWAPI\Game.h"
namespace BroodWar
{
/// <summary>
/// AiBase is a abstract class that is intended to be implemented or inherited by a custom AI class.
/// </summary>
/// <remarks>
/// Using BWAPI in a different thread than the default one will produce unexpected results and possibly crash t... |
#include "MSSQLConverter.hpp"
#ifndef _XSTRING_
#include <xstring>
#endif
void Elysium::Data::Utility::MSSQLConverter::Translate(Querying::QueryExpression * Query)
{
std::string SqlQuery = "SELECT ";
if (Query->RowCount > 0)
{
SqlQuery += "TOP " + std::to_string(Query->RowCount) + " ";
}
if (Query... |
/*
Author : AMAN JAIN
DATE: 04-07-2020
PROGRAM -> Knapsack Dp
Time Complexity: O(N*W).
where ‘N’ is the number of weight element and ‘W’ is capacity. As for every weight element we traverse through all weight capacities 1<=w<=W.
Auxiliary Space: O(N*W).
The use of 2-D array of size ‘N*W’.
*/
#include<bits/stdc+... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofEnableAlphaBlending();
//load audio
mSound.load("rapgod.mp3");
//set up visual
ofSetFrameRate(60);
mesh.setMode(OF_PRIMITIVE_LINES);
mesh.enableColors();
mesh.... |
//
// 88 Merge Sorted Array.cpp
// leetcode
//
// Created by Xujian CHEN on 5/25/20.
// Copyright © 2020 Xujian CHEN. All rights reserved.
//
/*
88. Merge Sorted Array
Easy
2008
3948
Add to List
Share
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Nerucci.h"
#include "ShipAIController.h"
#include "NerucciPawn.h"
AShipAIController::AShipAIController(const FObjectInitializer & OI) : Super(OI)
{
PrimaryActorTick.bCanEverTick = true;
}
void AShipAIController::Possess(APawn* ... |
/* https://www.codechef.com/NOV14/problems/DISCHAR/ */
#pragma warning(disable:4786)
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/stack:16777216")
#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);
#define endl '\n'
#define gc getchar
#define file freopen("iceparti... |
/**
* Copyright (C) Omar Thor, Aurora Hernandez - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*
* Written by
* Omar Thor <omar@thorigin.com>, 2018
* Aurora Hernandez <aurora@aurorahernandez.com>, 2018
*/
#ifndef DMTK_ALGORI... |
#include "Renderer.h"
#include <cmath>
#include <iostream>
#include <pthread.h>
using namespace std;
//{{{ Variations
void identity(const Point& src, Point& dst){
dst.x=src.x;
dst.y=src.y;
}
void spherical(const Point& src, Point& dst){
double mag = src.x * src.x + src.y * src.y + 1;
dst.x = src.x/mag;
... |
#ifndef GNTALLOCATORCOLLECTION_H
#define GNTALLOCATORCOLLECTION_H
template <class T> class GnTMallocInterface
{
public:
static T* Allocate(unsigned int uiNumElements)
{return GnAlloc(T, uiNumElements);};
static void Deallocate(T* pArray)
{GnFree(pArray);};
};
template <class T> class GnTNewInterface
{
public:
... |
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
using namespace std;
//Given an array of integers, find two numbers such that they add up to a specific target number.
//The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2008 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef _URL2_CRCOMM_
#define _URL2_CRCOMM_
#include "modules... |
//Accepted. Time-0.000s
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
int main()
{
ll f,r;
long double mx;
while(cin>>f)
{
if(f==0) break;
cin>>r;
ll fa[f],ra[r];
long double d[f*r];
for(int i=0;i<f;i++)
{
... |
#ifndef _HELPERS_H
#define _HELPERS_H 1
#include <stdio.h>
#include <stdlib.h>
#include <limits>
/*
* Macro de verificare a erorilor
* Exemplu:
* int fd = open(file_name, O_RDONLY);
* DIE(fd == -1, "open failed");
*/
#define DIE(assertion, call_description) \
do { \
if (asse... |
//
// This file contains the C++ code from Program 11.8 of
// "Data Structures and Algorithms
// with Object-Oriented Design Patterns in C++"
// by Bruno R. Preiss.
//
// Copyright (c) 1998 by Bruno R. Preiss, P.Eng. All rights reserved.
//
// http://www.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs... |
#include<stdio.h>
int a,b,c,s;
main()
{
scanf("%d %d",&a,&b);
while(a!=0)
{
c=a%10;
a=a/10;
if(c==b)
{
s=s+1;
}
}
printf("%d",s);
}
|
#include "mModule.h"
#include <iostream>
using namespace std;
int main(){
SoftwareDeveloper();
std::cout << "HELLO!\n\n\n";
return 0;
}
|
//
// Created by Benoit Hamon on 10/3/2017.
//
#pragma once
#include <string>
#include <boost/thread/thread.hpp>
#include "IModuleCommunication.hpp"
#include "Client.hpp"
class ModuleCommunication : public IModuleCommunication {
public:
ModuleCommunication(Client &client);
~ModuleCommunication();
publi... |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using llong = long long;
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie(0);
llong k, n;
std::cin >> k >> n;
std::vector<llong> dat... |
#ifndef MYLINKEDLIST_H
#define MYLINKEDLIST_H
#include "mynode.h"
#include <iostream>
using namespace std;
/*!
* \brief The MyLinkedList class
*/
class MyLinkedList
{
public:
MyLinkedList();
void addNode(MyNode *);
void addRoot(MyNode *);
void rmvNodeByMatrikelnNr(int);
void rmvAll();
int ... |
#pragma once
#include "EntityQtImpl.h"
namespace qi {
namespace entity {
namespace qt {
typedef EntityQtImpl<QString> CodeEntity;
}
}
}
|
#pragma once
#using <mscorlib.dll>
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/InitializePasses.h"
namespace LLVM
{
ref class raw_ostream;
ref class ModulePass;
ref class FunctionPass;
ref class BasicBlockPass;
ref class PassRegistry;
public ref class Passes
{
public:
static ModulePass ^createPrintMod... |
#ifndef RESIZE_H
#define RESIZE_H
#include "..\Statements\Statement.h"
#include "..\ApplicationManager.h"
#include "Action.h"
class Resize : public Action
{
private:
string type; //Position where the user clicks to add the stat.
Statement* Stat;
public:
Resize(ApplicationManager *pAppManager);
//Read Assignemt... |
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
int ramenPrice = 700;
for (char c : s) {
if (c == 'o') ramenPrice += 100;
}
cout << ramenPrice << endl;
return 0;
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2010 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
/**
* @file OCSPCertificateChainVerifier.cpp
*
* OCSP certificate c... |
#pragma once
#include <SFML/Window/Event.hpp>
#include "EventSubscriber.h"
namespace Game
{
class KeyboardSubscriber: public EventSubscriber
{
public:
virtual void onKeyPress(sf::Event::KeyEvent event) = 0;
virtual void onKeyUp(sf::Event::KeyEvent event) = 0;
void onEvent(sf::Event event) override;
};
}
|
#include <stdio.h>
#include <stdlib.h>
#include <memory>
#include <libgen.h> // basename
#include <reactor/base/SimpleLogger.h>
#include <reactor/net/EventLoop.h>
#include <reactor/net/TcpClient.h>
#include <reactor/net/TcpServer.h>
using namespace reactor::net;
class Stream {
public:
Stream(const TcpConnectionPtr ... |
#pragma once
#include <iostream>
#include "map.h"
#include "list.h"
class simplify
{
private:
int matrix[SIZE][SIZE];
void makeCubes(list_of_lists&, int, int); //Tao cac te bao lon
bool subset(list, list); //Kiem Tra trung` voi cac nhom khac
bool commonPair(Point, list_of_lists, int);// Tim kiem cac cap chung
v... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 100
#define INF 0x3f3f3f3f
#define DEVIATION 0.00000005
typedef long long LL;
int table[100][10];
int tmp[10];
int cnt = 0;
bool row[10],Left[20],Right[20];
void Queen(int k){
if( k == 8 ){
for... |
/****************************************************************************
Copyright (C) 2002-2014 Gilles Debunne. All rights reserved.
This file is part of the QGLViewer library version 2.6.3.
http://www.libqglviewer.com - contact@libqglviewer.com
This file may be used under the terms of the GNU General Pub... |
#ifdef TWEAK_ENABLE
#include "tweak.hpp"
#include "http.hpp"
#include <unordered_set>
#include <map>
#include <cassert>
#include <algorithm>
#include <mutex>
#include <thread>
#include <fstream>
#include <sstream>
//helpers used to convert utf8 strings to/from utf8-encoded JSON string values:
static bool json_to_utf... |
#include "stdafx.h"
#include "Vector.h"
#include "Matrix.h"
const CVector4 CVector4::Black = { 0.0f, 0.0f, 0.0f, 1.0f };
const CVector4 CVector4::Red = { 1.0f, 0.0f, 0.0f, 1.0f };
const CVector4 CVector4::Yellow = { 1.0f, 1.0f, 0.0f, 1.0f };
const CVector4 CVector4::White = { 1.0f, 1.0f, 1.0f, 1.0f };
const CVector4 C... |
#ifndef INPUTADAPTER_H
#define INPUTADAPTER_H
#include <osgGA/GUIEventHandler>
#include "components/Input.h"
#include "systems/EntitySystem.h"
#include "systems/CameraSystem.h"
namespace ld
{
class InputAdapter : public osgGA::GUIEventHandler
{
bool handle_mouse_move(
const osgGA::GUIEventAdapter& ea, osgGA::G... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Runtime/UMG/Public/Animation/WidgetAnimation.h"
#include "WidgetNoteBase.generated.h"
UENUM(BlueprintType)
enum class EType : uint8
{
TRIANGLE = 0,
CIRCLE... |
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
private:
QRect buttonCoords() const;
void moveButton();
QPoint generateValidPoint() const;
public:
explicit Widget(QWidget *parent = 0);
~Widget();
protected:
voi... |
#include<bits/stdc++.h>
using namespace std;
#define size_n 1000
#define size_p 1000
bool flag[size_n+5];
int prime[size_p+5];
int seive()
{
int val, i, j, total=0;
for(i=2; i<=size_n; i++)flag[i]=1;
val = sqrt(size_n)+1;
for(i=2; i<=val; i++)
{
if(flag[i])
{
for(j=i; ... |
#include "Camera.h"
#include "SceneNode.h"
#include "Movable.h"
#include "Entity.h"
#include "SubMesh.h"
#include "OMesh.h"
#include "SharedPointer.h"
#include "ElemIterator.h"
#include "Timer.h"
namespace HW
{
Camera::Camera(const string& name,SceneManager* creator)
: Movable(name,MT_CAMERA,creator),
m_derivedP... |
/*====================================================================
Copyright(c) 2018 Adam Rankin
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 limitati... |
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<stack>
#include<iostream>
using namespace std;
const int M = 4003;
vector<int> g[M];
vector<int> ans[M];
int dfn[M],low[M],col[M];
bool vis[M];
int t,n,num;
stack<int> ss;
void init()
{
for(int i=0;i<=2*n;++i){
... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "InteractableActor.h"
#include "Button1.generated.h"
/**
*
*/
UCLASS()
class FPS_TEST_5_API AButton1 : public AInteractableActor
{
GENERATED_BODY()
public:
AButton1();
};
|
#include "wnd.h"
Application *APP = NULL;
#define FPS_UNCAPPED 100000.0f
static char className [ ] = "Xeon::Window::Class";
Callbacks callbackfuncs;
void SetKeyCallbackFunc(void(*func)(int key, KeyState state)) {
callbackfuncs.key = func;
}
void DelKeyCallbackFunc(void) {
SetKeyCallbackFunc(0);
}
float Appl... |
#include "TestBench.hpp"
// Called by $time in Verilog
// converts to double, to match
// what SystemC does
double sc_time_stamp (void)
{
return 0;
}
|
#include "CellCoord.h"
#include "Maze3D.h"
#include "maze3dflyer.h"
void CellCoord::setCellState(Cell::CellState v) { maze.cells[x][y][z].state = v; }
bool CellCoord::isCellPassage(void) { return maze.cells[x][y][z].state == Cell::passage; }
// isCellPassageSafe() checks bounds, unlike isCellPassage().
bool... |
#ifndef GAST_NODE_H
#define GAST_NODE_H
#include <core/Godot.hpp>
#include <core/Ref.hpp>
#include <core/Vector2.hpp>
#include <core/Vector3.hpp>
#include <gen/CollisionShape.hpp>
#include <gen/ConcavePolygonShape.hpp>
#include <gen/ExternalTexture.hpp>
#include <gen/InputEvent.hpp>
#include <gen/MeshInstance.hpp>
#in... |
/*
Copyright 2022 University of Manchester
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 agreed to in writing, s... |
#pragma once
#include <QObject>
#include <functional>
#include "qmqttwill.h"
#include "qmqttprotocol.h"
#include "qmqtt_global.h"
//TODO: add SSL connectivity
//Currently only secure websockets are supported
class QMqttNetworkRequest;
class QString;
class QByteArray;
class QMqttClientPrivate;
class QTMQTT_EXPORT QMq... |
/**
Author: Elliott Waterman
Date: 09/01/2019
Description: Program to setup the date and time
of an RTC module.
Hardware:
Arduino Uno, DS3231 RTC.
Connect RTC SDA to Arduino pin A4.
Connect RTC SCL to Arduino pin A5.
*/
/* INCLUDES */
#include <DS3232RTC.h> //RTC library used to control the ... |
// Robert Fus
// CSCI 6626 - Object-Orientated Principles & Practices
// Program 6: Exceptions
// File: StreamErrors.cpp
// 10/22/2019
#include "StreamErrors.hpp"
//----------------------------------------------------------------
StreamErrors::StreamErrors(ifstream& strm) : fName(strm) {
cerr << "Stream Errors Ind... |
// Created on: 1994-12-22
// Created by: Christian CAILLET
// Copyright (c) 1994-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 the ... |
#include "util.h"
int main(int argc, char *argv[]) {
std::cout << argv[0] << '\n';
if (LLVMCoverage::isPositive(argc)) {
return EXIT_SUCCESS;
}
return EXIT_FAILURE;
}
|
// Carl Borillo
// CECS 282-01
// Prog 1- Solitaire Prime
// Due- February 8,2021
#ifndef DECK
#define DECK
#include "Card.h"
using namespace std;
class Deck
{
private:
Card storage[52];
char suits[4] = { 'S', 'H', 'D', 'C' };
char faces[4] = { 'A', 'J', 'Q', 'K' };
int top = 0;
public:
Deck();
void shuffle();... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.... |
#pragma once
////////////////////////////////////////////////////////////////////////////////
#include <string>
#include <vector>
////////////////////////////////////////////////////////////////////////////////
namespace FileDialog {
// -----------------------------------------------------------------------------
s... |
#include "H/math.h"
double sqrt(uint64 n)
{
if(n == 0)
return 0;
double result = 0;
/// search the decimal part
for(uint64 i = 0; pow(i, 2) < n; i++){
result++;
}
if(pow(result, 2) > n)
result--;
for(uint16 per = 1; per < 300; per++) /// search the floating par... |
//
// womenPres.cpp
// baekjoon
//
// Created by Honggu Kang on 2020/06/21.
// Copyright © 2020 Honggu Kang. All rights reserved.
//
#include <stdio.h>
#include "womenPres.h"
int peopleNumber(int f, int r){
int result;
if(f>=2){
int tmp=0;
for (int i=1;i<r+1;i++){
tmp = tmp+peo... |
#include "blockdata.h"
#include <fstream>
#include <boost/filesystem.hpp>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
BlockData::BlockData(const std::string &file)
{
using namespace std;
static const auto prefix = boost::filesystem::path("assets/models/block");
auto path = (prefix / file)... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* George Refseth (rfz)
*/
#include "core/pch.h"
#ifdef M2_SUPPO... |
#ifndef UDPFINDERCLIENT_H
#define UDPFINDERCLIENT_H
#include <QObject>
#include <QUdpSocket>
#include <QTimer>
#include "espdeviceinformation.h"
#pragma pack(1)
typedef struct _udpSendData {
uint8_t id;
uint8_t type;
uint8_t deviceNameSize;
int8_t deviceName[32];
} UdpSendData;
#pragma pack()
class ... |
#include "initialNodeGenerator.h"
using namespace qReal;
using namespace robots::generator;
void InitialNodeGenerator::generateBodyWithoutNextElementCall()
{
//nothing to add :-)
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef MODULES_OTL_CONSTITERATOR_H
#define MODULES_OTL_CONSTITERATOR... |
#pragma once
class GameCursor;
class SuperMonsterSelect;
struct chank
{
int monID = 0;
int stlen = 0;
char str[255];
};
class MonAIPresetSave :public GameObject
{
public:
void OnDestroy() override;
bool Start();
//初期化関数
//arg:
// ppms: シーンのインスタンス
// No: 何番目のプリセットか
// cursor: カーソル
void init(SuperMonsterSel... |
#ifndef TCPSERVERWIDGET_H
#define TCPSERVERWIDGET_H
#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QSqlDatabase>
#include <QString>
#include "databasewidget.h"
QT_BEGIN_NAMESPACE
namespace Ui { class TCPServerWidget; }
QT_END_NAMESPACE
class TCPServerWidget : public QWidget
{
Q_OBJECT
... |
//
// HEAP.cpp
// ADT
//
// Created by Jalor on 2020/12/25.
// Copyright © 2020 Jalor. All rights reserved.
//
#include "HEAP.hpp"
void Heap::onCreate(){
int i = 0;
srand(time(NULL));
for (i = 1; i <= MAX; i++) {
a[i] = 1 + rand() % 100;
}
}//创建数组
void Heap::heapSort(int n){
int i = 0... |
/*
向右,向下,向左,向上依次遍历,但是在遍历过程中要保证矩阵还有元素没遍历完,
即要求满足up<=down && left <= right。
*/
class Solution {
public:
vector<int> printMatrix(vector<vector<int> > matrix) {
vector<int> result;
if(matrix.size() == 0) return result;
int row = matrix.size(), col = matrix[0].size();
int up = 0, down = r... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2011 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* Pleasant surprise: OpDLL can be implemented using POSIX.
* Based on platforms/unix/... |
#include "stdafx.h"
#include "location.h"
Location::Location()
{
}
Location::~Location()
{
}
void Location::Init()
{
}
void Location::Render()
{
} |
#ifndef CORE_H
#define CORE_H
#include <QObject>
#include "globalsetting.h"
class Core : public QObject
{
Q_OBJECT
public:
~Core();
static Core *instance();
protected:
explicit Core(QObject *parent = 0);
void initialize();
private:
GlobalSetting *_main_settings;
static Core* _core_instanc... |
#include<iostream>
#include<time.h>
using namespace std;
void shells_sort(int* a, int n)
{
int d = n;
while (true)
{
d = d / 2;
for (int i = 0; i < d; i++)
{
for (int j = i + d; j < n; j++)
{
//we got the first element
int e = j - d;
//the element to be inserted
int temp = a[j];
/... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Squad.hpp :+: :+: :+: ... |
#include "xbee.h"
/// Linux sleep
#include <unistd.h>
/// Printing
#include <QDebug>
XBee::XBee(QObject *parent, QString uartFileName, QString pan, QString destinationHigh, QString destinationLow) :
QObject(parent)
{
qDebug() << "Configuring XBee... " << uartFileName;
// Assign the filename
m_UartF... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <quic/common/TimeUtil.h>
#include <quic/state/QuicAckFrequencyFunctions.h>
namespace quic {
bool canSendAckControlFram... |
$NetBSD$
* support getting the cpu count on netbsd, openbsd and irix
--- sql/resourcegroups/platform/thread_attrs_api_apple.cc.orig 2019-12-09 19:53:17.000000000 +0000
+++ sql/resourcegroups/platform/thread_attrs_api_apple.cc
@@ -24,6 +24,10 @@
#include <sys/sysctl.h>
#include <sys/types.h>
+#ifdef IRIX5
+#includ... |
#include <iostream>
//#include <thread>
//#include <chrono>
//#include <ShellApi.h>
//#include <WinUser.h>
#include <Windows.h>
void PrintMenu();
int ReadIn();
int main() {
setlocale(LC_ALL, "ru");
PrintMenu();
int in;
in = ReadIn();
switch (in)
{
case 1:
/*BOOL CreateProcess(
LPCSTR lpApplicationNam... |
#include "GameOverProc.h"
#include "HallHandler.h"
#include "Logger.h"
#include "GameCmd.h"
#include "GameServerConnect.h"
#include "PlayerManager.h"
#include "ProcessManager.h"
#include <string>
using namespace std;
REGISTER_PROCESS(GMSERVER_MSG_GAMEOVER, GameOverProc)
GameOverProc::GameOverProc()
{
this->name = "G... |
#include "GameController.h"
#include <SFML/Window.hpp>
#define GC__BUTTON_A (0u)
#define GC__BUTTON_B (1u)
#define GC__BUTTON_SELECT (2u)
#define GC__BUTTON_START (3u)
#define GC__BUTTON_UP (4u)
#define GC__BUTTON_DOWN (5u)
#define GC__BUTTON_LEFT (6u)
#define GC__BUTTON_RIGHT (7u)
#define GC__CONTROLLER1_A (sf::Key... |
#include <math.h>
#include <iostream>
using namespace std;
double newton(double(*f)(const double),double(*df)(const double),double x,int maxit,double tol){
cout<<endl;
double h=0;
for(int k=1;k<=maxit;k++){
h=f(x)/df(x);
x=x-h;
cout<<" iter "<<k<<": x is "<<x<<endl;
cout<<" |f(x)| is "<<f... |
/*
Author: Manish Kumar
Username: manicodebits
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define PI 3.141592653589
#define MOD 1000000007
#define FAST_IO ios_base::sync_with_stdio(false), cin.tie(0)
#define deb(x) cout << "[ " << #x << " = " << x << "] "
void solve()
{
... |
#ifndef _SDPCH_H_
#define _SDPCH_H_
#include <iostream>
#include <memory>
#include <utility>
#include <algorithm>
#include <functional>
#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include "SeetyDog/Logger.h"
#ifdef SD_PLATFORM_WINDOWS... |
/*
* allocator.h
*
* Created on: 19. 1. 2017
* Author: ondra
*/
#ifndef SRC_IMTJSON_ALLOCATOR_H_
#define SRC_IMTJSON_ALLOCATOR_H_
namespace json {
///Declaration of a structure which configures allocator for JSON values.
struct Allocator {
///Pointer to allocator.
/** @param size size to allocate
*/... |
// BIT 2D
int bit[MAX][MAX];
int sum(int x, int y)
{
int resp=0;
for(int i=x;i>0;i-=i&-i)
for(int j=y;j>0;j-=j&-j)
resp+=bit[i][j];
return resp;
}
void update(int x, int y, int delta)
{
for(int i=x;i<MAX;i+=i&-i)
for(int j=y;j<MAX;j+=j&-j)
bit[i][j]+=delta;
}... |
#include "AppleState.h"
AppleState::AppleState()
{
}
AppleState::~AppleState()
{
}
void AppleState::Update(float dt)
{
}
D3DXVECTOR3 AppleState::getPos()
{
return pos;
}
AppleState::StateName AppleState::GetNameState()
{
return StateName::NONE;
}
void AppleState::SetVx(float x)
{
vX = x;
} |
#include "autotuner_configuration_request_subscriber.h"
using namespace CAutoTunerConfigurationRequestSubscriber;
CModelStateRequestSubscriber::CModelStateRequestSubscriber() :
m_pOnDataAvailable(nullptr),
m_pOnSubscriptionMatched(nullptr),
m_pOnDataDisposed(nullptr),
m_pOnLivelinessChanged(nullptr)
{... |
#ifndef __PERFECT_VELODYNE_POINT_TYPES_H
#define __PERFECT_VELODYNE_POINT_TYPES_H
#include <pcl/point_types.h>
namespace perfect_velodyne
{
// struct PointXYZIR
// {
// PCL_ADD_POINT4D; // quad-word XYZ
// float intensity; ///< laser intensity reading
// uint16_t... |
#include"Player.h"
#include"ErrorNumber.h"
#include"List.h"
#include"Player.h"
#include<unistd.h>
#include<string.h>
List<Player*> playersList;//玩家列表
void whenSocketError(Socket *socket){
printf("server error: %d %s\n",socket->errorNumber,ErrorNumber::getErrorString(socket->errorNumber));
}
void whenSo... |
#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
#include <algorithm>
#define pb push_back
using namespace std;
struct toado() {
int h, c;
}
int s[111][111];
int huong[3] = {1,-1
,1,0
... |
#ifndef _H_HOOKS
#define _H_HOOKS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <iphlpapi.h>
#include <ws2tcpip.h>
#include <iostream>
#include <WbemCli.h>
#include <Wincrypt.h>
#include <WinTrust.h>
#include <string>
#include "../MinHook/MinHook.h"
#pragma comment(lib, "ws2_32.lib")
#... |
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <unordered_map>
using std::cin;
using std::cout;
using std::vector;
using std::string;
using std::unordered_map;
int find_max(vector<int>& input)
{
int max = 0;
for(int i = 1; i < input.size(); ++i)
{
if(input[i] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.