text
stringlengths
8
6.88M
#include <iostream> using namespace std; int main() { cout << "Input english lower case: " char ch; cin >> ch; char result = ch+('a'-'A'); cout << "Output english upper case: " << result << endl; return 0; }
/******************************************************************************** ** Form generated from reading UI file 'gamewindow.ui' ** ** Created by: Qt User Interface Compiler version 5.5.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! **********************************...
class Solution { public: int calculate(string s) { stack<int> stk; char sign = '+'; if(s[0] == '-') sign = '-'; int num = 0; for(int i = 0; i < s.length(); i++) { char ch = s[i]; if(isdigit(ch)) num = num*10 + (ch-'0'); if((!isdigit...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
// // main.cpp // 3 tensor factorization // // Created by Vanellope on 5/16/16. // Copyright © 2016 Vanellope. All rights reserved. // #include <iostream> #include <fstream> #include <math.h> #define MAX_FACT 490000 #define MAX_ENTITY 15000 #define MAX_RELATION 1400 #define F 483142 #define E 14951 #define R 1345 ...
#pragma once #include <algorithm> #include <assert.h> #include <errno.h> #include <fcntl.h> #include <fstream> #include <functional> #include <iostream> #include <list> #include <set> #include <stdio.h> #include <string> #include <cstring> #include <sys/mman.h> #include <sys/stat.h> #include <thread> #include <unistd....
#include <whiskey/AST/NodeType.hpp> namespace whiskey { namespace { NodeTypeInfo nodeTypeInfos[] { NodeTypeInfo("None", NodeTypeCategory::None, {}), NodeTypeInfo("List", NodeTypeCategory::Internal, {FieldTag::List_Children}), NodeTypeInfo("TypeVoid", NodeTypeCategory::Type, {}), NodeTypeInfo("TypeAtomicBool", Node...
#pragma once #include <math/common.h> #include <lua/common.h> namespace glm { inline static void bind(lua_State* L) { using namespace LuaIntf; LuaBinding(L).beginClass<vec3>("vec3") .addConstructor(LUA_ARGS(_opt<float>, _opt<float>, _opt<float>)) .addVariable("x", &vec3::x) .addVariable("y", &vec3::y) .ad...
#include "Region.h" Region::Region(std::string _name) { this->name = _name; } Region::~Region() { //dtor } ZLevel* Region::GetLevel(int z) { try { return levels.at(z); } catch (std::out_of_range& e) { return NULL; } } void Region::SetLevel(ZLevel* level, int z) { ...
/* Copyright 2017-2018 All Rights Reserved. * Gyeonghwan Hong (redcarrottt@gmail.com) * * [Contact] * Gyeonghwan Hong (redcarrottt@gmail.com) * * 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 L...
#include "structure.h" #include "constantes.h" void affichergrille(SDL_Surface *affichage, int x, int y) { SDL_Surface *grille=NULL; SDL_Rect grilleposition; grille = SDL_LoadBMP("grille.bmp"); SDL_SetColorKey(grille, SDL_SRCCOLORKEY, SDL_MapRGB(grille->format, 255, 255, 255)); grilleposition.x = x...
/* * ADEXTENDER.h * * Created on: Jun 14, 2016 * Author: Prustya */ #ifndef ADEXTENDER_H_ #define ADEXTENDER_H_ // ---------- SYSTEM INCLUDE --------------------------------------------------------------------- // #if ARDUINO >= 100 #include <Arduino.h> #else #include <WProgram.h> #endif #include "AD533...
#include "Light.h" Light::Light(vec3 pos, vec3 dir, vec3 ambient, vec3 diffuse, vec3 specular, LType lType, int number) { //Light position and direction Lpos = pos; Ldirection = dir; //Light intensity value Lambient = ambient; Ldiffuse = diffuse; Lspecular = specular; //Light type and number LightType = lTy...
/** * John Bradley (jrb@turrettech.com) */ #pragma once #include <string> #include <vector> namespace BSP { extern void ReplaceStringInPlace(std::string& subject, const std::string& search, const std::string& replace); extern std::string ReplaceString(std::string subject, const std::string& search, const std:...
#ifndef __LayerGameOver_H__ #define __LayerGameOver_H__ #include "cocos2d.h" USING_NS_CC; class LayerGameOver :public CCLayer { public: static CCScene * scene(); CREATE_FUNC(LayerGameOver); bool init(); void restartGameMCallBack(CCObject *obj); }; #endif
#include "BVHList.h" BVHList::BVHList() { } BVHList::~BVHList() { size_t sz = bvhList.size(); for (size_t i = 0; i < sz; ++i) delete bvhList[i]; } void BVHList::AddBVH(BVH* bvh) { bvhList.push_back(bvh); frame_no.push_back(0); animation_time.push_back(0); } int BVHList::GetSize() { return bvhList.size(); ...
#ifndef __HAVE_ANIMATED_SPRITE #define __HAVE_ANIMATED_SPRITE #include <map> #include <vector> #include <string> #include <SDL.h> #include <SDL_image.h> #include "camera.h" #ifdef HAVE_GRAPHICS class AnimatedSprite { public: AnimatedSprite(); virtual ~AnimatedSprite(); void render(const Camera& camera, const Po...
/*************************************************************************** * Filename : GameObject.cpp * Name : Ori Lazar * Date : 03/11/2019 * Description : Contains the implementation for the game object structure. This object may contain any number of game components, These could be rendering,...
#ifndef CELL_H #define CELL_H #include <iostream> #include <tuple> // See Cell.cpp for detailed comments. class Cell { private: int Bomb; int XPos, YPos; int NumNeighbours; int Revealed; int Flagged; public: Cell(); void SetXPos(int); void SetYPos(int); void SetBomb(); int IsBomb(); void IncNumNeighbours()...
#ifndef STACK_VECTOR_H #define STACK_VECTOR_H #include "../vector/vector.h" template <typename T> class Stack : public Vector<T> { public: void push ( T const &e ) { insert ( this->size(), e ); } T pop () { return remove ( this->size() - 1 ); } T &top () { return ( *this ) [this->size() - 1]; } }; #endif /*...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Character.hpp :+: :+: :+: ...
/** * File: boggle.cpp * ---------------- * Implements the game of Boggle. */ #include <cctype> #include <iostream> using namespace std; #include "simpio.h" #include "gwindow.h" #include "gboggle.h" #include "map.h" #include "grid.h" #include "random.h" #include "lexicon.h" const int kBoggleWindowWidth = 650; c...
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFile> #include <QtDebug> #include <QThread> #include <QRegExp> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); serialport = new QSerialPort(); ui->pushButton...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#include "timer.h" // // Default Constructor // Timer::Timer() : start(std::chrono::high_resolution_clock::now()) { } // // Copy Constructor // Timer::Timer(Timer& t) : start(t.start) { } // // Move Constructor // Timer::Timer(Timer&& t) : start(std::move(t.start)) { } // // startTime // void Timer::s...
#include "MyTextEdit.h" #include <QBuffer> #include <QDebug> #include <QKeyEvent> #include <QApplication> #include <QClipboard> #include <QTextCursor> #include <QDateTime> MyTextEdit::MyTextEdit(QWidget *parent) : QTextEdit(parent) { initData(); } void MyTextEdit::keyPressEvent(QKeyEvent *event) { if(event->matches...
#include "phasemap.h" #include "dataprocess.h" #include <algorithm> #define _USE_MATH_DEFINES #include <math.h> #include <iostream> using namespace std; double wrap(double phs){ while (phs < M_PI) phs += 2 * M_PI; while (phs > M_PI) phs -= 2 * M_PI; return phs; } uchar PhaseMap::indexValid(int i, int j){ ret...
#include <Wire.h> int counter = 0 ; /* Pins */ int red = 9, blue = 3, green = 5 ; /* PWM values */ int pwm_red = 255, pwm_green = 255, pwm_blue = 255 ; void setup() { pinMode(red, OUTPUT); pinMode(blue, OUTPUT); pinMode(green, OUTPUT); Wire.begin(0); Wire.onReceive(receiveEvent); Serial.begin(9600); } ...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once WINRT_EXPORT namespace winrt { namespace ABI::Windows::Security::Cryptography::DataProtection { struct IDataProtectionProvider; struct IDataProtectionProviderFactory; struct DataProtectionPr...
#include <iostream> #include <string> using namespace std; class Kucing { private : string nama; string warna; int umur; public : Kucing (string n, string w, int u){ this->nama = n; this->warna = w; this->umur = u; } void setNama(string nama){ this->nama = nama; } string getNama(){ re...
/** * **************************************************************************** * Copyright (c) 2015, Robert Lukierski. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributi...
// generated from rosidl_generator_cpp/resource/idl.hpp.em // generated code does not contain a copyright notice #ifndef PIVOT_MSG__MSG__PIVOT_HPP_ #define PIVOT_MSG__MSG__PIVOT_HPP_ #include "pivot_msg/msg/detail/pivot__struct.hpp" #include "pivot_msg/msg/detail/pivot__builder.hpp" #include "pivot_msg/msg/detail/piv...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QDebug> #include <QFileDialog> #include <QSerialPort> #include <QSerialPortInfo> #include <QList> #include <QMessageBox> #include "waveplot/wavesetting.h" #include "serial/serialthread.h" #include "board/gyroscopeview.h" #include "board/magv...
// Copyright (c) 2015 University of Szeged. // Copyright (c) 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 "sprocket/browser/ui/authentication_dialog.h" #include "base/strings/utf_string_conversions.h...
#pragma once #include "GuiItem.h" #include <iostream> #include <map> #include <ft2build.h> #include <freetype\freetype.h> using namespace std; struct Character { GLuint TextureID; // ID handle of the glyph texture glm::ivec2 Size; // Size of glyph glm::ivec2 Bearing; // Offset from baseline to left/top of...
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll n,a[150005],is[150005]; int main() { while(~scanf("%lld",&n)) { memset(is,0,sizeof(is)); //初始化状态,因为是多个测试用例 for(int i = 0; i < n; i++) cin >> a[i]; sort(a,a+n); ll sum = 0; //最有解 f...
class Solution { public: int countBinarySubstrings(string s) { int n = s.size(), zeros = 0, ones= 0, res = 0; if (s[0] == '0') zeros++; else ones++; for (int i = 1; i < n; i++) { if (s[i] == '0') { zeros = (s[i - 1] == '0') ? zeros + 1 : ...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Management.2.h" WINRT_EXPORT namespace winrt { namespace Windows::Management { struct WINRT_EBO MdmAlert : Windows::Management::IMdmAlert { MdmAlert(std::nullptr_t)...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ #include<iostream> struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* sw...
#include <string> #include <iostream> #include <fstream> #include "CipherInterface.h" #include "AES.h" #include "DES.h" #include <stdio.h> #include <stdlib.h> #include <cmath> using namespace std; /*Case insensitive string comparison helper function used in processing command line arguments*/ bool iequals(const strin...
/* Author: Nayeemul Islam Swad Idea: - Let dp[i] be the maximum answer if we only consider the intervals (l, r, a) with i <= l. Our final answer would be dp[1]. - To calculate dp[i], let's iterate over the possible positions j of the first occurrence of a set bit and take maximum among them. To handle ...
#include "BasicCalculator.hpp" #include <stack> using namespace std; int BasicCalculator::calculate(string s) { vector<BasicCalculator::Token> tks = parse(s); stack<char> ops; stack<int> vals; for (auto &t : tks) { if (t.type == BasicCalculator::Token::OPERAND) vals.push(t.tk.val...
/* * Copyright (c) 2012 Joey Yore * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, dist...
#ifndef __SHORTCUT_H__ #define __SHORTCUT_H__ #include <vector> #include <string> #include "SDL/include/SDL_scancode.h" class Shortcut { public: Shortcut(); Shortcut(std::string name, std::vector<SDL_Scancode> keys); bool Pressed(); bool Held(); public: std::string name; std::vector<SDL_Scancode> keys; frien...
#include <iostream> #include <vector> #include <algorithm> //#include <exception> using namespace std; namespace Graph { auto Parents = vector<int>(); struct Edge { Edge(int start, int end, int weight):Start(start),End(end),Weight(weight) {} int Weight; int Start; in...
#include<bits/stdc++.h> using namespace std; bool repeatedSubstringPattern(string s) { int n = s.size(); for(int i=2;i<=n;i++) { if((n%i) !=0)// it doesnot divide the string into equal parts. { continue; } int len = n/i; string temp = ""; f...
#include <Model/thanos.h> #include <Model/utils.h> #include <Model/dataStructures/LinkedList.h> #include <Model/Mundo/RangoEtario.h> #include <Model/Mundo/familia.h> #include <Model/Mundo/Acciones.h> Persona::Persona(int _ID, eGenero _genero, string _nombre, string _apellido, string _creencia, string _profesion, Ubica...
// // Created by yulichao on 2020/9/27. #include <iostream> using namespace std; /*static*/ int gsi = 100; /*static*/ void staticTestPrint() { cout << "I am static test print !" << endl; } //
#ifndef PERMUTATION_SEQUENCE_HPP_ #define PERMUTATION_SEQUENCE_HPP_ #include <string> #include <vector> using namespace std; class PermutationSequence { public: string getPermutation(int n, int k); }; #endif // PERMUTATION_SEQUENCE_HPP_
#include<bits/stdc++.h> using namespace std; const int N=1e6+2; int n,m,d[N]; string s[N]; struct box{ int x,y,w; }; int dx[]={0,0,-1,1,-1,-1,1,1}; int dy[]={1,-1,0,0,-1,1,1,-1}; int get_id(int i,int j){ return (i-1)*m+j; } void init(){ for (int i=1;i<=n;i++) for (int j=1;j<=m;j++) ...
// // Created by vladimir on 10/5/19. // #ifndef TAREA1_SEGURIDAD_STORE_H #define TAREA1_SEGURIDAD_STORE_H #include <algorithm> #include <iostream> #include <cstdlib> #include <string> #include <regex> #include <mysql_connection.h> #include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/results...
// pool.hpp // declares functions and structs required pool.cpp #ifndef POOL_H #define POOL_H // stdlib includes #include <algorithm> #include <cstddef> #include <cstdint> #include <cstdlib> // custom includes #include "../../shared/slinked_list.hpp" class pool { private: // total size of pool in bytes st...
// // AUCallbacks.hpp // AudioEngineTests // // Created by birney on 2020/5/2. // Copyright © 2020 rongcloud. All rights reserved. // #ifndef AUCallbacks_hpp #define AUCallbacks_hpp #import <AudioUnit/AudioUnit.h> #include "CARingBuffer.h" NS_ASSUME_NONNULL_BEGIN struct AUCallbackRef { AudioUnit m_audioUnit; ...
#include "arcpch.h" #include "ModelRenderer.h" #include <Arcane/Graphics/Shader.h> #include <Arcane/Graphics/Camera/FPSCamera.h> #include <Arcane/Graphics/Renderer/GLCache.h> namespace Arcane { ModelRenderer::ModelRenderer(FPSCamera *camera) : m_Camera(camera), NDC_Plane(), NDC_Cube() { // Configure and cache O...
/* Arduino-MAX30100 oximetry / heart rate integrated sensor library Copyright (C) 2016 OXullo Intersecans <x@brainrapers.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
/**************************************************************************** ** Meta object code from reading C++ file 'tablewidget.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.0) ** ** WARNING! All changes made in this file will be lost! ********************************************************...
#ifndef _bullet_h_ #define _bullet_h_ #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include <Glut/glut.h> #include <OpenGL/glext.h> #include "vector.h" #include <math.h> class bullet { public: vector position, velocity; float size; bullet(vector pos, vector vel, float s); void update(float, vector...
//10449 - Traffic //Dept. ICE, NSTU-11 Batch #include<bits/stdc++.h> using namespace std; #define INF 99999999 //#define INF 1<<28 #define ll long long #define SZ 100009 #define MX 100000000 #define sfint(a) scanf("%d",&a) #define sfint2(a,b) scanf("%d%d",&a,&b) #define sfint3(a,b,c) scanf("%d%d%d",&a,&b,&c) #define fo...
#pragma once #include <SFML/Graphics.hpp> #include <vector> #include "Block.hh" class PointsDrawer: public Block { sf::RenderWindow* window; public: Input<std::vector<sf::Vector2f> >* in_points; Input<sf::Vector2u>* in_size; protected: virtual void Compute() override; public: PointsDrawer(std::string _name); };
#include <iostream> using namespace std; #include "solution.h" int main() { vector<char> cvec1 = {'h', 'e', 'l', 'l', 'o'}; vector<char> cvec2 = {'H', 'a', 'n', 'n', 'a', 'h'}; Solution sol; sol.reverseString(cvec1); sol.reverseString(cvec2); for (auto c : cvec1) { cout << c << " "; } cout << e...
/* Sweep by BARRAGAN <http://barraganstudio.com> This example code is in the public domain. modified 8 Nov 2013 by Scott Fitzgerald http://arduino.cc/en/Tutorial/Sweep */ #include <Servo.h> Servo myservoL; // create servo object to control a servo // twelve servo objects can be created on ...
#ifndef __DBMANAGER_H__ #define __DBMANAGER__ #include <boost/thread.hpp> #include <boost/thread/mutex.hpp> // For posix::time #include <boost/date_time/gregorian/gregorian.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> // For cdb #include <cdb.h>...
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<bool> vb; typedef vector<vb> vvb; typedef set<int> si; typedef map<string, int> msi; typede...
// github.com/andy489 // https://www.hackerrank.com/contests/practice-3-sda/challenges/strawberries-sda #include <cstdio> using namespace std; const int mxN = 100005; long long n, q, x, l, r, m, A[mxN]; int main() { scanf("%lld", &n); int i(0); for (; i < n; ++i) { scanf("%lld", &A[i]); ...
#include <sstream> #include <string> #include "Mesh.h" Mesh::Mesh(){ //vector<Vector3> vertice; //vector<Vector2> uvs; //vector<Vector3> normals; //vector<string> groups; maxOrder = 0 ; } Face::Face(string source){ string temp("") ; cout << "[Face] " << source << " " << endl ; for(int j = 0 ; j<sour...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define ll long long using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; typedef tuple<ll, ll, ll> tp; typedef pair<ll, ll> pr; const ll...
#pragma once #include <vector> #include "Linear.h" #include "Simplex.h" #include "Function.h" class ZoitendijkMethod { using xn_t = std::vector<double>; public: ZoitendijkMethod(Function const& function, size_t dim, double lamda = 0.5); void set_limitaions(Limitations const& limitations, std::vector<Function> cons...
#include <iostream> #include <string> #include "evaluator.h" int main() { std::cout << "Calculate something!\n"; std::string str; while(getline(std::cin, str)) { Evaluator<double> e(str); std::cout << e.GetValue() << std::endl; } return 0; }
#include "ModifierSlot.h" ModifierSlot::ModifierSlot(void) { Frequency = 60; secondsSinceLastUpdate = 0; } ModifierSlot::ModifierSlot(Modifier* m, float freq) { MainModifier = m; Frequency = freq; secondsSinceLastUpdate = 0; } ModifierSlot::~ModifierSlot(void) { } void ModifierSlot::Update(ParticleCollection*...
// Manager Milestone - ItemManager Interface // ItemManager.cpp // Chris Szalwinski // v1.0 - 16/11/2015 #include <iostream> #include <vector> #include "ItemManager.h" void ItemManager::push_back(Item&& item){ items.push_back(std::move(item)); } std::vector<Item>::iterator ItemManager...
#pragma once /* Faster Interface Windows */ #include "../Main.h" #include "../Singleton.h" #include "GenericPatcher.h" class CPatcher_FasterInterfaceWindows : public IGenericPatcher { public: CPatcher_FasterInterfaceWindows(); bool ReadINI(void); bool WriteINI(void); private: // Hook functions // Variables fo...
#include "stringdecomposition.h" StringDecomposition::StringDecomposition(char in[]) { this->length=strlen(in); // this->in=new char[length]; this->out=new int[length]; this->in=in; // for(int i=0;i<length;i++){ // this->in[i]=in[i]; // } this->length_out=0; } StringDecomposition::~Stri...
//インクルードファイル指定 #include <opencv2/opencv.hpp> //静的リンクライブラリの指定 //#include <opencv2/opencv_lib.hpp> //名前空間の指定 #include<stdio.h> #include<cv.h> #include<highgui.h> #include<string> #include<fstream> #include<iostream> #define HEAD_CUT 1.7 //#include<opencv2/core/core.hpp> int toBinary(char *file_name); void resize(char ...
/* * transform_modes.h * * Created on: Dec 5, 2017 * Author: glenn */ #ifndef SRC_MODEL_TRANSFORM_MODES_H_ #define SRC_MODEL_TRANSFORM_MODES_H_ #include "transform.h" #include "Types_6D_Modes.h" #include "DeviceProtein.h" #include "Protein.h" namespace as{ /** * @brief: to change from the receptor...
//Define what controls to send to KSP //check if it is time to send a control packet void send_control_packet() { now = millis(); controlTime = now - controlTimeOld; if (controlTime > CONTROLREFRESH) { controlTimeOld = now; define_control_packet(); motorfader(); //call motorfader if button p...
#include <MaxMatrix.h> const byte DATA1 = 11; // 資料輸入線 const byte CS1= 10; // 晶片選擇線 const byte CLK1 = 9;// 時脈線 const byte DATA2 = 11; // 資料輸入線 const byte CS2= 10; // 晶片選擇線 const byte CLK2 = 9; // 時脈線 const byte maxInUse = 6; // 代表串連兩個MAX7219模組 MaxMatrix m1(DATA1, CS1, CLK1, maxInUse); //MaxMatrix m2(DATA2, CS2, ...
/** * $Source: /backup/cvsroot/project/pnids/zdk/zls/zvm/CGlobalVariableRegisterEntry.cpp,v $ * * $Date: 2001/11/14 18:29:37 $ * * $Revision: 1.3 $ * * $Name: $ * * $Author: zls $ * * Copyright(C) since 1998 by Albert Zheng - 郑立松, All Rights Reserved. * * lisong.zheng@gmail.com * * $State: Exp $ */ #...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Services.TargetedContent.1.h" #include "Windows.Storage.Streams.1.h" #include "Windows.Storage.Streams.2.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation...
#include "stdafx.h" #include "misc.h" #include "scan.h" #include "LineFeatureSet.h" #include "FeatureCreationParam.h" #include "DebugTrace.h" #include "assert.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif extern CFeatureCreationParam FeatureCreationParam; ////////...
/* * ===================================================================================== * * Filename: InsertionSort.hpp * * Description: * * Version: 1.0 * Created: 09/16/2013 03:33:55 PM * Revision: none * Compiler: gcc * * Author: Shuai YUAN (galoisplu...
#include <type_traits> #include <functional> #include <algorithm> #include <memory> #include <atomic> #include <future> #include <vector> #include <deque> #include <mutex> #include "thread_pool.h" namespace internal { thread_local std::size_t ThreadPool::m_my_index; thread_local ThreadPool::work_queue_type * ThreadP...
//All functionality and structs pertaining to explosion emitters go in this file float4 OutputExplosionPosition(float3 position, float3 velocity, float3 acceleration, float age, float interval, float3 controlPoint) { float segments = 20; float iteration = age / segments; for(int i = 0; i < segments; i++) ...
/* Title: ACM Brakelight Controller Description: Main code for brakelight ACM v 1.0 Last Revision Date: 06.04.2019 Created by Simon Nylund on 05.04.2019 Copyright © 2019 Align Racing UiA. All rights reserved. */ //Libraries #include <Arduino.h> #include <SPI.h> #include <mcp2515.h> #include "AllSettin...
#include "graphics\Singularity.Graphics.h" namespace Singularity { namespace Graphics { class IndexBuffer : public Singularity::Object { DECLARE_OBJECT_TYPE private: #pragma region Variables unsigned m_iStart; unsigned m_iLength; void* m_pBuffer; InternalInde...
#include<iostream> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int key; cin>>key; int r=n-1,l=0; int mid; while(r>=l){ mid=(l+r)/2; if(a[mid]==key){ cout<<mid; return 0; } ...
#include "Circuit.h" /*Constructor which takes sampleRate as an arguement and initialises the sampling period to 1./sampleRate */ Circuit::Circuit(double _sampleRate) :samplePeriod(1. / _sampleRate) { //Set the sampleRate of the circuit to input _sampleRate sampleRate = _sampleRate; std::cout << "Circuit Created ...
#ifndef __TARGET_H__ #define __TARGET_H__ class Target { public: virtual int twoTime(int number) = 0; virtual int halfTime(int number) = 0; }; #endif // __TARGET_H__
#include<iostream> #include<string> using namespace std; // string的构造函数 // string 是c++风格的字符串,而本质上是一个类 // 内部封装了很多成员方法:查找find,拷贝copy,删除delete等 // //string的构造函数 // 1.string(); //创建一个空的字符串 // 2.string(const char *s); //使用字符串s初始化 // 3.string(const string& str); //使用一个string对象初始化一个string对象 // ...
#include "frmserver.h" #include "ui_frmserver.h" frmServer::frmServer(QWidget *parent) : QDialog(parent), ui(new Ui::frmServer) { ui->setupUi(this); this->setWindowTitle(ui->lab_Title->text()); this->InitForm(); server = new TCPTransmitServer(this); server->startServer(8888); //如...
/**************************************** * * INSERT-PROJECT-NAME-HERE - INSERT-GENERIC-NAME-HERE * Copyright (C) 2019 Victor Tran * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundati...
/* Copyright 2017-2018 All Rights Reserved. * Gyeonghwan Hong (redcarrottt@gmail.com) * * [Contact] * Gyeonghwan Hong (redcarrottt@gmail.com) * * 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 Lic...
#include "RectangleT4.h" RectangleT4::RectangleT4(float L, float r, float u, float d) :Quad(L, r, u, d) {} float RectangleT4::Area() { float a; a = GetLeft() * GetRight(); return a; } float RectangleT4::Perimeter() { float p; p = GetLeft() + GetRight(); p *= 2; return p; } RectangleT4::~Re...
#include <bits/stdc++.h> using namespace std; int main() { int a = 1, ans = 0, num = 0; //a存储输入数据,ans为最终得分,num为连跳方块中心次数 while (cin >> a && a != 0) //数据输入还没完成且a!=0 if (a == 1) { //如果a==1 ans += a; //加上1分 num = 0; //连跳方块中心次数归零 } else if (a == 2) //a==2 ans...
#include <stdio.h> int main(){ int t; scanf("%d", &t); int num[t]; for (int i = 0; i < t; i++){ scanf("%d", &num[i]); getchar(); } for(int i = 0; i < t; i++){ printf("Case #%d: ", i + 1); if (num[i] % 11 == 0 && num[i] % 7 != 0){ printf("Eleven\n"); } if (num[i] % 7 == 0 && num[i]...
class CfgUnitInsignia { #include "script_component.hpp" // // Alpha first platoon // //MACRO_UNITINSIGNIA(Alpha Co. 1st platoon,Alpha_1); // //MACRO_UNITINSIGNIA(Alpha Co. 1st platoon - Alpha Squad,Alpha_1_A); // //MACRO_UNITINSIGNIA(Alpha Co. 1st platoon - Bravo Squad,Alpha_1_B); // MACRO_UNIT...
//Copyright 2015-2016 Tomas Mikalauskas. All rights reserved. #include <stdafx.h> #include <TywLib\math\GLXMath.h> #include <TywLib\geometry\VertData.h> #include <TywLib\geometry\JointTransform.h> //Renderer Includes #include "OpenGL\BufferObject.h" #include "OpenGL\Texture2D.h" #include "ThirdParty\FreeType\Freetyp...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
/************************************************************************* > File Name: observable.cpp > Author: Jason > Mail: jie-email@jie-trancender.org > Created Time: 2017年03月27日 星期一 20时42分54秒 ************************************************************************/ #include <iostream> using namespace std; ...
#ifndef TINYENGINE_LTE_IFONT_H_ #define TINYENGINE_LTE_IFONT_H_ #pragma once #include <string> #include "../LTE_Types.h" #include "../LTE_Utils.h" template <class T> class LTE_IFont { public: LTE_IFont() {} LTE_IFont(const LTE_IFont&) = delete; LTE_IFont(const std::string& path, int ptsize) { LTE_Unused(path, pt...