text
stringlengths
8
6.88M
//--------------------------------------------------------------------------- #include <vcl.h> //#include <windows.h> //--------------------------------------------------------------------------- // Important note about DLL memory management when your DLL uses the // static version of the RunTime Library: // // ...
#include "precompiled.h" #include "entity/jsentitymanager.h" #include "entity/jsentity.h" namespace jsentity { JSObject* initManagerClass(); __forceinline entity::EntityManager* getManagerReserved(JSContext* cx, JSObject* obj); static JSBool createEntity(JSContext *cx, uintN argc, jsval *vp); static JSB...
#include <iostream> void* operator new(size_t sz) { std::cerr << " allocating " << sz << " bytes\n"; void *mem = malloc(sz); if (mem) return mem; else throw std::bad_alloc(); } void operator delete(void* ptr) noexcept { std::cerr << "deallocating at " << ptr << std::endl; free...
#pragma once class Frame { public: Frame(); ~Frame(); static void DrawGUI(HWND window); HWND m_hEdit; private: static const int TEXT_WIDTH = 800; };
/* Copyright 2016<Copyright Pwei> */ #include "k_socket.h" #include "k_unit_test.h" #include "k_web.h" #include <pthread.h> const int kBacklog = 128; #define MAXN 16384 #define MAXLINE 4096 typedef void (*sigal_funcation)(int); sigal_funcation Signal(int signo, sigal_funcation func) { struct sigaction act; ...
#include "BetCoinProc.h" #include "Logger.h" #include "HallManager.h" #include "Room.h" #include "ErrorMsg.h" #include "IProcess.h" #include "Protocol.h" #include "ProcessManager.h" BetCoinProc::BetCoinProc() { this->name = "BetCoinProc"; } BetCoinProc::~BetCoinProc() { } int BetCoinProc::doRequest(CDLSocketHandl...
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #ifndef cmVisualStudioSlnData_h #define cmVisualStudioSlnData_h #include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> #include <vector> class cm...
#include"Winsock.h" #include"windows.h" #include"stdio.h" #include "string.h" #include"iostream" using namespace std; #pragma comment(lib,"wsock32.lib") #define RECV_PORT 5001 SOCKET sock; sockaddr_in ServerAddr; int HaveLogin = 0; char name[20]; DWORD StartSock() { WSADATA WSAData; if (WSAStartup(MAKEWORD(2, 2)...
#include"stdio.h" #include"conio.h" void main(void) { float a,b,c,add,sub,multi,divide; clrscr(); printf("\n\nPut the value of a = "); scanf("%f",&a); printf("\nPut the value of b = "); scanf("%f",&b); add=a+b; sub=a-b; multi=a*b; divide=a/b; printf("\n\nThe Additions of A + b = %.1f",add); printf("\n\nThe Subtr...
#include "../Solution.h" vector<int> Solution::runningSum(vector<int> &nums) { vector<int> nums1; nums1.resize(nums.size()); nums1.clear(); if (nums.size() == 0) { return nums1; } nums1.push_back(nums[0]); for (int i = 1; i < nums.size(); i++) { nums1.push_back(nums[...
#pragma once #include <DxLib.h> class Vector2 { public: Vector2() = default; Vector2(float x, float y) :x(x), y(y) {}; ~Vector2() = default; float GetLength(Vector2 other = { 0.0F, 0.0F }); double GetAngle(Vector2 other); Vector2 operator + (Vector2 op); Vector2 operator - (Vector2 op); Vector2 operator * (...
//#include <atcoder/all> #include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; using Graph = vector<vector<int>>; typedef long long ll; typedef pair<int, int> P; const int MO...
// 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 GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with spe...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007, Gogul Balakrishnan, Akash Lal // University of Wisconsin, Madison. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fo...
#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[] = { 0,1,2,3,0,1,2,0,0,2, 2,4,5,5,0,1,2,6,2,3, 0,1,0,2,0,2 }; int main(int argc, char const *argv[]) { ...
#include "GnGamePCH.h" #include "GUserHaveItem.h" bool GUserHaveItem::CreateHaveItem(const gchar* pcName) { gstring fullPath; GetWriteablePath( USER_HAVEDATA_FILENAME, fullPath ); gint ret = Open( fullPath.c_str() ); if( GnSQLite::GNSQLITE_SUCCESS != ret ) return false; Execute( "CREATE TABLE %s...
class IC_Fireplace1: House { scope = 2; displayname = $str_misc_campfire; model = "\Ca\misc3\Campfire"; vehicleClass = "DayZ Epoch Buildings"; }; class IC_Tent: House { armor = 10; destrtype = "DestructTent"; displayname = $STR_VEH_NAME_TENT; icon = "\Ca\misc3\data\Icons\icon_Atent_ca.paa"; mapsize = 3; mode...
#pragma once namespace iberbar { namespace Paper2d { namespace LuaCppNames { static const char Namespace[] = "iberbar.Paper2d"; static const char Node[] = "CNode"; static const char Node_FullName[] = "iberbar.Paper2d.CNode"; static const char Scene[] = "CScene"; static const char Scene_FullName...
/** Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children respectively will be at positions (X-1, Y-1) and (X+1, Y-1). Running a vertical line from X = -infinity to X = +infinity, whenever the vertical line touches some nodes, we re...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
// Typically, header files have an include guard or a #pragma once directive, // to ensure that they are not inserted multiple times into a single .cpp file. // // include guard type will look like this : //#ifndef MY_CLASS_H //#define MY_CLASS_H // ...... codes ...... //#endif /* MY_CLASS_H */ #pragma once // i...
#include <iostream> #include <map> #include <string> using namespace std; typedef multimap<int,string> IntStringMap; int main(int argc, char *argv[]) { IntStringMap m; map<string, float> aa; m.insert(make_pair(1, string("Tushar"))); m.insert(make_pair(2, string("Ravindranath"))); m.insert(make_pair(3, str...
#include <iostream> #include <vector> #include <algorithm> #include <fstream> #include <queue> #include <unordered_set> #include <unordered_map> #include <stack> #include <cstdio> #include <cmath> #define INT_MIN (1<<31) #define INT_MAX (~INT_MIN) #define UNREACHABLE (INT_MAX>>2) #define INF (1e300) #define eps (1e-9) ...
#include "libMag.h" libMag::libMag(string filedir) { char scrc[40]; uint32_t icrc = 0; size_t pos; if ((pos = filedir.find(".lib", filedir.size() - 4)) == string::npos) { //检查后缀是否合法 cout << "bad file name!!!" << endl; libOkFlag = FALSE; return; } /*************************检查和打开lib文件*********************...
// Project sponsor: // Email: // Creator: Cedar Lake Instruments LLC // Date: October, 2019 // // Description: // Detect person approaching // Detect object dropped into donation box // Flash LEDs on either condition // I/O Connections: // Arduino pin - I/O description // 2 - IR sensor // 3 - Ultrasonic detect //...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; int phi(int n) { int m = (int)sqrt(n + 0.5); int ans = n; for (int i ...
#ifndef __LANE_DETECTOR_H__ #define __LANE_DETECTOR_H__ #include <time.h> #include <iostream> #include <math.h> #include <opencv2/opencv.hpp> #include <vector> #include <ros/ros.h> #include <cv_bridge/cv_bridge.h> #include <image_transport/image_transport.h> #include <sensor_msgs/image_encodings.h> #include "std_msgs/...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright 2002-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Peter Krefting */ #ifndef PC_FILES_H #define PC_FILES_H #include...
/* * Walker.h * * Created on: Aug 21, 2014 * Author: ushnish * Copyright (c) 2014 Ushnish Ray All rights reserved. This program and the accompanying materials are made available under explicit agreement between Ushnish Ray and the end user. You may not redistribute the code and accompanying material t...
#include "mao.hpp" #include "full_binary_tree.hpp" #include <deque> #include <cstdlib> #include <new> namespace { template <int N> using BP = BitSet<bitSetParam(N)>; // Pre-Merge Tree, phase 1: The tree where leaves are the cliques in the graph and inner nodes specify the order in which they are merged template <in...
#pragma once #include "framework.h" class Base{ public : virtual void function() = 0; };
#include <iostream> #include <vector> using namespace std; long long n; vector<long long> v; int main(void){ ios_base::sync_with_stdio(false); cin.tie(0); cin >> n; for(long long i = 1; i*i <= n; i++){ if(n % i == 0){ v.push_back(i); } } long long a = v.back(); ...
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back #define rep(i, begin, end) \ for (__typeof(end) i = (begin) - ((begin) > (end)); \ i != (end) - ((begin) > (end)); i += 1 - 2 * ((beg...
#include "VulkanQuad.h" #include "Shaders.h" #include "Window.h" #include <vector> namespace AMD { /////////////////////////////////////////////////////////////////////////////// void VulkanQuad::ShutdownImpl () { vkDestroyPipeline (device_, pipeline_, nullptr); vkDestroyPipelineLayout (device_, pipelineLayout_, n...
// // Created by litalfel@wincs.cs.bgu.ac.il on 14/01/2020. // #include "../include/Header.h" //#include map #include "../include/User.h" using namespace std; User::User(const string &name) : name(name), isConnected(true), myBooks(), given(), taken(), receiptMessage(), wishList(), i...
#include "Record.h" #include "Schema.h" #include "File.h" #include "Comparison.h" #include "ComparisonEngine.h" #include "Defs.h" #include "Errors.h" #include "Heap.h" Heap::Heap() {} Heap::~Heap() {} int Heap::Close () { // if mode is write and page have records if (mode == write && !page.is_empty()) ...
#include <stdio.h> #include <iostream> #include <math.h> #include <algorithm> #include <memory.h> #include <set> #include <map> #include <queue> #include <deque> #include <string> #include <string.h> #include <vector> typedef long long ll; typedef long double ld; typedef unsigned long long ull; const ld PI = acos(-1.)...
#pragma once #include <envire_core/items/ItemBase.hpp> #include <envire_core/graph/EnvireGraph.hpp> #include <envire_core/graph/TreeView.hpp> class QWidget; namespace envire { namespace viz { class ItemManipulatorFactoryInterface { public: /** Create a new item manipulator widget. * @param selectedItem the i...
#ifndef GRAFO_H #define GRAFO_H #include <Vertice.h> #include <QDebug> #include <QQueue> #include <caminoRecorrido.h> class Grafo{ public: int size = 0; double totalPeso = 0; QString totalPesoString = ""; QList<Vertice*> vertices; QList<caminoRecorrido*> caminosRecorridos; QString prof, anch; ...
// $Id: util.h,v 1.3 2014-04-24 18:14:51-07 - - $ // // util - // A utility class to provide various services not conveniently // associated with other modules. // #ifndef __UTIL_H__ #define __UTIL_H__ #include <string> using namespace std; // // trim - // Removes leading and trailing whitespace of string...
#include <sstream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics.hpp> #include <algorithm> #include "TTLDetection.hh" #include "Log.hpp" using namespace boost::accumulators; TTLDetection::TTLDetection() : ADetection() { this->setPace(50); this->setName(std::string("TTLDe...
#include <iostream> #include <thread> #include <vector> #include <mutex> static std::mutex mutex; void print_msg(int thread_id) { std::lock_guard<std::mutex> guard(mutex); std::cout << "Hello from thread " << thread_id << std::endl; } int main() { std::vector<std::thread> threads; int nthreads = 4; std:...
#include "stdafx.h" #include "CallsignToken.h" CallsignToken::CallsignToken() : QsoTokenType("callsign") { m_minSize = 7; // minimum number of characters when writing out as a string } CallsignToken::~CallsignToken() { } bool CallsignToken::Parse(const string& token) { m_token = token; return true; }
// // GameOverScene.cpp // Aircraft // // Created by lc on 12/1/14. // // #include "GameOverScene.h" GameOverScene::GameOverScene(void) { gameOverLayer = nullptr; m_score = 0; } GameOverScene::~GameOverScene(void) { } GameOverScene* GameOverScene::create(int score) { GameOverScene *pRet = new Ga...
#include "IOManager.h" bool IOManager::realFileToBuffer(std::string filePath, std::vector<unsigned char>& buffer) { std::ifstream file(filePath, std::ios::binary); if (file.fail()) { perror(filePath.c_str()); return false; } //File size setting by moving *cursor* to end of file, checking size, move *cur...
#include <iostream> #include <queue> using namespace std; char matrix[31][31][31]; int visited[31][31][31]; // up , right, down, left, top, bottom int dir_k[6] = {0, 0, 0, 0, 1, -1}; int dir_i[6] = {-1, 0, 1, 0, 0, 0}; int dir_j[6] = {0, 1, 0, -1, 0, 0}; struct Point{ int k, i, j; }; Point _inits; Point _exits; q...
#include "timer.h" clock_t start_time; double elapsed; void start_timers() { start_time = clock(); } double elapsed_time() { elapsed = clock() - start_time; return elapsed / CLOCKS_PER_SEC; }
#include <fstream> int main(int a){ std::fstream i("input.txt"), o("output.txt", 2); i >> a; o << a*(a - 3) + 2; }
// Created on: 1998-10-06 // Created by: Jean Yves LEBEY // Copyright (c) 1998-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 GN...
#include <iostream> int main() { //Syntax: // switch(expression) { // case "variable_to_evaluate": // code; // break; // default: // code; // break; // Example: Enter a number from 1 to 7 and I'll give you the day of the week. int day = 0; std::cout << "Enter a numbe...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_FuseControlsTextInputControl_Value_Property.h> #include <Fuse.Controls.TextInputControl.h> #include <Uno.Bool.h> #include <Uno.UX.IPrope...
#pragma once #include "stdafx.h" #include <string> /////////////////// /////////////////// enum exprType : int { ref, abs, app, } struct variable { std::string name; variable(const std::string n) : name(n) {} } struct expr { exprType type; expr(exprType t) : type(t) {} }...
// // Created by 송지원 on 2020/07/08. // //풀다가 모르겠어서 아래 주소 참고하여 풀이 //https://rebas.kr/750 #include <cstdio> #include <queue> using namespace std; const int MAX = 1e6; int n, k; int dist[MAX+1]; void bfs() { queue<int> q; q.push(n); int ans=0, cnt=0; while (!cnt) { int s = q.size(); wh...
#include "confd.h" #include <Arduino.h> Confd::Confd(EepromCli &eeprom) : _eeprom(eeprom) { //_eeprom = eeprom; } uint8_t Confd::read_sensors(uint8_t *all_sensors) { return _eeprom.read_bytes(SENSOR_ADDR_START, all_sensors, SENSOR_AMOUNT); } uint8_t Confd::store_sensors(uint8_t *all_sensors){ return _eepr...
class Solution { public: bool match(char* str, char* pattern) { if(str == NULL || pattern == NULL){ return false; } return matchCore(str,pattern); } bool matchCore(char *str,char *pattern){ if(*str == '\0' && *pattern == '\0'){ return true; ...
#include "vnapulsegeneratortest.h" #include <Definitions.h> using namespace RsaToolbox; #include <QDebug> #include <cassert> VnaPulseGeneratorTest::VnaPulseGeneratorTest(ConnectionType type, const QString &address, QObject *parent) : VnaTestClass(type, address, parent) { _logDir.setPath(SOURCE_DIR); _log...
#include<iostream> using namespace std; int main(){ int a[100],n,count=0; cout<<"ENter a limit for the array: "; cin>>n; cout<<"Enter the array: "; for(int k=0;k<n;k++){ cin>>a[k]; } for(int i=0;i<n;i++){ int sum = 0; for(int j=i;j<n;j++){ sum = sum + a[j]; if(sum==0){ count++; } } ...
#ifndef RELATION_H #define RELATION_H #include <iostream> #include <string> #include <vector> using namespace std; class Relation { public: Relation(); // Default constructor Relation(string comp, string pio); // Constructor that sets values of private members string getCompName(); ...
#include "TestReader.h" #include <QDebug> #include <QFile> #include <QStringList> #include "Exception.h" const QMap<QString, TestReader::State> TestReader::m_keyWordStates { {"Инструкция", TestReader::READ_INSTRUCTION}, {"Варианты ответов", TestReader::READ_GENERAL_ANSWER_OPTIONS}, {"Вопросы", ...
// // Created by griha on 15.01.18. // #pragma once #ifndef MIKRONSST_HSM_FILESYSTEM_HPP #define MIKRONSST_HSM_FILESYSTEM_HPP #include <string> #include <windows.h> #include <boost/filesystem.hpp> namespace griha { namespace hsm { namespace fs = boost::filesystem; namespace { std::wstring get_ex...
// // C++ Interface: LogSystem // // Description: // 相关日志记录 // // Author: Jally <jallyx@163.com>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LOGSYSTEM_H #define LOGSYSTEM_H #include "mess.h" class LogSystem { public: LogSystem(); ~LogSystem(); v...
#include <iostream> using namespace std; int main() { int centroX, centroY, fuerzas; cin >> centroX >> centroY >> fuerzas; int total = 0; for(int i = 0; i < fuerzas; i++) { int puntoX, puntoY, fuerzaX, fuerzaY; cin >> puntoX >> puntoY >> fuerzaX >> fuerzaY; int deltaX = puntoX ...
#include "core.h" template<typename Type> Type character(int size, int sizec, Type** array, int col) { Type _character = 0; for (int i = 0; i < size; i++) if (array[i][col] < 0 && i % 2 == 0) _character += abs(array[i][col]); return _character; }
#pragma once #include "platform.h" #include <cpprest/http_client.h> namespace ACJudge2 { class Main { public: /* Online Mode * server: domain name or ip address of ACOJ6+ web server * port: port id of ACOJ6+ web server Connects to server and automatically fetch submissions. Never stops before you shut...
#ifndef PBERROR_H #define PBERROR_H namespace pb { #define PB_ERROR_SDL -1 #define PB_ERROR_TW -2 #define PB_ERROR_CONTROLLER -3 } #endif // PBERROR_H
#ifndef SAT_H #define SAT_H #include "Graph.h" #include "point.h" #include <vector> #include "z3++.h" class SAT { public: SAT(Graph); void computeroute(); Graph GetSolution(); private: Graph graph,solution; z3::expr bool_to_int(z3::expr a,z3::context& c,bool special); bool optimizedget(); int computeindex(int...
// Created on: 2000-08-30 // Created by: data exchange team // Copyright (c) 2000-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 GNU Lesser General Public License version 2...
/* Complete the bool_to_word (Javascript: boolToWord ) method. Given: a boolean value Return: a 'Yes' string for true and a 'No' string for false */ using namespace std; string bool_to_word(bool value) { string value_string; if(value == true) { value_string = "Yes"; } if(value == false) { valu...
// // Created by xpl on 2021/6/23. // #ifndef LAPUTA_FFMPEG_VIDEOCHANNEL_H #define LAPUTA_FFMPEG_VIDEOCHANNEL_H #include <android/native_window.h> #include "BaseChannel.h" #include "AudioChannel.h" extern "C" { #include <libavcodec/avcodec.h> } class VideoChannel : public BaseChannel { //friend void *doDecode_t...
#ifndef PESSOA_H #define PESSOA_H #include <iostream> using namespace std; class Pessoa { public: //métodos get e set string getCpf(){return this->cpf;} string getSenha(){return this->senha;} void setCpf(); void setSenha(); //outros métodos void cadastrar()...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
/* -*- 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. */ #include "core/pch.h" #include "adjunct/desktop_util/history/Document...
#ifndef COMPRESSED_SHADOW_UTIL_H #define COMPRESSED_SHADOW_UTIL_H #include "cpvs.h" #include "MinMaxHierarchy.h" #include "CompressedShadow.h" namespace cs { constexpr uint NODE_SIZE = 9; // childmask + 8 pointers (unused pointers will be removed with 'compress') constexpr uint LEAF_SIZE = 17; // childmask + 8 64-b...
/* Copyright (c) 2014 Mircea Daniel Ispas This file is part of "Push Game Engine" released under zlib license For conditions of distribution and use, see copyright notice in Push.hpp */ #pragma once #include <cstdint> namespace Push { enum class VertexFormat : uint32_t { Position = 1, Color =...
int motor_one1=9; int motor_one2=10; int motor_two1=5; int motor_two2=3; void setup() { // put your setup code here, to run once: pinMode(6,INPUT_PULLUP); pinMode(9,OUTPUT); pinMode(10,OUTPUT); pinMode(11,INPUT_PULLUP); pinMode(5,OUTPUT); pinMode(3,OUTPUT); } void loop() { // put your main code here, to run r...
/* ALL SENSOR CHECK Connect the + on the sensor board to +5V on the Arduino Connect the - on the sensor board to GND on the Arduino Connect the T on the sensor board to A2 on the Arduino for Temperature Connect the L on the sensor board to A3 on the Arduino for Light Connect the H on the sendor board to A4 on the Ard...
#include <exception> #include <iostream> #include "manipulation/factory.h" #include "persistence/factory.h" #include "system.h" #define handle(name) \ if (command == #name) { \ name(parser); \ return; \ } #define terminate(message) \ std::cerr << "ERROR:...
#include "Buttons.h" BrightnessChanger::BrightnessChanger( unsigned long tickPeriodTime, brightnessChangeCallback callback, int8_t brightnessStep) { _tickPeriodTime = tickPeriodTime; _callback = callback; _brightnessStep = brightnessStep; }; void BrightnessChanger::start() { _active = true; } void Brig...
#include <iostream> #include <cstring> class Sudoku { private: int grid[9][9]{}; bool _solve(int x, int y){ bool result = false; if (grid[y][x] == 0){ for (int i = 1; i < 10; i++){ if (numWorks(x, y, i)){ grid[y][x] = i; if (x +...
class m107; class m107_DZ: m107 { displayname = $STR_DZ_WPN_M107_NAME; descriptionShort = $STR_DZ_WPN_M107_DESC; scope = 2; type = 1; canlock = 0; magazines[] = {"10Rnd_127x99_m107"}; begin1[] = {"ca\sounds\weapons\rifles\m107",2.51189,1,2000}; soundBegin[] = {"begin1",1}; }; class m107_SKN : m107_DZ {};
#include <stdio.h> #include <fstream> #include <syslog.h> #include <signal.h> #include <sys/stat.h> using std::string; using std::ifstream; using std::system; using namespace std; extern "C" { #include "lua.h" #include "lualib.h" #include "lauxlib.h" } lua_State *L;
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2005-2010 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * wonko */ #include "core/pch.h" #include "modules/display/sfnt_...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Пример применения пространства имён // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include <iostream> #include "boo.h" #include "doo.h" using namespace std; int main() { cout << Boo::doOperation(5, 4) << endl; cout << Doo::doOperation(5, 4) << endl; return 0; } // -...
#ifndef WORLD_H #define WORLD_H #include <stdlib.h> #include <cmath> #include <glm/glm.hpp> #include "simutils.h" #include "SimConstants.h" namespace Simulation { class World { public: World(int, int); ~World(void); void Init(const unsigned char*, unsigned long[], unsi...
#pragma once enum class KeyboardButton; class Camera; class SideScrolling { public: SideScrolling(); void SetCameraPtr(Camera* camera); void SideScroll(); void SideScrollPress(KeyboardButton button); void SideScrollRelease(); private: Camera* cameraPtr; float scrollSpeed; };
// #include "Registro.h" #include <map> #include <stdio.h> #include <string> #include <cstring> #include <sstream> #include <fstream> #include <ctime> using namespace std; unsigned t0, t1; class Random_File { private: std::string filename; std::string indexname; int size_key; string first; map<string,int> l...
#include "precompile.h" #include "token.h" #include "parser.h" #include "lexer.h" void* KwikParseAlloc(void* (*alloc_proc)(size_t)); void KwikParse(void* state, int token_id, kwik::Token* token_data, kwik::ParseState* s); void KwikParseFree(void*, void(*free_proc)(void*)); namespace kwik { void parse(const Sou...
#pragma once //====================================================================== #include <upl/common.hpp> #include <upl/definitions.hpp> #include <upl/types.hpp> #include <memory> //====================================================================== namespace UPL { namespace AST { //====================...
#include <iostream> int fMax(int a, int b) { int k; if(a < b) { return b; } return a; } int fMin(int a, int b) { if(a > b) { a = b; } return a; } int sortFun(int arr[], int num, int foo(int a, int b)) { int mem; int arr1[num]; int mem1; for (int i = 0; i < num; ++i) { for...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 Opera Software AS. 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 APPLICATION_ADAPTER_H #define APPLICA...
#include "stdafx.h" #include "SoundEngine.h" SoundEngine::SoundEngine() { // This is only needed in Windows desktop apps CoInitializeEx(nullptr, COINIT_MULTITHREADED); DirectX::AUDIO_ENGINE_FLAGS eflags = DirectX::AudioEngine_Default; #ifdef _DEBUG eflags = eflags | DirectX::AudioEngine_Debug; #endif audEngine ...
#include "conf.hpp" const float Conf::FPS = 60.f; const uint32_t Conf::MAX_HEIGHT = 700; const uint32_t Conf::MAX_WIDTH = 600; const uint32_t Conf::STAY = 1; const uint32_t Conf::MAX_POP = 100; const uint32_t Conf::SIM_HOURS = 3000; const uint32_t Conf::INFECTION_DUR = 20*24; const uint32_t Conf::INITIAL_INFECTION...
#include <iostream> #include <vector> using namespace std; // 24分 // 空の文字列はtargetにならないという前提で書いている int searchWord(const vector<string>& words, int left, int right, string target){ if(left > right || words.empty()){ return -1; } int mid = (left + right) / 2; int diff = 0; bool isLeft = true...
/* Duy Anh Pham AND Dhrien Jogia * * Programming Fundamental Assignment 2 * * Memory location 0x3fff for containing high score */ #include <ed1.h> #include <LiquidCrystal.h> #include "shape.h" #include "pitches.h" #include "input.h" // define memory location for highscore #define HIGHSCORE (0x3fff) // contain in...
/************************************************************************/ /* File name : prototype.h */ /************************************************************************/ /* Contents : 私的コーディング規約に基づくプロトタイプ */ /* ...
#ifndef FLUIDSOLVERPROPERTY_H #define FLUIDSOLVERPROPERTY_H //-------------------------------------------------------------------------------------------------------------- #include "json/src/json.hpp" //-------------------------------------------------------------------------------------------------------------- //...
#include "TestCPU.h" #include "Memory.h" #include <iostream> int main(int argc, char** argv) { using namespace test; memoryInterface *mem = new RAMImpl(8); cpu device(mem); CPUtestbench tester(&device); tester.storeReg(1, -39); tester.storeReg(2, -23); tester.constructInstru...
#ifndef PPJ_SYMTABLE_H #define PPJ_SYMTABLE_H #include <string> #include <stack> #include <map> #include <set> using namespace std; #include "function.h" struct ASTree; struct SymTable { SymTable *dad; map<string, ASTree*> table; int stack_top; int base_pointer; stack<string> stk_continue; stack<strin...
#include <iostream> #include <string> //THIS IS BROKEN AF FAM //I HAVEN'T FIXED THE BUGS YET char smol_alphabets[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; int Index(char arr[], char a) { for (int i = 0; i < 26;...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 1999-2012 * * Stub core/pch.h for standalone builds of the ECMAScript engine. * * Tested on MS Windows with Visual Studio 6 and on MacOS X (Intel only) with Xcode 2.3. */ #ifndef CORE_PCH_H #define...