blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 247 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 4 111 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 58 | visit_date timestamp[ns]date 2015-07-25 18:16:41 2023-09-06 10:45:08 | revision_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | committer_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | github_id int64 3.89k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 25
values | gha_event_created_at timestamp[ns]date 2012-06-07 00:51:45 2023-09-14 21:58:52 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-08-24 19:49:39 ⌀ | gha_language stringclasses 159
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 10.5M | extension stringclasses 111
values | filename stringlengths 1 195 | text stringlengths 7 10.5M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3b1a456060dc05d43676a8bdf194e796a1fc4ed1 | a065b79e9ad7285136b85acdc6708b105f2e0a5a | /dungeonProjecthjagana/src/DropPack.hpp | fa054394b5a3749b7b95900e250aef8839aec919 | [] | no_license | hjagana/dungeonProject | c775716000be1458031cc81257106e953f82309e | 75e9f8f7038f1a0a74c149138fb00df929bf8844 | refs/heads/master | 2023-02-05T14:21:43.960961 | 2020-12-21T16:42:45 | 2020-12-21T16:42:45 | 323,393,029 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 448 | hpp | DropPack.hpp | #ifndef DROPPACK_H_
#define DROPPACK_H_
#include <string>
#include <vector>
#include "CreatureAction.hpp"
#include "ObjectDisplayGrid.hpp"
#include "Dungeon.hpp"
#include "KeyboardListener.hpp"
class DropPack: public CreatureAction{
private:
public:
DropPack(std::string name, Creature *owner);
... |
789b3d5dcc0b9547cf6958f696f3c6bbfbb9b2ce | 2a4b3cfc9ff17bdc1cfe9c3e159d2d902908d0bb | /Algorithm/DP/7_Tree/P2015.cpp | 76f21875bd7c6628746e80f5a7a05d511ee559ee | [] | no_license | dddql/cpp | afd45bc6c4e37fdeec92eca2e9092c113bcc2658 | 6c209a4eeda5ec32afe31aafeaf216ed482234a3 | refs/heads/master | 2023-02-19T11:26:51.273363 | 2022-09-26T14:20:06 | 2022-09-26T14:20:06 | 298,593,978 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 379 | cpp | P2015.cpp | /*
法一:f[i][j]表示以i为根,节点量为j的子树最大苹果数
f[i][j] = f[l[i]][k] + f[r[i]][j-1-k] + a[i]
f[i][0] = 0, a[1] = 0
求f[i][Q]
*/
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
struct edge{
int ls;
int next;
int num;
};
vector<edge> e[maxn];
int dfs(int x){
}
int main(){
... |
93f38f4006198950f6393d3acad012da832a0f59 | 209779c03feff329fcc7e0898854c4ba0c6d4d16 | /luogu/codes/P1349.cpp | b7e73dfb31615b8c7925113033e55d92314f6951 | [
"MIT"
] | permissive | TonyCrane/OI | 76b90833a495bf491377b91e88b944e2113bc49b | 562f5f45d0448f4eab77643b99b825405a123d92 | refs/heads/master | 2022-11-08T20:00:37.196582 | 2020-06-27T14:51:54 | 2020-06-27T14:51:54 | 161,732,784 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,823 | cpp | P1349.cpp | /*************************************************************
* > File Name : P1349.cpp
* > Author : Tony
* > Created Time : 2019/05/19 12:05:52
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0, ... |
36220cdbcb088cdde66776769bd85a11ef645a87 | 7f1f772271560776681334f00d7eacb35094386e | /tp2/tp2_eje5.cpp | ef08fdf29d116e0c7f6c59b4192625dfd35e8dfc | [] | no_license | AgustinPeralta18/PRACTICA_C- | 2d1403a9f6922131b8caccfb0c63d24259287a6e | c3330a6574dd341112787ee6307e38951c36dbdf | refs/heads/main | 2023-07-13T00:42:50.955022 | 2021-08-26T01:00:18 | 2021-08-26T01:00:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 453 | cpp | tp2_eje5.cpp | // Ingresar un n�mero natural n e indicar si es primo.
#include<iostream>
using namespace std;
int main(){
int num, i;
cout<<"Ingrese el numero: ";
cin>>num;
if (num == 1)
cout<< "El numero no es primo"<<endl;
for (i = 2; i < num; i++)
{
if (num % i == 0)
{
cout << "El numero no... |
5c479cd971a2811def57fc938ffe0c825feccc3e | 15a28e0d94a3ca0319c7beb5367b58fa02e17bc5 | /Teensy_Audio_Modes/funcs.ino | bce5dec27c2f19ead6ea03233930d8295950f9ca | [] | no_license | Majoras-Other-Mask/DIY-Pocket-Piano | e826466d04d79dc50d8494528cdbb62b2370903e | e405213074ba3ecc9a944df30c2f23ea978114f8 | refs/heads/master | 2022-12-04T15:31:42.267479 | 2020-08-27T14:16:26 | 2020-08-27T14:16:26 | 265,411,860 | 5 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 8,518 | ino | funcs.ino | //update screen info
void screenUpdate(void) {
//Draw starting mode
display.clearDisplay();
display.setCursor(0, 0);
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1);
display.setTextWrap(1);
display.println(modeString[mode]);
display.print(knob1String[mode]);
display.print(" ");
dis... |
5ddd0d04f8b5b6bccafc0f07606c50b65dcba9a0 | 06cd6819b3235a2c1fbd6751a8f14f028ebbcd18 | /C++/Lab_3/ViewFactory/Views/SFMLView/Buttons/BackButton.h | 001d9a348b1e4c3949a4ddd60b6f7da03e7fc10c | [
"MIT"
] | permissive | Baymxs/FIT-OOP | 51ea794600e597e82d1afadc1e9c4b0c9a1fd23d | ade15c143f3dafec466d5447fc3a6750f347b6bc | refs/heads/master | 2020-03-28T00:59:03.500706 | 2019-05-14T13:09:37 | 2019-05-14T13:09:37 | 147,466,832 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 513 | h | BackButton.h | //
// Created by Bayramov Nidjat on 18.12.18.
//
#ifndef LAB_3_BACKBUTTON_H
#define LAB_3_BACKBUTTON_H
#include "Button.h"
class BackButton : public Button {
public:
BackButton(const std::string &button_name, const int &x, const int &y) : Button(button_name, x, y) {
getButtonNormalTexture().l... |
dbc0fb2f7118ff2797a53b9a9b60b88e73953940 | d907753c40533af878bd0fe8e670f45c73c6a72e | /week1/main7.cpp | c5521eef86cc0e014391e6a6160b64f6eebd80b6 | [] | no_license | Striker007/mipt_yndx_cpp-white | b13f03653a715069f2d075e1c53478c16df8e39c | ca8f3f63e139fa5a9aeee24459b5f9a4b28a9c95 | refs/heads/master | 2020-04-15T03:39:44.253212 | 2019-01-06T23:57:57 | 2019-01-06T23:57:57 | 164,356,047 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 276 | cpp | main7.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main7() {
int n;
cin >> n;
vector<int> v = { };
while (n > 0) {
v.push_back(n % 2);
n /= 2;
}
reverse(begin(v), end(v));
for(auto num : v) {
cout << num;
}
return 0;
}
|
44ab41906a88c557da1bd114bef352fa99da95b1 | b367fe5f0c2c50846b002b59472c50453e1629bc | /xbox_leak_may_2020/xbox trunk/xbox/private/vc7addon/vs/src/vc/ide/include/fmtinfo.h | da244af5c72a2d5415a4e2000c14d4e5a79efe5e | [] | no_license | sgzwiz/xbox_leak_may_2020 | 11b441502a659c8da8a1aa199f89f6236dd59325 | fd00b4b3b2abb1ea6ef9ac64b755419741a3af00 | refs/heads/master | 2022-12-23T16:14:54.706755 | 2020-09-27T18:24:48 | 2020-09-27T18:24:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 15,249 | h | fmtinfo.h | // REVIEW(DavidGa): This needs to be drastically simplified and moved
// into shlsrvc.h.
// FMTINFO.H
//
// Classes defined:
//
// CFormatInfo
// CFormatInfoArray
//
// Structures defined:
//
// FMT_ELEMENT
// FMT_WINDOW
// FMT_WINGROUP
// LOGFONTSEARCH
// AUTO_COLOR
... |
c0f36db3aecc98fee64f984b5d3307023d4745cb | 51506848883fcfc8d8eff4dd1a18f6ff94d26b19 | /bugs/CalendarPersonalPlanner/PRIVATE/src/cpp.cpp | b783234d8f1d4823e1f31bd47349f5690ba62421 | [] | no_license | Morriar/csg_debug | cc477b6987682371eb2787c5e283cd6225ab76b8 | a71f6fc3e6af54162783dd58af2da9786dd68d7d | refs/heads/master | 2021-03-19T16:43:48.688253 | 2018-01-05T20:30:00 | 2018-01-05T20:30:00 | 56,012,897 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,785 | cpp | cpp.cpp | /* ** *
* Quick and dirty code. Should work as is, except I did not really tested it.
* TODO: clean it and remove debug.
* ** */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
/* Min-heap data structure. Basically by the book. */
class node {
public:
double priority;
void *data;
};
class heap {
pub... |
504262a3fbc974edb5a171f00f521ba0aebd9967 | cb435b5f9a6f9231f7a50ec2cf9f0c21aa282b91 | /nanoPinPad.cpp | 12b2bc02bdf9df74cb3ec67e8a527036b79c8f5d | [
"WTFPL"
] | permissive | FistOfTheNorthStar/mcuCollection | 7309f5c63f08042588bf585cdc02cdf0b405039b | 55e9b91ad2d2243a2dba2dbc404a11eb187bd4ce | refs/heads/master | 2021-07-08T23:02:53.950548 | 2017-10-04T12:11:26 | 2017-10-04T12:11:26 | 105,762,722 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,911 | cpp | nanoPinPad.cpp | // Do not remove the include below
#include "nanoPinPad.h"
//timer to reset the pins
#include <MsTimer2.h>
//keypad library
#include <Keypad.h>
//add EEPROM
#include <EEPROM.h>
//memory testing
//#define MEMTEST
#ifdef MEMTEST
#include <MemoryFree.h>
#endif
//time to block misuse
#define DELAYtime
const byte ROWS ... |
e7fb10c89b88bae67e65fcdf34dd3eed0b78ddbf | a7b5e2e456c4ebef9ab2b9bc8ab614c6a3576a6b | /MyAna.h | 52aec4d9b7735b214f0542d80bcbcaa593440ef0 | [] | no_license | thomps51/UndergradThesisCode | d6181d2da5bb1d025977649f0568da94792a653a | 4eb9dddf3550dc656e50f15f07e160ad670c2a95 | refs/heads/master | 2021-01-10T02:34:56.586374 | 2016-01-04T02:06:29 | 2016-01-04T02:06:29 | 48,962,083 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 89,606 | h | MyAna.h | //////////////////////////////////////////////////////////
// This class has been automatically generated on
// Tue May 28 15:27:24 2013 by ROOT version 5.34/07
// from TTree HWWTree_em/HWW DilepNtuple_em
// found on file: 161305.root
//////////////////////////////////////////////////////////
#ifndef MyAna_h
#define M... |
25d409c583f6d29bca6103ffdb185cbbef2d513f | 1abc66de336e6574e94209c51772464454163505 | /sample/struct.cpp | 23c728fa780b370d584238ff50d6bcc4717cfa61 | [] | no_license | sifue/cpp-study | f535ee9b4872cc02068b160a7c742ebf3204e801 | 37fa0bf0512c176e894ab073bde0adb324546916 | refs/heads/master | 2022-05-07T14:47:24.653299 | 2022-03-21T06:32:20 | 2022-03-21T06:32:20 | 94,349,705 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,617 | cpp | struct.cpp | #include <bits/stdc++.h> // g++ -std=c++14 -o a a.cpp
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define repto(i, n) for(int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end(... |
29bad5e2e42f812a05746d6379e6ea7f4621e955 | 66949cd67f9a6b729a51d1037fd1015cce02db95 | /chocChipChess/uci_helper.h | 80d03cabf90e6c55566beb794c88d3d7ab69614b | [
"MIT"
] | permissive | GenericCinnamon/chocchipchess | 0b8de68d7b86d626c913a44168f7c656b23a68ec | 793ea775b6b96df1157c9e712a420add7d21f89b | refs/heads/master | 2020-04-09T04:06:55.373976 | 2018-12-02T03:48:52 | 2018-12-02T03:48:52 | 160,010,530 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 953 | h | uci_helper.h | #pragma once
#include <string>
#include <thread>
#include "output_helper.h"
#include "position.h"
#include "transposition_table.h"
#include "input_handler.h"
#define AVERAGE_GAME_LENGTH 30
using namespace std;
class UCIHelper : public InputHandler {
private:
OutputHelper output;
/* Store the current board po... |
85ad9a0df1a48292446dc4615b1999d7b2e5086f | 5496fe7d32f473921e4f3a4f1236b74951ca15cc | /LR_3/Function.cpp | eee0eebe08c1156c8762b68754f4da3e86ca30f4 | [] | no_license | Foxi-maker/LR_3 | f9aefecb74754c2d66d242dc0e5d71c54e2e8358 | 3068fba5c393df2848cedfe216aee247714ae54f | refs/heads/master | 2023-01-20T01:35:58.018806 | 2020-11-22T09:52:09 | 2020-11-22T09:52:09 | 313,855,660 | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 2,885 | cpp | Function.cpp | #pragma once
#include "Header.h"
void FUN::Show(double** matrix, int n)
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
std::cout << std::setw(12) << matrix[i][j] << " ";
}
std::cout << "\n";
}
std::cout << "\n";
}
void FUN::MultMatrix(double** a, double** b, int n)
{
double** c = new d... |
939dff5d52291f45edc4e94e9dd160880875ac4d | 93e4d55c6751a7cc872817a2d37fc4ee581ff907 | /26RemoveDuplicatesfromSortedArray.cpp | 1805c34d91beb4eb5a4fcaee606a010f4bf9b0ec | [] | no_license | rainbowsnail/leetcode | 91c3c0b187963d93624a37e677b3c2e3e68d28ab | eb1c1bf59ad10f570ee4ec1051aa1a72e23176ee | refs/heads/master | 2021-05-03T04:39:30.188998 | 2020-05-19T12:38:01 | 2020-05-19T12:38:01 | 120,621,353 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 306 | cpp | 26RemoveDuplicatesfromSortedArray.cpp | class Solution {
public:
int removeDuplicates(vector<int>& nums) {
vector<int>::iterator cur = nums.begin();
while(cur != nums.end() && cur + 1 != nums.end()){
if(*cur == *(cur+1))cur = nums.erase(cur);
else cur++;
}
return nums.size();
}
};
|
395fd1aab1e0e47232cd2a3624cc4973e4a196b4 | 087de3c553a3f930971ae6c9d06d14db8972cb31 | /test/client.cpp | ff341ea6424fdd77f17576a53de38b34e4b37749 | [] | no_license | Rubiphisto/netstream | ff74db5b5f4d9852fcf126c3a06556c76a154ba6 | e40e2757d422e3e76457813d11453fd0139977cf | refs/heads/master | 2021-04-29T06:26:18.452017 | 2018-05-04T09:02:09 | 2018-05-04T09:02:09 | 77,966,410 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,171 | cpp | client.cpp | #include <stdint.h>
#include <thread>
#include <iostream>
#include <queue>
#include <string>
#include <mutex>
#include <string.h>
#include <cinttypes>
#include "libnetstream.h"
#if defined( _WINDOWS )
#include <windows.h>
#endif
#define MAX_CHAT_CONTENT 1024
bool g_running = true;
bool g_close_connection = false;
st... |
5730b186a9185e417338bbc9e31fbf1d05701bcb | 812a62d44ebab2a851ae470c711d05ee7a9a638c | /src/factory/factorymethod.h | 9e9b90286f3274bb50cf43fbf408832023a6a14b | [] | no_license | Howard0o0/design-patterns-in-cpp | 498f9f45e3cc292ea16d04ab42f8f999c5e0f1c4 | 226c8908b3996efe679171d2ffe7210bf12eb960 | refs/heads/master | 2022-11-12T02:42:26.740637 | 2020-07-04T12:18:34 | 2020-07-04T12:18:34 | 270,589,962 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 804 | h | factorymethod.h | #ifndef DISIGN_PATTERNS_IN_CPP_FACTORYMOTHOD_H
#define DISIGN_PATTERNS_IN_CPP_FACTORYMOTHOD_H
#include "soap.h"
#include <memory>
namespace factorymethod {
class SoapFactory {
public:
virtual std::shared_ptr< SoapBase > CreatSoap() = 0;
};
class LuxFactory : public SoapFactory {
public:
virtual std::share... |
1c66a427e5812bcc4d07266d0a5a8f8de2dead45 | 8f4cb6b34e4a13b0d71756987aa07d22d1e5c399 | /solutions/uri/1212/1212.cpp | 4785d3b36f6bdb25a4e7249d01196895a74dc2f8 | [
"MIT"
] | permissive | kaneki-ken01/playground | e688537439d4ef937cfeb3a0be54159c5d47d51b | 1900da4a7b352b1228659631068ff365456408e1 | refs/heads/main | 2023-08-16T21:00:05.823664 | 2021-10-04T19:09:08 | 2021-10-04T19:09:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,196 | cpp | 1212.cpp | #include <cstdint>
#include <cstring>
#include <iostream>
#include <string>
int main() {
int16_t c, temp, index, result[12];
uint16_t i, size_a, size_b;
std::string a, b;
while (std::cin >> a >> b) {
if (a == "0" && b == "0") {
break;
}
memset(result, 0, sizeof(res... |
b0f35bb41ab904f20dfe5104c82bf4ee9c49e2ec | 3821e537c0e03e602ba4ac770dcce0d741d026a7 | /Personal/Dijkstra.cpp | ae94db1bc00dfaeebbfd518533b0be417c765da1 | [] | no_license | msyashik/CPPS | 6766992e40c30f112d959b5c57e1af5487d885a9 | ae163a3a75dade8bc51f566ae529ea4f9075db97 | refs/heads/master | 2023-07-13T00:08:32.465275 | 2021-08-22T02:41:23 | 2021-08-22T02:41:23 | 161,633,625 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,583 | cpp | Dijkstra.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define SIZE 100005
#define inf 100000000
int dist[SIZE]; // change the value of SIZE as you want
int path[SIZE];
struct edges
{
int v;
int w;
};
bool operator < (struct edges a, struct edges b)
{
return a.w > b.w;
}
void dij(int node, priority... |
b0560cd1f2655fa10670b90d0a55a4e7aa5ac6ad | fb5b66079819c1d725ba9cec5b7f689e788d0c57 | /algorithm/sortAlgorithm.cpp | 07e8be76c32bd37cf56ba278ed190f4a1f588cf3 | [] | no_license | CQUzst/Cpp | 1bcf2b52ec8766694d8dec744b4d33ba8e260193 | 6593beaac95c827aff5a2e2badb4a165dc82c51c | refs/heads/master | 2020-04-06T09:19:02.174440 | 2019-10-22T10:56:26 | 2019-10-22T10:56:26 | 157,337,176 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,222 | cpp | sortAlgorithm.cpp | #include <iostream>
using namespace std;
/***************************冒泡排序******************************/
//时间复杂度n*n,空间复杂度1
void bubbleSort (int a[], int n) {
for(int i=0;i<n;++i){//n轮循环
for(int j=0;j<n-1;++j){//每轮循环进行n-i次比较,将最大值放到尾部
if(a[j]>a[j+1])
{
int tmp=a[j+1];
... |
8219ec0d47ff02fc7c43e5f525e31e97d8cc4fd2 | f01bfe3373c64a01595fe260a8683e8ae1c58262 | /src/gui/SelectionEllipsoid.cpp | 5996fc8bab7dee5e1de49f629bb4a6d0668c58ba | [] | no_license | scilus/fibernavigator | c70412ee4ba6aa8993a5e5d452fb7d93f75fbefb | 8e07827bc9228ebe9c225bf627930a67652e565c | refs/heads/master | 2021-01-19T03:20:11.542019 | 2017-06-12T19:34:31 | 2017-06-12T19:34:31 | 8,565,508 | 33 | 16 | null | 2020-07-08T18:08:28 | 2013-03-04T21:37:13 | C++ | ISO-8859-2 | C++ | false | false | 8,550 | cpp | SelectionEllipsoid.cpp | /////////////////////////////////////////////////////////////////////////////
// Name: selecitonEllipsoid.cpp
// Author: Imagicien ->LAMIRANDE-NADEAU Julien & NAZRATI Réda<-
// Creation Date: 10/26/2009
//
// Description: This is the implementation file for SelectionEllipsoid class.
//
// L... |
aae483e36f07f04d0317a2a03214b8d9e2e9873f | ec4f748331b081ee73e6406fa947b5f085d48410 | /f10_design_patterns_plus_plus/raii.cpp | 6a681a0e340ad1fcfd379d26a24a7d134ef3fcde | [] | no_license | peder82/cpp_v2014 | 6b868cd34d2124b284cc1715dfe10a91301849ed | 2babd30ee153ee93051364922511295063ba385f | refs/heads/master | 2020-12-30T17:32:40.049320 | 2014-06-11T21:03:41 | 2014-06-11T21:03:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,087 | cpp | raii.cpp | /*
Code adapted from Bjarne Stroustrup FAQ;
http://www.stroustrup.com/bs_faq2.html#finally
Demonstrates the RAII (Resource Acquizition Is Initialization) pattern/idiom.
Here we use it to make a low-level file-handle exception-proof. We could just as well use it to protect
- a server socket (if you don'... |
0baa2c519906b2e34f276eac7ac9c8fde07bb65f | 3a5380638ded6c94448089a3e67196b6b72b5ca3 | /Assignment3/include/Utilities.hpp | 31cc343706b9e6b437ecd8ed72f36d44f9666a5c | [
"MIT"
] | permissive | dissolete/cs446 | a87da64b4fab637bcaa35a808f941ef519a00312 | 07a3813fc0cbee4d1406f763189c215f998c39f2 | refs/heads/master | 2021-01-11T14:56:36.465743 | 2017-03-11T02:00:53 | 2017-03-11T02:00:53 | 80,255,622 | 0 | 0 | null | 2017-02-03T21:27:43 | 2017-01-27T23:45:59 | C++ | UTF-8 | C++ | false | false | 1,980 | hpp | Utilities.hpp | #ifndef __UTILITIES_HPP_INCLUDED
#define __UTILITIES_HPP_INCLUDED
#include <iostream>
#include <cassert>
#include <memory>
#include <exception>
// Comment this out if you do not want to see debug messages.
#define __USING_DEBUGGING
// Comment this out if you do not want to use fatal error checking.
// **************... |
fc2f3a207f0b307e9177d4fbe35a8227e1359f0d | 2d7ff09bf8e73f2b437a39565c74f99dc94d76b2 | /Pokemon/Classes/Pokemon/Blastoise.cpp | 7b9ac0ebc9cebf508f5e8b3cf4c7a172cde5c9d6 | [] | no_license | Crasader/Summer2019_Group3_Pokemon | f0d66a7cbda04b1349e7ae7d5bdf6db307fa9670 | cb2c2206a9a2a668985511382dd5078acd42e93d | refs/heads/master | 2020-11-28T14:46:45.885959 | 2019-08-03T00:32:02 | 2019-08-03T00:32:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 682 | cpp | Blastoise.cpp | #include "Blastoise.h"
#define hp 40
#define atk 52
#define def 43
#define speed 65
Blastoise::Blastoise()
{
this->Init(0, 1);
}
Blastoise::Blastoise(Wartortle * it)
{
this->Init(0, 1);
//
this->m_name = "Blastoise";
this->m_type = it->GetType();
this->m_listSkill = { it->GetSkillById(0), it->GetSkillById(1), i... |
39dcb8bf19a119e044579863b8c7f11cc6cfd598 | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/squid/gumtree/squid_new_log_1619.cpp | daf566edd88c6430fb6b347e5599fef1b12c86a7 | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 217 | cpp | squid_new_log_1619.cpp | out.appendf("<%s colspan=\"%d\" align=\"%s\">%s</%s>",
ttag, column_span,
is_header ? "center" : is_number(cell) ? "right" : "left",
html_quote(cell), ttag); |
c31987d009f896378ffa91031237180860b17446 | 3208e9d63e390f2d84fb442c22c7dafc255e9795 | /Arrays/Easy/specialpositionsinabinarymatrix.cpp | c24116d9d870d917736267e8f964717aabd19cc3 | [] | no_license | preethichandra20/LeetCode | 892214522d164d8a616c5bb3906bfa10626e8b13 | 5ff4f7064089c3775eaef973ac33d52d3380d269 | refs/heads/master | 2023-05-28T21:48:44.559310 | 2021-06-14T17:23:34 | 2021-06-14T17:23:34 | 376,902,980 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 975 | cpp | specialpositionsinabinarymatrix.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<vector<int>> mat={{1,0,0},{0,0,1},{1,0,0}};
int m=mat.size();
int n=mat[0].size();
int noofones=0;
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
int key=mat[i][j];
if(key==1){
b... |
bcd267b37eb487a67699950bebe7dc8388db822e | 2f10f807d3307b83293a521da600c02623cdda82 | /deps/boost/win/debug/include/boost/hana/detail/nested_by.hpp | b4cb5704682b9a340495badc3f082d0edb29a067 | [] | no_license | xpierrohk/dpt-rp1-cpp | 2ca4e377628363c3e9d41f88c8cbccc0fc2f1a1e | 643d053983fce3e6b099e2d3c9ab8387d0ea5a75 | refs/heads/master | 2021-05-23T08:19:48.823198 | 2019-07-26T17:35:28 | 2019-07-26T17:35:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 129 | hpp | nested_by.hpp | version https://git-lfs.github.com/spec/v1
oid sha256:82e263bd476b5d49f7b85e313002c6e36022a02213ac4f9ee8a3516b008e8f4e
size 1255
|
73e9fbb2b66034648a03d22cf55c636f09c872df | cab2ce290c43c657ae92066b1d1c5267bb6d5bd7 | /homework2/barrier.h | 0c3365ced0e83f0df7ef493e3189f192eab2edf7 | [] | no_license | smj2mm/OS | a6cc403f44b6feae422ac998c22449b8a6036b7c | 275b32f9bfb0112685820463a93d2a73cef82326 | refs/heads/master | 2020-01-27T10:02:18.095632 | 2016-12-08T22:31:43 | 2016-12-08T22:31:43 | 67,442,910 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 248 | h | barrier.h | #include <semaphore.h>
#ifndef BARRIER_H
#define BARRIER_H
class Barrier {
private:
// mutex
sem_t m;
// waiter
sem_t w;
// handshake
sem_t h;
int counter;
int capacity;
public:
Barrier(int size);
void wait();
};
#endif
|
74df297b1335f63fd338504f50c6da99c4ef938b | 24c108de7c4ce08241e8705537e268ac0b1fb77a | /Sketches/LaundryReminder/LaundryReminderButton/ServerHelper.h | 02cf81a93245cabaa737f2556a125d9b1a1723a6 | [
"MIT"
] | permissive | cjc061000/LaundryReminderButton | 3e488e54d2d434746ad20d6de285d2c9582ff629 | 463667afc24d2dc8c95a596b1c9868116f44a379 | refs/heads/master | 2022-12-14T13:10:54.396650 | 2020-08-29T19:15:02 | 2020-08-29T19:15:02 | 282,082,556 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 603 | h | ServerHelper.h | #ifndef ServerHelper_h
#define ServerHelper_h
#include <Arduino.h>
#include <WiFi.h>
class ServerHelper
{
public:
ServerHelper();
void handleNewClient(WiFiClient client, String Header, String &requestUrl, String &queryParamsStr);
void GetRequestParameters(String queryParamStr, String &ssid, String &pw);... |
defd22d76a0ba3425baaf6b62000eb6b06a1e76f | 913d4919c8041b918c51b57d52acaad1f99a82e0 | /Iluminate_hallway.cpp | 96669a6eb8f2e0e40bbc14657ebaff7460d9b3e0 | [] | no_license | KunalFarmah98/Interview-Questions | f126d6fb74bfadf03a1e00b523549c7c24e5ffec | 61f638e16823992ac9578349fef6535fa231da83 | refs/heads/master | 2022-07-29T16:19:56.356807 | 2020-05-25T15:14:08 | 2020-05-25T15:14:08 | 266,811,559 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,325 | cpp | Iluminate_hallway.cpp | // { Driver Code Starts
// driver code
#include <bits/stdc++.h>
using namespace std;
int min_lights(int hallway[], int n);
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
int hallway[n];
for (int i = 0; i < n; i++)
cin >> hallway[i];
cout... |
bab9d82100bbde16f46b7f1b2821f34ec40f5004 | e5adb57a9b85cec1ae543aa4a6db3694c2a2d5ae | /VulkanEngine/CommonStructs.h | ecde2181a7298939bcd5c28323b3fb3848a9d27c | [] | no_license | g4tobauer/VulkanEngine | 011eb2823760c1ae7145821992b33926d2339ab9 | 4adda1068109b89a7f6aca9660e1e43102e1b0b5 | refs/heads/master | 2023-09-02T22:05:37.758211 | 2023-08-31T03:24:03 | 2023-08-31T03:24:03 | 132,063,484 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 730 | h | CommonStructs.h | #pragma once
#ifndef ENGINE_COMMON_STRUCTS
#define ENGINE_COMMON_STRUCTS
#ifndef ENGINE_COMMON_HEADERS
#include "CommonHeaders.h"
#endif // !#ifndef ENGINE_COMMON_HEADERS
struct SwapChainSupportDetails {
VkSurfaceCapabilitiesKHR capabilities;
std::vector<VkSurfaceFormatKHR> formats;
std::vector<VkPresent... |
1e8613c50cfc33418d901e78729dfa5122c09ca0 | 78da87159332b7f053c6bcf88f888ffc6c4dd624 | /336.cpp | 02ad5dc309e3573714d36f5e9332a087aa660a77 | [] | no_license | sudiptobd/UVA-Solving | e2d7bb9b8196a469003dde056b1e596af642cc95 | 403dd3a54e1a8e9af42dcd3d121a64269f9b351a | refs/heads/master | 2021-01-11T20:02:09.401456 | 2017-01-19T12:47:13 | 2017-01-19T12:47:13 | 79,452,726 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,462 | cpp | 336.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <vector>
#include <memory>
#include <map>
using namespace std;
int BFS(int src,int ttl,map<int ,vector<int> >gf)
{
int count=0;
map<int, int>visited;
map<int, int>level;
visited[src]=1;
level[src]=0;
queue<in... |
6af27e0637776ef8bdd964aeafb4d12e6eabbb7a | 81e9d9428206b5f04969333f3e1d174641966234 | /codeforces/ER9/F/F.cpp | 635f0c240b738a0e94e19974d97980e26afaa679 | [] | no_license | MHamada96/competitive-programming | c87325db731d4e54d80f668395a5f03fb779d086 | 66b52775ebdbeeed1d833312cd12efed9d48aec3 | refs/heads/master | 2020-04-11T15:00:41.879744 | 2018-12-15T06:21:36 | 2018-12-15T06:21:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,649 | cpp | F.cpp | #include <bits/stdc++.h>
#define loop(i,n) for(int i = 0;i < (n);i++)
#define range(i,a,b) for(int i = (a);i <= (b);i++)
#define rrep(i,n) for(int i = (n);i >= 0;i--)
#define rran(i,a,b) for(int i = (b);i >= (a);i--)
#define step(i,a,b,d) for(int i = (a);i <= (b); i += d)
#define all(A) A.begin(),A.end()
#define PI aco... |
9f83109dc9dad6e9c7ab53eb4b582890b3a8fd3e | 1359bb193ce7ec547ae07862c207b6b68d7d8d8e | /Tree/Count Complete Tree Nodes.cpp | 7906a6da78d9e862800d025a94d369d919ece8c4 | [] | no_license | yukta22/leetcode | f13f6d96c0e7254651de55ce9ab54ca5f5992e6b | 8d1352415146adf7cb8963e6c80c78111c89dc4f | refs/heads/main | 2023-08-14T11:01:48.541234 | 2021-09-28T09:36:45 | 2021-09-28T09:36:45 | 328,369,449 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,280 | cpp | Count Complete Tree Nodes.cpp | // Given the root of a complete binary tree, return the number of the nodes in the tree.
// According to Wikipedia, every level, except possibly the last,
// is completely filled in a complete binary tree, and all nodes in the last level are as far left as possible.
// It can have between 1 and 2h nodes inclusive a... |
961f6cd150c670500ef60264d3f52ea494d2ec5e | 8faee0b01b9afed32bb5b7ef1ab0dcbc46788b5b | /source/src/misc/xmlwrapp/schema.cpp | eecd45c39b04252a1f335657c64fd6b4bd2e41f8 | [
"BSD-3-Clause"
] | permissive | jackgopack4/pico-blast | 5fe3fa1944b727465845e1ead1a3c563b43734fb | cde1bd03900d72d0246cb58a66b41e5dc17329dd | refs/heads/master | 2021-01-14T12:31:05.676311 | 2014-05-17T19:22:05 | 2014-05-17T19:22:05 | 16,808,473 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,664 | cpp | schema.cpp | /*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in ... |
9fb6b3e28da7429917a16a697adfae71613590cf | 60bd230f8b7af9b629c76c875b89be709a91270f | /modules/roklegend/blib/platform/android/window.h | efe60712736ec1c8811cac4d75062290736e958c | [
"CC-BY-4.0",
"MIT",
"LicenseRef-scancode-free-unknown",
"OFL-1.1",
"Bison-exception-2.2",
"FTL",
"GPL-3.0-or-later",
"BSD-3-Clause",
"Zlib",
"CC0-1.0",
"GPL-3.0-only",
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-nvidia-2002",
"BSD-2-Clause",
"Li... | permissive | ViteFalcon/godot | 1837321c10d52dac7b60c8254f14e3ce528fb493 | 57bd8ada2877b4f4582354fab7148dac56cdf751 | refs/heads/master | 2023-01-08T17:22:06.945736 | 2022-12-30T14:40:37 | 2022-12-30T14:40:37 | 107,849,549 | 0 | 0 | MIT | 2022-12-30T14:40:37 | 2017-10-22T08:31:34 | C++ | UTF-8 | C++ | false | false | 813 | h | window.h | #pragma once
#include <blib/IWindow.h>
#include <blib/KeyListener.h>
#include <EGL/egl.h>
#include <vector>
namespace blib
{
class App;
namespace platform
{
namespace android
{
class Window : public blib::IWindow
{
private:
App* app;
EGLDisplay display;
EGLSurface surface;
EGLC... |
d29f34f7d8665f163a75d8f714fb708d48e31fb6 | e2e035f218a0d4a39b85aeb444cdca02cc4b0529 | /Arduino Library/DFR_LCD_Keypad-master/DFR_LCD_Keypad.h | 98e18947a4030fc1d543ae26ff7ef3e89b39bd01 | [] | no_license | dtnghia2206/LCD_Shield | c02eee3dc4d28a6a57939c94537098e708cbb549 | f865fe201e5bcbe3c5fdff9d7ac6036642622728 | refs/heads/master | 2023-08-31T14:58:36.457728 | 2023-08-28T12:39:37 | 2023-08-28T12:39:37 | 155,398,598 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,990 | h | DFR_LCD_Keypad.h | /*
Arduino LCD + Keypad Library
by Andy Gock
http://micro.gock.net
For use with common LCD / Keypad shields such as:
DFRobot DFR0009
http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_%28SKU:_DFR0009%29
*/
#ifndef DFR_LCD_KEYPAD_H
#define DFR_LCD_KEYPAD_H
#if defined(ARDUINO) && (ARDUIN... |
8908e1df25926febb30edc3dc3c18bdb9b705be4 | 7c480170f452999f8266f2f2d258babc4111d8bd | /circle.h | 84b86e05c54e1e6074493d4699d491bd92c29c82 | [
"MIT"
] | permissive | brun0marques/ascii_geo_fig | 25b979d6fc0b8d1e29e00e14fc5aa97e745811d4 | 146605e58654136cbbe7ce91708c6230a6d8e784 | refs/heads/master | 2020-04-03T18:36:53.497996 | 2018-10-31T03:13:25 | 2018-10-31T03:13:25 | 154,845,026 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 267 | h | circle.h | #ifndef CIRCLE_H
#define CIRCLE_H
#include "geometricfigure.h"
class Circle : public GeometricFigure
{
private:
int xc, yc, radius, fillmode;
public:
Circle(int _xc, int _yc, int _radius, int _fillmode);
void draw(Screen &t);
};
#endif // CIRCULO_H
|
39b502b836aa5e44e0b578acfcd39b0fe98a13f0 | 3cc352b29b8042b4a9746796b851d8469ff9ff62 | /src/paths/HKPMerger.cc | cc420d01d7f276299f0ca0d8e80c922560e765c6 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | CompRD/BroadCRD | 1412faf3d1ffd9d1f9907a496cc22d59ea5ad185 | 303800297b32e993abd479d71bc4378f598314c5 | refs/heads/master | 2020-12-24T13:53:09.985406 | 2019-02-06T21:38:45 | 2019-02-06T21:38:45 | 34,069,434 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,100 | cc | HKPMerger.cc | ///////////////////////////////////////////////////////////////////////////////
// SOFTWARE COPYRIGHT NOTICE AGREEMENT //
// This software and its documentation are copyright (2011) by the //
// Broad Institute. All rights are reserved. This software is supplied //
... |
ef773b3aca03ef7fc00d5479d3e0f3b8cec9a819 | dea577b36d0ac4ebbd3b7b0ed36c2738cf4b3462 | /main.cxx | a45c76a3973c6817d5c35558c7588d5cbab1f1cd | [
"BSD-2-Clause"
] | permissive | alzwded/school-rsff | cc645fe388ea67cd925f02c11ce2599d397cea17 | 6383a0b3c51bd48e178b3ce089202576173e10b8 | refs/heads/master | 2021-01-23T03:08:22.252058 | 2014-05-20T10:40:05 | 2014-05-20T10:40:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,116 | cxx | main.cxx | #include <cstdio>
#include <fstream>
#include <algorithm>
#include <ctime>
#include "core.hxx"
#include "pathfinder.hxx"
#include "drawing.hxx"
#include "parser.hxx"
static bool dragging = false;
static bool panningUp = false;
static bool panning = false;
static int lastX = 0, lastY = 0;
static Beam::vector beams;
st... |
8bd11b164af8ce29ae4bd2a01c6fd7b457438855 | e6b29fee3a6c328b17eb4366a59915fe5f0f1c04 | /player.h | cca98a362d6da512c8ba5a843879dd2bbd2c6810 | [] | no_license | iblobtouch/cppPlatformer | a9aad214c2742e36422ed984c9c0476f9c65efb5 | ef50303e8d106ea1d4ef9f1bb3d7ffe8a1510ca5 | refs/heads/master | 2020-07-16T20:17:32.075836 | 2019-10-03T12:46:50 | 2019-10-03T12:46:50 | 205,860,657 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 442 | h | player.h | #pragma once
#include "Entity.h"
#include "Point.h"
#include <SDL.h>
#include <SDL_image.h>
#include <stdio.h>
#include <string>
#include "Weapon.h"
class player: public Entity {
public:
player(std::vector<ReadableTexture*>* playerImages, SDL_Point playerImgSize, int scale, Weapon* weapon);
bool onGround = false... |
c26d50ad0fe0216af6757a9ae914208089345291 | e7cc6c89881b4569cb6ec974bfc2661f11e69c96 | /tests/MarkedMapTests.cpp | e841f2c18a3e650eedb6679e8e88d3a09434aecf | [] | no_license | Teaching-projects/SZE-MOSZE-2020-Pottyok | c8928c11d5e3662653ab5cde389ca8a67b6e3486 | be4fe73c5a7c4566eb5c4e212f4973a56ce0cec0 | refs/heads/master | 2023-01-28T00:01:50.607095 | 2020-12-10T11:13:23 | 2020-12-10T11:13:23 | 294,088,560 | 0 | 1 | null | 2020-12-10T11:13:24 | 2020-09-09T11:11:16 | C++ | UTF-8 | C++ | false | false | 1,057 | cpp | MarkedMapTests.cpp | #include "MarkedMap.h"
#include <gtest/gtest.h>
TEST(Maptest, FileReadTest)
{
std::string fileName = "none.txt";
ASSERT_THROW(MarkedMap map(fileName), std::runtime_error);
fileName = "markedmap_test.txt";
ASSERT_NO_THROW(MarkedMap map(fileName));
}
TEST(Maptest, GetHeroPosition)
{
std::string file... |
406a68387e64d08053fca1a54bd3a7a8b09a2109 | d6b4bdf418ae6ab89b721a79f198de812311c783 | /mps/include/tencentcloud/mps/v20190612/model/ParseLiveStreamProcessNotificationResponse.h | 4ba0e4c14c894073f31ed7626c3cff584e095de8 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-cpp-intl-en | d0781d461e84eb81775c2145bacae13084561c15 | d403a6b1cf3456322bbdfb462b63e77b1e71f3dc | refs/heads/master | 2023-08-21T12:29:54.125071 | 2023-08-21T01:12:39 | 2023-08-21T01:12:39 | 277,769,407 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,892 | h | ParseLiveStreamProcessNotificationResponse.h | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
590198d0e6344ba363e645d8721f7faccfbe5614 | 624511f6ad0cf17a2ba1a1ea1f25c3b139ce4295 | /baselib/lib/Lsc/ResourcePool/ResourcePool.h | 7c21a40f4399bc9a17e872e1c618d222ee187b93 | [] | no_license | lightchainone/lightchain | 7d90338d4a4e8d31d550c07bf380c06580941334 | 6fc7019c76a8b60d4fd63fba58fa79858856f66b | refs/heads/master | 2021-05-11T05:47:17.672527 | 2019-12-16T09:51:39 | 2019-12-16T09:51:39 | 117,969,593 | 23 | 6 | null | null | null | null | GB18030 | C++ | false | false | 27,117 | h | ResourcePool.h |
#ifndef __BSL_RESOURCEPOOL_H_
#define __BSL_RESOURCEPOOL_H_
#include "Lsc/exception/Lsc_exception.h"
#include "Lsc/pool/Lsc_pool.h"
#include "Lsc/pool/Lsc_poolalloc.h"
#include "Lsc/utils/Lsc_memcpy.h"
#include "Lsc/ResourcePool/Lsc_wrappers.h"
namespace Lsc{
/**
*
* 用户可以通过资源池托管包括内存、句柄在内的各种资源,还可以建造、克... |
7e9aecb2b6267183549524d4e31336bc40aa343f | bb410153dcdbfffb812711c878d3f48d40db45c6 | /src/common/lv2/lv2_common.h | 9643ef679b7ca4fab6d950e614b583ce855b6303 | [
"BSD-3-Clause"
] | permissive | krokoschlange/cr42ynth | 3228ed942caf278e4e6780be3590b27504c5a7a1 | bc03846eb1438c3fc4ac7bcae4e731b9c8df65b1 | refs/heads/master | 2021-11-28T21:51:43.998487 | 2020-12-03T18:32:11 | 2020-12-03T18:32:11 | 184,879,438 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,390 | h | lv2_common.h | /*******************************************************************************
* Copyright (c) 2020 krokoschlange and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of so... |
aff594de293e614a8ac1b4395801ff617a708f81 | a7f82e23431fa029e16663c5ee23f44c788bb929 | /Linked List/alternate-merge.cpp | 9d7111a7a250b70a9921f22a2413440397bedfe5 | [] | no_license | karanshgl/algorithms | 8093a9b91953b69b176d3a9b2575cba69ed00d27 | 8a6540331cc64ba8e6163197f6af70f45502c490 | refs/heads/master | 2020-09-13T18:27:17.469110 | 2017-07-22T01:21:48 | 2017-07-22T01:21:48 | 94,463,648 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 322 | cpp | alternate-merge.cpp | #include<iostream>
#include "mylist.h"
using namespace std;
Node *merge(Node *left, Node*right){
if(left==NULL) return right;
if(right==NULL) return left;
left->next=merge(right,left->next);
return left;
}
int main(){
Node *l1=takeInput();
Node *l2=takeInput();
Node *head=merge(l1,l2);
print(head);
... |
50d87e1229cb0f3267d86c252196578c3333f5de | 0d57b6c39773fa42f616be734d934c4e83ef2d99 | /SilverEngine/src/core/asset_system.cpp | 08e55dadf00bff29d56885989c6b1117edb2f4ac | [
"Apache-2.0"
] | permissive | JoseLRM/SilverEngine | 6e88be75082252e6378ee85d58b7405046a8edd5 | c23586f4c953161e3b2ba5b473655105b8987774 | refs/heads/master | 2023-07-02T01:51:06.805067 | 2021-08-06T22:12:58 | 2021-08-06T22:12:58 | 269,123,114 | 15 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,456 | cpp | asset_system.cpp | #include "core/asset_system.h"
#include "utils/allocators.h"
#include "utils/string.h"
namespace sv {
// Time to update one asset type, after this time will update the next type
constexpr float UNUSED_CHECK_TIME = 1.f;
struct Asset_internal;
struct AssetType_internal {
char name[ASSET_TYPE... |
84f71518adae2e1bba6a641cc040aaff7e6cd5ef | c4ac895830d35bdd7531c350ff328899960e8832 | /FairyLand/Code/Engine/src/Common/Vector4SSE.cpp | 3cca46e6ebd50a88a3663eaf2f0a5b7924a982c7 | [] | no_license | Qazwar/FairyLandEngine | 08ccfe46556f3fc30fdd52fcbd86b1dd3d13fac1 | 39c5bb00f13b7676fbc14f6b92344ed69e7ed435 | refs/heads/master | 2020-04-26T03:29:59.415959 | 2016-01-12T09:53:48 | 2016-01-12T09:53:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,995 | cpp | Vector4SSE.cpp | //============================================================================
// Vector4SSE.cpp
//
// Copyright 2006-2009 Possibility Space Incorporated.
//============================================================================
#include "FairyLandCommon.h"
//---------------------------------------------... |
dd593f39f08ea69340bed9b656fc2f2328d88a5a | 78ceb0e641b1a05c38bb7f75681f183739c46145 | /DungeonRPG/Jogo.h | adc1331f141dd7a10feec6364e5dbdda2adc99c4 | [] | no_license | djuliao8/DungeonRPG | 9e2116df058abe2ea0903daf8a506c2e4d6521cd | ccfbf9d05b462746f70ff72080774bdc1a896e1f | refs/heads/master | 2020-12-24T18:51:41.671197 | 2016-06-06T13:42:52 | 2016-06-06T13:42:52 | 56,601,312 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 1,271 | h | Jogo.h | #ifndef JOGO_HEADER
#define JOGO_HEADER
#include "Mapa.h"
#include "Util.h"
class Jogo{
Mapa * mapa;
vector<Jogador> jogEmJogo;
bool aDecorrer;
bool jogoCriado;
bool predefinido;
public:
Jogo(int lin,int col,bool pre);
Jogo();
void addJogador(Jogador j);
bool removeJogador(Jogador j);
void setADecorr... |
8c450afcacf5175f16a9999cc5a68a13486be5bd | 61d99314f2909a91cf195ae4fdab9f2a92830f5c | /test/src/main.cpp | 19ee1c28a9e1d7530dea497c5eda3b982de5be6b | [] | no_license | akangakang/agv_car | d79179e46da8abee473553b797ef3e269612c208 | 5a7dea6bce8048b9170deb5f89ff927daf38fe64 | refs/heads/main | 2023-04-02T01:30:12.727930 | 2021-04-09T09:32:01 | 2021-04-09T09:32:01 | 343,269,733 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 491 | cpp | main.cpp |
#include "ros/ros.h"
#include "geometry_msgs/Twist.h"
int main(int argc, char **argv) {
ros::init(argc, argv, "test");
ros::NodeHandle n;
ros::Rate loop_rate(10);
ros::Publisher velPub = n.advertise<geometry_msgs::Twist>("/cmd_vel", 100);
geometry_msgs::Twist msg;
for (int i = 0; i < 100; i++)... |
b0a5d8603a8f16385a0308dfe200c167c76b73ca | 4ee9c2957d06e8071f60a8aa7aebbe6779971f3a | /archive/vn.sgit_4.1/vnsgittd/vnsgittd/vnsgittd.h | 9e1e78ced253d0aa3006db9c5b253081845ef3e2 | [
"MIT"
] | permissive | guoxiaoyong/vnpy | 67d4881263c8bbac2b3d4e6ee3a40b0479163d12 | 207fca465ab5a9e840cd9389f853f1307737cb25 | refs/heads/master | 2021-07-07T09:39:30.315235 | 2017-09-30T14:16:12 | 2017-09-30T14:25:17 | 105,372,911 | 0 | 0 | null | 2017-09-30T13:48:42 | 2017-09-30T13:48:42 | null | UTF-8 | C++ | false | false | 11,990 | h | vnsgittd.h | //说明部分
//系统
#include "stdafx.h"
#include <queue>
#include <string>
// Boost
#define BOOST_PYTHON_STATIC_LIB
#include <boost/any.hpp> //任务队列的任务实现
#include <boost/bind.hpp> //任务队列的线程功能
#include <boost/python.hpp> //python封装
#include <boost/python/def.hpp> //python封装
#include <boost/python/d... |
d7c133842173f0e1c32c368931a8581ea0ae75d1 | 74992eecdeb51493e65c12d36e906c619b0c62dd | /easy_avr.h | 340ea314883e57f79db3f45449c1e7626b4ddca6 | [
"MIT"
] | permissive | ejensen141/easy_avr | f37d5efc07aa02f4c949ccda52f183ad56c0c075 | 166a5f7ec3232a13ff5552d72438b3f20857fd83 | refs/heads/master | 2016-08-11T08:30:39.810574 | 2015-05-27T04:59:08 | 2015-05-27T04:59:08 | 36,343,707 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,986 | h | easy_avr.h | //##############Easy_Avr Library C++###################
/*
Copyright (c) 2015 Elijah Jensen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software/hardware and associated documentation files
(the "Software" or "Hardware" design plans), to deal in the Software/Hardware
without res... |
5ab2dbc43f6790987ed075044015cbdedab00f2c | 86bd5562f967e9b8316e2f730bdad6a1cc29a7a1 | /counting-bits/counting-bits.cpp | 3d33aebdd9d4e66b68be443a3fec87840f98a18e | [] | no_license | Aman0002/Leetcode | 225c0100c7d7f3c6cca2999f3d2a1acc83698fda | 6dbdbb984df97619397103a8b8d396ecc4e050c0 | refs/heads/main | 2023-07-15T09:50:08.250773 | 2021-09-01T10:43:49 | 2021-09-01T10:43:49 | 362,705,508 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 366 | cpp | counting-bits.cpp | class Solution {
public:
vector<int> countBits(int A) {
int cnt = 0 ;
vector<int> help(A + 1, 0);
//long long int ans = 0;
for (int i=1 ;i<=A ;i++)
{
if (i%2!=0)
{
help[i] = 1 + help[i-1];
}else
{
help[i] = help[i/2];
... |
d9a4e227d22e6c26f43179bd8cbd05a04945a81f | 9bdd6516a5bea3dd3bd9f3229f777d6ddbd1a84f | /ABC/173d.cpp | ae2bc62978b39acf4feb4e36f6c065d54e183ef2 | [] | no_license | t0m0ya1997/atcoder | 968b990440b3d3ebc60b4b92ded0df32c44e51d6 | cf228d442aa51ddc59204779146229ce966768e7 | refs/heads/main | 2023-07-30T16:39:58.989703 | 2021-09-19T03:08:25 | 2021-09-19T03:08:25 | 408,014,778 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 364 | cpp | 173d.cpp | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<n;++i)
#define rep1(i, n) for(int i=1;i<=n;++i)
#define ll long long
int main(){
int N;cin>>N;
vector<int>A(N);
rep(i,N)cin>>A[i];
sort(A.begin(), A.end(), greater<int>());
ll ans = A[0];
rep(i,N-2){
ans += 1LL ... |
afb9803a589512e9afde28a067e55f3fd7115630 | ff7358ae758448646ee56ea66ecbf72c215b4fa3 | /GameLib/GameException.cpp | 574c295a98438ed3f4cdb6665ec119332691a7a7 | [] | no_license | wahez/Ship-Sandbox | 557a743a54f4c0e1a82618d5ef7e9a8c261547ad | 03e406f224f32b7451939d2586ffc888f4330cb2 | refs/heads/master | 2021-05-04T01:46:43.896040 | 2018-02-04T19:32:53 | 2018-02-04T19:32:53 | 120,362,079 | 0 | 0 | null | 2018-02-05T21:08:03 | 2018-02-05T21:08:03 | null | UTF-8 | C++ | false | false | 492 | cpp | GameException.cpp | /***************************************************************************************
* Original Author: Gabriele Giuseppini
* Created: 2018-01-19
* Copyright: Gabriele Giuseppini (https://github.com/GabrieleGiuseppini)
***************************************************************************************/
#... |
f630571453b29fdbed6d5c639afcf799ceab8494 | ca219a987223655e624baf869585582c134b4403 | /Wide/Semantic/Functions/DefaultedAssignmentOperator.h | e8a3c9efe11ab250c8990bfb8b3d79c0c565a0fc | [] | no_license | DeadMG/Wide | 190d41f349b1a23ba654e3e5e8ec9648b34fa7a0 | 5eb29f0ed0e6aec4bde396fb1494ce170c388112 | refs/heads/master | 2020-12-14T13:05:30.277622 | 2017-07-10T17:59:00 | 2017-07-10T17:59:14 | 22,044,120 | 6 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 693 | h | DefaultedAssignmentOperator.h | #pragma once
#include <Wide/Semantic/Functions/FunctionSkeleton.h>
namespace Wide {
namespace Semantic {
namespace Functions {
class DefaultedAssignmentOperator : public FunctionSkeleton {
std::vector<ConstructorContext::member> members;
const Parse::Function* f... |
3e7ac27ee2c520033c807c9262a369014cf18d0e | 913020f890fbd2449b46c5af97da81b12b59299a | /cellule.cpp | 99bba919af42165d4a7311e080cffa88ea761b27 | [] | no_license | MAHY-MAHY/Int_18_04 | 7cdd14d3b8b01b9d8ea6b2021637f8e98a70b429 | fd4946932e1b1ee9c8d3365d2923efb686291613 | refs/heads/master | 2020-05-15T05:41:18.826122 | 2019-04-18T15:08:02 | 2019-04-18T15:08:02 | 182,108,628 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,578 | cpp | cellule.cpp | #include "cellule.h"
//Constructeurs de cellule
Cellule::Cellule():a_x(-1.),b_x(1.),a_y(-1),b_y(1), uin(0.){
}
Cellule:: Cellule(double inf_x, double sup_x,double inf_y,double sup_y ,double valeur){
a_x=inf_x;
b_x=sup_x;
a_y=inf_y;
b_y=sup_y;
uin = valeur;
}
Cellule::Cellule(const Cellule &c){
... |
6a0c2552f94bd4ed021a18805658d088750a48ad | 465afd89a124abd377497fa505ede83f703db229 | /dataindegree.ino | 4b5fe816fc1c826bd8d8fc3458622aa9e48629d7 | [] | no_license | RKartodijoyo/arduinobalance | 43535260af5af7594419e13da210c89d2e392b0f | 0a2112d8bafdfc4ad2730f194db207659313afd0 | refs/heads/master | 2020-11-25T00:47:35.675239 | 2019-12-23T09:35:09 | 2019-12-23T09:35:09 | 228,415,515 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,991 | ino | dataindegree.ino | #include <SPI.h>
#include <Wire.h>
#include <Servo.h>
const int MPU_addr=0x68;
using namespace std;
Servo ServoX, ServoY, ServoZ;
double AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
double aX,DaX,aY,DaY,aZ,DaZ,RealDX,RealDY,RealDZ;
short LS11 = 0;
short LS15 = 0;
short LS21 = 0;
short LS25 = 0;
short LS31 = 0;
short LS35 = 0;
short L... |
c4ea5a6146f257a2434bb71d3076eb53c59b62ef | 21b027f9512706a5cf3be3413aa83f4b11d28fde | /submodules/bm/modules/bm_sim/src/switch.cpp | 76cf791a4eaeb4fdd4859762f1ce6d77361d716a | [
"Apache-2.0"
] | permissive | evelinad/ops-p4dp-1 | ca7834f82f207c57f51a28b9481184c35e0ea304 | 3a8192c61d91eab0861dc7a1e051489ba6752e71 | refs/heads/master | 2020-06-12T16:07:44.346312 | 2015-12-17T18:01:58 | 2015-12-17T18:01:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,555 | cpp | switch.cpp | /* Copyright 2013-present Barefoot Networks, Inc.
*
* 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 la... |
c13ba1faa9697fb9ecffe6706301087504f042a2 | 8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a | /tests/Containers/EnumerateTest.cpp | 9203dd7d52e8ee75af7ab2cdac88797943538970 | [
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"BSL-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode... | permissive | arangodb/arangodb | 0980625e76c56a2449d90dcb8d8f2c485e28a83b | 43c40535cee37fc7349a21793dc33b1833735af5 | refs/heads/devel | 2023-08-31T09:34:47.451950 | 2023-08-31T07:25:02 | 2023-08-31T07:25:02 | 2,649,214 | 13,385 | 982 | Apache-2.0 | 2023-09-14T17:02:16 | 2011-10-26T06:42:00 | C++ | UTF-8 | C++ | false | false | 3,236 | cpp | EnumerateTest.cpp | ////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
7c23f4bceefca98413c04c550e69e9dfd5f51b9a | da94b9bd63a9eb355e41385521c7ba43b3c43cf9 | /src/Mesh/CElements.cpp | 65acf230b8a29d7be692979681d76017dc7ce1dc | [] | no_license | zhanggjun/coolfluid3 | 9630cc4c4e6176d818ad20c9835ba053ce7c7175 | 04a180e1f8fdc20018dd297c00a273462e686d03 | refs/heads/master | 2023-03-26T02:54:11.595910 | 2011-08-09T07:52:37 | 2011-08-09T07:52:37 | 526,964,683 | 1 | 0 | null | 2022-08-20T15:25:58 | 2022-08-20T15:25:57 | null | UTF-8 | C++ | false | false | 4,064 | cpp | CElements.cpp | // Copyright (C) 2010 von Karman Institute for Fluid Dynamics, Belgium
//
// This software is distributed under the terms of the
// GNU Lesser General Public License version 3 (LGPLv3).
// See doc/lgpl.txt and doc/gpl.txt for the license text.
#include <set>
#include "Common/Log.hpp"
#include "Common/CLink.hpp"
#incl... |
dc70ea20fe4e5456ef561eaa2b3d9abb276b2203 | 503892d2a258fd34eedc353f5a1bbde2b63c2967 | /emitter.cpp | cf83273daf14c3f2caac02200e7d63429f54d7ba | [] | no_license | antonstakhouski/fire-simulation | 9d2d99d555418e74967250e05a6f1a6487121a19 | 8b51654063605ef5319d7ded039292aa9500491e | refs/heads/master | 2020-12-27T05:38:36.873305 | 2020-05-01T15:14:31 | 2020-05-01T15:14:31 | 237,782,636 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,733 | cpp | emitter.cpp | /*******************************************************************
** This code is part of Breakout.
**
** Breakout is free software: you can redistribute it and/or modify
** it under the terms of the CC BY 4.0 license as published by
** Creative Commons, either version 4 of the License, or (at your
** option) any la... |
f2f67668079bf3f60eaaa2889ab8ce2e824c92fe | 022318f4accd2bfcbb2d1be48df5160235932891 | /FoundationEx/MemDebug.h | 2ecf07cbfc8a226695c491dbf654b91128dea930 | [] | no_license | The-E/Starshatter-Experimental | 9bb119708a5c51c235b2c81bff748a5429b6fcbd | 8cdf60be808a69390b84a8788cbe3c1e8d36158a | refs/heads/master | 2016-09-06T11:03:47.002419 | 2012-05-30T12:29:22 | 2012-05-30T12:29:22 | 4,463,716 | 2 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 2,092 | h | MemDebug.h | /* Project FoundationEx
Destroyer Studios LLC
Copyright © 1997-2004. All Rights Reserved.
SUBSYSTEM: FoundationEx
FILE: MemDebug.h
AUTHOR: John DiCamillo
OVERVIEW
========
Memory Debugging class
*/
#ifndef MemDebug_h
#define MemDebug_h
// +------------------------... |
86a4e260a1ab62828e8721426e3a45fd7ad41edb | c4e1b2fad57e164b1ec250d7ef58ca6b325be916 | /CSES/apartments/apartments.cpp | 601ff6f525f95044b56d4c3421ddbb35c6698d4a | [] | no_license | xSeanliux/CompetitiveProgramming | ab8030fdb0dc9c4e29e4cc8c52e020e6eb564372 | 011c7ad152d7090fa3e9143a27119a2192d68144 | refs/heads/master | 2023-06-08T11:00:48.826892 | 2023-05-25T22:58:43 | 2023-05-25T22:58:43 | 158,057,461 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 674 | cpp | apartments.cpp | #include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <deque>
#define pii pair<int,int>
#define F first
#define S second
using namespace std;
int N, M, K, ans, x;
vector<pii> points;
deque<int> dq;
int main(){
cin >> N >> M >> K;
for(int i = 0; i < N; i++){
cin >> x;
points.emp... |
bfcb79beaf46d64c27271ddb9bd357fbe32956e1 | f0c67159d0345306b8445db534bf9640d56acfc7 | /3-Greedy Method/OptimalMergePattern.cpp | c4d5da39d4b6ba198097143dc700698be632cef6 | [] | no_license | fahdarhalai/Algorithms | e65207e48ce465043658cd77151e0abb220df5d5 | 0ee60e5d72875494e0475cf3a972bce86b85dedc | refs/heads/master | 2022-10-13T07:33:23.282942 | 2020-06-09T13:11:09 | 2020-06-09T13:11:09 | 255,584,560 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,144 | cpp | OptimalMergePattern.cpp | #include <stdio.h>
#include <stdlib.h>
// Merging two arrays
int* Merge(int A[], int B[]){
int a = A[0]; // The size of array A is stored in A[0]
int b = B[0]; // The size of array B is stored in B[0]
int *C = (int*)malloc(sizeof(int)*(a+b+1)); // Actual size = Effective size(a+b) + one for storing the Effective si... |
7be60bc65fcae9f39e94905421d9ccf85f6992d3 | e2a4c792d294c5f0b2ad7f192d17375d2f952f37 | /thereminimum.cpp | bdc0e17ff92103eab4b9edf1825b71df3e31734d | [] | no_license | btabram/HackCambridge2018 | 1d3b9f33530608d645d698fdd9da020742ecfd3b | 1c0ce2a2bc7cfb2ebea75c17f4a01495d3e34413 | refs/heads/master | 2021-05-10T21:28:10.501455 | 2018-01-21T14:42:03 | 2018-01-21T14:42:03 | 118,229,188 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,903 | cpp | thereminimum.cpp | #include <iostream>
#include <cstring>
#include "Leap.h"
using namespace Leap;
class SampleListener : public Listener {
public:
virtual void onInit(const Controller&);
virtual void onConnect(const Controller&);
virtual void onDisconnect(const Controller&);
virtual void onExit(const Controller&);
... |
fc68c8528d8ded8b1521f0e42d07e5ff262f7fa0 | 82815230eeaf24d53f38f2a3f144dd8e8d4bc6b5 | /Airfoil/wingMotion/wingMotion2D_pimpleFoam/0.14/polyMesh/points | 9bb776eb10da08e006a442f705b622516dbd53dc | [
"MIT"
] | permissive | ishantja/KUHPC | 6355c61bf348974a7b81b4c6bf8ce56ac49ce111 | 74967d1b7e6c84fdadffafd1f7333bf533e7f387 | refs/heads/main | 2023-01-21T21:57:02.402186 | 2020-11-19T13:10:42 | 2020-11-19T13:10:42 | 312,429,902 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 780,589 | points | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
... | |
9c718bf2917c0ceb708180a56c4ad29f0f5441c1 | b43c50bc5a138758ecf6c49ab2e6a4b79ff601bd | /1044_seminar6.cpp | d363e47ae13d63205897f607fef943f370719d5a | [] | no_license | zamfiroiu/Structuri2018 | c6504a7dbc50ed578e49baba617b2bb7a9d66445 | d57eda651a8ea65de50248393d01a7c91c376080 | refs/heads/master | 2021-04-03T07:57:20.353951 | 2019-05-22T04:55:35 | 2019-05-22T04:55:35 | 124,534,172 | 9 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 2,758 | cpp | 1044_seminar6.cpp | #include<iostream>
struct Curs {
int id;
char* denumire;
int prezenti;
};
struct nod {
Curs info;
nod* next;
};
struct HashTable {
nod** vector;
int dim;
};
Curs creareCurs(char* denumire, int prezenti, int id) {
Curs c;
c.denumire = (char*)malloc(sizeof(char)*(strlen(denumire) + 1));
... |
0481395d3f193a13eda9bbdd22db460dc803090e | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/CMake/CMake-gumtree/Kitware_CMake_repos_log_2488.cpp | 5ab2299593a4f870b3bff25b78dc76a9209ef8e2 | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 27 | cpp | Kitware_CMake_repos_log_2488.cpp | fprintf(file, "EXPORTS \n") |
7a34508e26d08d6817b33ef35f11be495ff46031 | dab91895dd35cabec33e0711c3876e712546a5cf | /other/force_cast.cpp | de3bb6b43b0494a645fd7fadc18ebf65d3931dab | [] | no_license | mmix574/CSE123SWP | 7137091df80a18c0ce96d97d6456c6a9e3fdad09 | b0014acfca8d4dbc528f8cab584cc5766ebb6863 | refs/heads/master | 2021-08-31T06:35:23.481123 | 2017-12-20T15:23:57 | 2017-12-20T15:23:57 | 114,137,053 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 247 | cpp | force_cast.cpp | #include <stdio.h>
#include <stdint.h>
void test1(){
int a = 0;
uint16_t b = a;
printf("%u\n", b);
int c = (int)b;
printf("%d\n", c);
}
void test2(){
char a = 12;
char b = a%10;
printf("%d\n", b);
}
int main(void){
test2();
return 0;
} |
c14c31b9b2e8bbb3093a2309c01813ca2c4e6749 | 2b090d51eb8b0603a02a82f03c7f8bd1a3b90893 | /CCC/ccc14j1.cpp | 9e37fad58384f0ebfe0d8b06d1acd79212c3ffe6 | [] | no_license | AnishMahto/Competitive-Programming-Code-and-Solutions | eecffc3a2c72cf557c48a25fa133a3a2b645cd69 | 20a7bed2cdda0efdb48b915fc4a68d6edc446f69 | refs/heads/master | 2020-04-28T14:13:25.614349 | 2019-03-13T03:07:50 | 2019-03-13T03:07:50 | 175,331,066 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 514 | cpp | ccc14j1.cpp | #include <iostream>
using namespace std;
int main() {
// your code goes here
int angle1;
int angle2;
int angle3;
cin >> angle1;
cin >> angle2;
cin >> angle3;
if (angle1 + angle2 + angle3 == 180) {
if (angle1 == angle2 && angle2 == angle3 && angle3 == angle1) {
cout << "Equilateral" << endl;
} else ... |
bb5c4e29af9ad9f99f7f6b440d4792e826d8869b | 6ef43bccb883da1f650934473be4b9a375542f5e | /sort.cpp | 9bb57f2ba1d520acc66ce931d06fa81a9f5eeafd | [] | no_license | GeertBosch/snippets | 5f633c9a889cd4cb208cc1815f61f73d87c6251e | d2cea82ed831b86504438a53435d99f25a58eb72 | refs/heads/master | 2023-05-25T10:12:03.306200 | 2023-05-03T01:31:28 | 2023-05-03T01:31:28 | 114,699,237 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 908 | cpp | sort.cpp | #include <algorithm>
#include <cstdint>
#include <iostream>
#include <string>
#include <random>
using vec = std::vector<int64_t>;
std::mt19937_64 gen64;
vec makeVec(int64_t size) {
vec result(size);
for (auto& elem : result)
elem = gen64();
return result;
}
std::string showVec(const vec& v) {
... |
b4fc1169fac24a1fa3a3dad2ce8600e67ef5ffbe | 722a65cee792297fabfea6edad74638224304b94 | /chapter5/mathTutor/mathTutor/main.cpp | 4a9f27fa0d88676275a1a81f301a3182c068582b | [] | no_license | brianlobo/MDC_C_PlusPlus | 47f4cc839c4ad8b487a1f2a20c6627c7b5f20fbc | 5f4de284bfcac8e8ddd5ea000aa66a51da911ae9 | refs/heads/master | 2020-04-24T17:28:50.479703 | 2019-04-18T13:10:52 | 2019-04-18T13:10:52 | 172,148,801 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,988 | cpp | main.cpp | // 8.
// Math Tutor
//
// This program started in Programming Challenge 15 of Chapter 3 , and was modified
// in Programming Challenge 9 of Chapter 4 . Modify the program again so it displays a
// menu allowing the user to select an addition, subtraction, multiplication, or division
// pro... |
0b4bddff4322675031332b9185aec389b0c41063 | b4d9276f4c26ed555a509a090b8b0441554cef70 | /Linear.cc | 87fd51b64de8b6e602c51ebafda116af79581bdf | [] | no_license | Vicara12/neural_network | eacac4f14c6050a6df4a4db2d99ed8e93b6b38c9 | 1dcf0450a18e787b23cd2a0077d2c4b132b869bb | refs/heads/master | 2022-11-16T11:52:49.094631 | 2020-07-14T14:33:23 | 2020-07-14T14:33:23 | 278,443,664 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 333 | cc | Linear.cc | #include "Linear.hh"
ActivationFunction* Linear::instance = new Linear();
Linear::Linear () {}
ActivationFunction* Linear::getInstance ()
{
return instance;
}
std::string Linear::getName () const
{
return "linear";
}
double Linear::f (double x) const
{
return x;
}
double Linear::df (double x) const
{
... |
1aa0b0f9598227f37b20a882f344b7e2617c7ec7 | 9cedbc129ee0ab564f244b8d83f2d9bb124f8cd6 | /artist.cpp | 78f54d65973572af53d9d5b87bc01159b0902008 | [] | no_license | ggg33372/contest | 3a84a31e29176768abf006640c9963abaec47ab6 | fdb1ae93e98f9d64c247f97699116eabcbd89724 | refs/heads/master | 2021-01-19T16:45:47.061276 | 2017-04-20T14:11:27 | 2017-04-20T14:11:27 | 88,283,779 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,331 | cpp | artist.cpp | //#include <math.h>
//#include <stdlib.h>
#include "artist.h"
#include "corruptedspectator.h"
double Artist::S = 0;
int Artist::winner = -1;
QList<Artist*> Artist::artists;
Artist::Artist(const QString &name, double earnings):
name_(name), toTribe(0)
{
setEarnings(earnings);
artists.appe... |
79fd27fe02e0de40e9ed8aa4dd4696d400e18b54 | 4f30a549f4f2463a69b66c3f8dec7ac74eb111e1 | /model.cpp | 4133dc6a63aff78de42ca3c90a2cda941988103b | [] | no_license | SeriyyKust/MyVim | b975bb92fc5011cc031e59eb392054f260e7a7b7 | 105cc92b08101484967094dd302e96544e88830f | refs/heads/master | 2023-09-05T11:00:52.545885 | 2021-11-20T10:30:07 | 2021-11-20T10:30:07 | 430,072,016 | 0 | 0 | null | null | null | null | MacCentralEurope | C++ | false | false | 43,749 | cpp | model.cpp | #include "model.h"
int amount_line_check(BasicString * string, int width, bool type)
{
int index = 0;
int amount_symbol = 0;
int amount_line = 0;
while (index < string->Size())
{
if (string->At(index) == '\n')
{
if (type)
{
amount_line++;
amount_symbol = 0;
}
else
{
amount_symbol++;... |
0db586bb47753e198f656e64ddd03a2c1aca3323 | ea8ba7cfc4f4773ed516e094ded4bc36502f93b5 | /branch/old_angsys/angsys_beta2/source/angsys/angsys.shared/source/streams/binary_buffer_output_stream.cpp | c2c853efda0993c0f08e39cf3b6c738cc39def7e | [
"Apache-2.0"
] | permissive | ChuyX3/angsys | 15f896f0b4823b63a14aff8e35a30f344f2c30e8 | 89b2eaee866bcfd11e66efda49b38acc7468c780 | refs/heads/master | 2021-07-07T18:58:39.437477 | 2020-06-29T05:33:08 | 2020-06-29T05:33:08 | 92,321,439 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,474 | cpp | binary_buffer_output_stream.cpp | /*********************************************************************************************************************/
/* File Name: binary_buffer_output_stream.cpp */
/* Author: Ing. Jesus Rocha <chuyangel.rm@gmail.com>, July 2016. ... |
a02f600a0088bdeb66e211e6aae37b49c940d8db | f7ecfb5cc4f7c4c1b0e6b9018dfec14e13b36b8a | /GraphDungeon/GraphDungeon/Hallway.cpp | c0b4aaf50eef106dbca80e5c44e60860390d5f24 | [] | no_license | Remcovdo/ALGA_Week_5-6 | f9dd46f2616c421a521f409237dabaa14531463a | 4a334c8cf486d1468991bc6d9a0db4a215356e6d | refs/heads/master | 2020-03-30T12:53:50.566308 | 2018-10-21T15:09:17 | 2018-10-21T15:09:17 | 151,246,751 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 647 | cpp | Hallway.cpp | #include "Hallway.h"
#include "Room.h"
#include <stdlib.h>
Hallway::Hallway(Room* firstRoom, Room* secondRoom) : enemy { rand() % 10 }, destroyed { false }, rooms{ firstRoom, secondRoom }
{
}
Hallway::~Hallway()
{
}
int Hallway::getEnemy() const
{
return this->enemy;
}
void Hallway::setEnemy(int enemy)
{
this... |
86e320d806e8d5defe3d4e5a963db09dc1a1a01b | 37e4dc11ee6d580342ef845163fd8c360a318d6b | /曜日を出す00/main.cpp | fcadc48518ee681b9239093fac9ba0cdc2f2c28d | [] | no_license | confinature/C- | f658937b3312ff9a75ca2a4cac0a83fc3880f74b | f748c1b73b3c2c2b6fb15bce1ebfba0b87af841b | refs/heads/master | 2021-06-11T01:30:39.666211 | 2017-02-28T14:01:39 | 2017-02-28T14:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,111 | cpp | main.cpp | #include <stdio.h>
int main(void)
{
//変数の宣言
int num;
//入力部分
printf("2016年11月の日にちを入力せよ。 \n");
printf("日にち: ");
scanf("%d",&num);
//条件分岐
if (1 <= num && num <= 30){
if (num % 7 == 0){
printf("11月%d日は月曜日です。 \n",num);
}
else if (num % 7 == 1){
... |
881a62bcc23b12b1a713dfee57244a94b40ca885 | c1b0f08d25898c64f035b29318328f9364ad748b | /Source/Frameworks/Common/String.cpp | 22ac6ae94efbce1390bfa39300e85172025de029 | [] | no_license | ilijabc/SpriteWars3D | a508207b50748a1c54d69aea13923f2347e1fc65 | cb95e9a85e3e7977710377755bfdb4651b269aec | refs/heads/master | 2016-09-06T08:52:33.089135 | 2013-08-07T13:57:19 | 2013-08-07T13:57:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,888 | cpp | String.cpp | #include "String.h"
#include <stdarg.h>
#include <stdio.h>
String::String()
{
data = NULL;
length = 0;
allocate(255);
updateLength();
}
String::String(int size)
{
data = NULL;
length = 0;
allocate(size);
updateLength();
}
String::String(const char *ss)
{
data = NULL;
length = 0;
... |
ab80f362b551c7c823e35081b09382f687e86add | e1edd90c305915644b9b259a126c93a16806c13a | /src/Patterns/BufferPattern.h | de152922c3a6b6ad654324955f8b480aeb30333a | [] | no_license | srini2204/ofxProjectionMask | 9f0ba72efaf1c8d7f582c58f304eda6f4aed8be4 | d75db3fba403487c67e004c08263eaed41f071c4 | refs/heads/master | 2021-01-20T17:36:57.646178 | 2015-01-31T18:14:21 | 2015-01-31T18:15:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 289 | h | BufferPattern.h | #pragma once
#include "ofMain.h"
#include "Canvas.h"
#include "MaskFrame.h"
class BufferPattern{
public:
void setup();
void update();
void draw();
vector<ofFbo> *getBuffers();
int test();
protected:
vector<ofFbo> buffers;
int width, height, numBuffers;
}; |
1bff36c38abfd443b744657ea59a3b3d4094f519 | 93bf86941368c1ddbd16fc4d6a778460f49b210a | /fordulo.cpp | dae181a75ebf1add66f8969a19b2c4e3615c4194 | [
"MIT"
] | permissive | matmedev/LedCube | bd4117b9b7813236c474b90634814a34188ecafa | 066a49a558f16f84ce790e341710b85eb69d4cb9 | refs/heads/master | 2020-03-30T19:47:51.499301 | 2018-10-04T11:10:27 | 2018-10-04T11:10:27 | 151,558,817 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,873 | cpp | fordulo.cpp | #include "fordulo.h"
#include "cube.h"
void fordulo(int sebesseg) {
setSideSi(4,true);
for(int i=0; i<sebesseg/2; i++) {
showNextLevel();
delay(2);
}
setRowFront(4,3,true);
setRowFront(4,4,false);
for(int i=0; i<sebesseg/2; i++) {
showNextLevel();
delay(2);
}
setRowFront(4,2,true);
... |
b6441eaa1165d43ed510e3bad0cc18398d466721 | 980d1a5328066efac35639b8bcd4e5da71a955a3 | /src/fibonacci.cc | b6c87fc413c88155f872caa92e8cd959e2391c3f | [
"MIT"
] | permissive | alibaba-archive/nan-example | 04b8412a7ea7323f28d410f0fa7831be86d7e38c | 9aee1923b2f6706302dda9917818c26eafb2b9b3 | refs/heads/master | 2023-02-04T16:31:27.328733 | 2014-05-05T08:03:15 | 2014-05-05T08:03:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 609 | cc | fibonacci.cc | /**!
* nan-example - src/fibonacci.cc
*
* Copyright(c) 2014 fengmk2 and other contributors.
* MIT Licensed
*
* Authors:
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
*/
#include <nan.h>
#include "./fibonacci.h"
int _fibonacci(int n) {
if (n == 0 || n == 1) {
return n;
}
return _fibonac... |
4b3a44d15179f6614bbecb7bfa4417a88b6e06ca | 50dd200b61f409da284660cfd6e1e05362f4d54d | /src/jimi/internal/NonAssignable.h | 446ba8382004fd7a2698c956c3713615679ac7cb | [
"MIT"
] | permissive | shines77/jimi | f16db3fab4e538bc57fc0d270b8445545706e4e6 | 7c4cbd433d821ad7f5cb2b18b738223434a63edb | refs/heads/master | 2021-01-13T02:19:48.220847 | 2020-09-27T14:17:48 | 2020-09-27T14:17:48 | 20,263,126 | 11 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 882 | h | NonAssignable.h |
#ifndef _JIMI_INTERNAL_NONASSIGNABLE_H_
#define _JIMI_INTERNAL_NONASSIGNABLE_H_
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#include "jimi/basic/stddef.h"
namespace jimi {
namespace internal { // protection from unintended ADL
class NonAssignable
{
public:
#ifdef __GNUC__
//! Explicitly... |
bc5f379a7a4e3855a848b51c1077ef62aeea9854 | d0dcd8492a5afd746bad488ee90c2c282998728f | /src/Timing/timemaster_node.cpp | 470e14b347646dbee3201b34d76acee9469bd304 | [] | no_license | dgitz/icarus_rover_v2 | 4c99bcf31b83701cfb130348acb3113721aa4c9e | 1d25266f4bf9872bb5b98912d9c938e0d280756c | refs/heads/master | 2021-03-09T05:55:47.352511 | 2020-04-05T20:07:07 | 2020-04-05T20:07:07 | 47,700,940 | 1 | 0 | null | 2020-04-05T20:07:08 | 2015-12-09T15:44:10 | C++ | UTF-8 | C++ | false | false | 6,299 | cpp | timemaster_node.cpp | #include "timemaster_node.h"
bool kill_node = false;
bool TimeMasterNode::start(int argc,char **argv)
{
bool status = false;
process = new TimeMasterNodeProcess();
set_basenodename(BASE_NODE_NAME);
initialize_firmware(MAJOR_RELEASE_VERSION,MINOR_RELEASE_VERSION,BUILD_NUMBER,FIRMWARE_DESCRIPTION);
diagnostic = prei... |
c3a1077b94e3c7163c3e77ae9521c126d31362a2 | d0889089b86bc407b154879cb294e703f9303989 | /Lumos/External/imgui/Plugins/ImGuiAl/fonts/MaterialDesign.inl | 752b24522e81eff8750e429459c38d887ac12be2 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | jmorton06/Lumos | 9ab96420c619d9baac07e4561d0a7e83645d54c8 | e5f0ebfa9049d3515caaad056fda082a1e9d74ae | refs/heads/main | 2023-09-01T02:48:00.496623 | 2023-07-06T07:31:44 | 2023-07-06T07:31:44 | 164,933,352 | 1,052 | 126 | MIT | 2023-09-06T08:08:18 | 2019-01-09T20:32:10 | C++ | UTF-8 | C++ | false | false | 1,122,614 | inl | MaterialDesign.inl | // File: 'materialdesignicons-webfont.ttf' (531476 bytes)
// Exported using binary_to_compressed_c.cpp
static const unsigned int MaterialDesign_compressed_size = 361566;
static const unsigned int MaterialDesign_compressed_data[361568/4] =
{
0x0000bc57, 0x00000000, 0x141c0800, 0x00000400, 0x00010037, 0x000a0000, 0x0... |
faac04d5f53c0ee5b3a9fbee272e51c123dcf0be | 9f520bcbde8a70e14d5870fd9a88c0989a8fcd61 | /pitzDaily/751/p | 3de579719bbe8424d0372dfd7ca0c54ee1d1897a | [] | no_license | asAmrita/adjoinShapOptimization | 6d47c89fb14d090941da706bd7c39004f515cfea | 079cbec87529be37f81cca3ea8b28c50b9ceb8c5 | refs/heads/master | 2020-08-06T21:32:45.429939 | 2019-10-06T09:58:20 | 2019-10-06T09:58:20 | 213,144,901 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 98,029 | p | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
... | |
78cb81d21dd6482167ef0009c00379b81ebb21a0 | 183d90d93c92c6e4a9b48177892fef344c366399 | /src/platform/menu.cc | 5071eb8d309d6b232ec0a5e82ca76f739710d4d2 | [
"MIT"
] | permissive | GerHobbelt/turbo | d484a5c627b803928690ac862b3d21aa7846f7e6 | b2e279b573bf6e4905f4cbadd9412fd9be003a55 | refs/heads/master | 2023-05-22T21:05:22.695285 | 2021-06-12T14:17:41 | 2021-06-12T14:17:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 196 | cc | menu.cc | #include <ScintillaHeaders.h>
using namespace Scintilla;
Menu::Menu() noexcept :
mid(0)
{
}
void Menu::CreatePopUp()
{
}
void Menu::Destroy()
{
}
void Menu::Show(Point pt, Window &w)
{
}
|
38360bcb33ca6c569380b00e58327bd445826984 | 13e3e9c7c9d88d9b06c388980b4dc1d74ee2cb11 | /Set.cpp | e0b87793c1bbac2ef9abd736907655f23a7a9875 | [] | no_license | umarfarooq360/Cache_Simulator | e27d7357cea78b69416f80405ddda79ab74e0083 | 289e65979137280397e5be80c941c1952e7667fa | refs/heads/master | 2021-01-23T06:54:47.534490 | 2015-02-25T06:36:55 | 2015-02-25T06:36:55 | 31,300,707 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 847 | cpp | Set.cpp | #include <vector>
#include "Set.h"
#include "Line.h"
/*
This class implemets a Set which a data structure inside
the cache to hold valid bit, tag, and data.
Author: Omar Farooq
Date: 11/26/14
*/
Set::Set(){
}
Set::Set(int setAssoc, int _blockSize)
:setSize(setAssoc), blockSize(_blockSize)
{
lines = std::vector<Li... |
2855a402c9f45d5139b9a9c31c2b8607b14ea6ca | 1bbfeca83bac53d22b1110ca7f6c9a28bc46c22e | /ru-olymp-train-winter-2009/Submits/0812xx/17_32_57_18_21bC_8913.cpp | d6001842e1424aa0c0e648897f8b2cb38008a0d5 | [] | no_license | stden/olymp | a633c1dfb1dd8d184a123d6da89f46163d5fad93 | d85a4bb0b88797ec878b64db86ad8ec8854a63cd | refs/heads/master | 2016-09-06T06:30:56.466755 | 2013-07-13T08:48:16 | 2013-07-13T08:48:16 | 5,158,472 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,097 | cpp | 17_32_57_18_21bC_8913.cpp | #include <iostream>
#include <string>
#include <cstring>
#include <cmath>
using namespace std;
const string month[12] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
const int days[2][12] =
{
{31,28,31,30,31,30,31,31,30,31,30,31},
{31,29,31,30,31,30,31,31,30,31,30,31}
};
... |
798ef5722e7de85f12951969c33643c4558164df | 61ba1d073fdbb34ad2ae4e9d0ae1b88083faeb02 | /Sem II/Programare Orienta pe Obiecte/Laboratoare/lab2/tempCodeRunnerFile.cpp | b0e2b3dca68f7f2ff572f42a52335368e8e6f3d8 | [] | no_license | CosminHorjea/fmi | d899b639a085203963413918d2c508307cb9ba60 | 6b4911cdec64929710d984223385c1e8e36d5c7c | refs/heads/master | 2023-07-09T01:04:24.418286 | 2023-06-22T21:50:00 | 2023-06-22T21:50:00 | 213,064,779 | 7 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 22 | cpp | tempCodeRunnerFile.cpp | 2);
// a.insert(2) |
b98ee76f5de024b6b9c30a24b5e0f360e8dc097e | a10519bf00eab305843980a8c6eecb958aed28d3 | /HyEngine/Source/Scene.cpp | 55d097ff8ad26886e05e36380ad4cea7ebe766ac | [] | no_license | oyusuk2002-debug/3D-STG | 697fc91796f16fb748fd50e63360a79cb59b1b8d | 21ad199ca2855847c131dda6d3ffb256103531fa | refs/heads/main | 2023-03-06T09:06:05.552911 | 2021-02-07T04:35:47 | 2021-02-07T04:35:47 | null | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 4,279 | cpp | Scene.cpp | #include "StandardEngineFramework.h"
#include "Scene.h"
#include "Renderer.h"
#include "GameObject.h"
using namespace HyEngine;
Scene::Scene()
{
}
Scene::~Scene()
{
for (auto& obj : m_opaqueObjects)
SAFE_DELETE(obj);
m_opaqueObjects.clear();
for (auto& obj : m_alphaObjects)
SAFE_DELETE(obj);
m_alphaObjects.c... |
857dcadddb0908c80af889d86c543780fd7fb083 | a715b800b1d230822e3a50ec02176626cbed7f67 | /cpp/Perfect Squares.cpp | 8e4590490482affcd6deb89bd36f7d6b2925f966 | [] | no_license | SubhradeepSS/LeetCode-Solutions | 10c85f63059ae20ff91cf6dbc8102a4edd79c487 | 965e6390a76cccf84738d21340f5c049adcc223a | refs/heads/master | 2023-05-06T13:07:10.207287 | 2021-06-01T14:18:46 | 2021-06-01T14:18:46 | 370,042,173 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 391 | cpp | Perfect Squares.cpp | class Solution {
public:
int numSquares(int n) {
int dp[n+1];
for(int i=0;i<=n;i++)
dp[i]=i;
for(int i=2;i<=n;i++){
for(int x=1;x*x<=i;x++)
{
int t=x*x;
if(t>i)
break;
dp[i]=min(d... |
2b7d8813154211f2b197e1e039f481f70df9e3db | f371f863708a8500b8c8555d0b2c79ffe6c82f1e | /testBeamSetup.h | 42cb76aee45f2a84a6e8f45f212ba6cb403d17f1 | [] | no_license | KeesLigtenberg/GridpixTrackFitter | 70a957c1a3e47f5522462eb52eeafa1843881358 | e2b30c30e6082d207af1b31014fed4741f0f6b18 | refs/heads/master | 2020-03-18T09:31:56.853803 | 2018-05-23T14:41:02 | 2018-05-23T14:41:02 | 134,568,303 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,229 | h | testBeamSetup.h | /*
* testBeamSetup.h
*
* Created on: Sep 28, 2017
* Author: cligtenb
*/
#ifndef TESTBEAMSETUP_H_
#define TESTBEAMSETUP_H_
struct TimePixDetectorConfiguration : DetectorConfiguration {
constexpr static double driftSpeed=0.079; //mm/ns
TimePixDetectorConfiguration() : DetectorConfiguration{
1, {0}, //np... |
b6a3c50399f3c294a4d9a15becfb091585afa744 | 4a9bb7aa067f40a9eb3d0fca533a7067dffed2ad | /src/mc/classic/worker.cc | 4018b01ef8edeae017f3163531bd1a929948f6fe | [
"BSD-2-Clause"
] | permissive | LucasAzais/pnmc | f9d69e3aef797dcf2c1970692790e429d158a0f8 | 77756c166c7adaf815e4507c3061ef5fd8eb1602 | refs/heads/master | 2020-12-31T06:08:38.391108 | 2014-05-15T09:03:00 | 2014-05-15T09:03:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,018 | cc | worker.cc | #include <cassert>
#include <chrono>
#include <iostream>
#include <set>
#include <thread>
#include <boost/dynamic_bitset.hpp>
#include <sdd/sdd.hh>
#include <sdd/tools/size.hh>
#include "mc/classic/bound_error.hh"
#include "mc/classic/bounded_post.hh"
#include "mc/classic/dead.hh"
#include "mc/classic/dump.hh"
#incl... |
d7868f31a9308dabc1b6360ea88ef2d89c7942e8 | 9c9008cd94de3d3a5aa554d8f907fa84f96affc1 | /source/cpp/0023/pe0023.cpp | d55e7fc5ca4425c5d89c75de6b7ca98066b3bc60 | [] | no_license | nathanrosspowell/euler | 9ba12f613242247fb68db25d9060b110153db345 | 26e4e3a5105e9dcf1a3c64f9d1798994898aac1b | refs/heads/master | 2021-01-10T18:29:46.481042 | 2014-09-05T18:00:22 | 2014-09-05T18:00:22 | 3,178,346 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,244 | cpp | pe0023.cpp | // A perfect numebr is a number for which the sum of it's proper devisors
// is exactly equal to the number.
// For example, the sum of the proper divisors of 28 would be
// 1 + 2 + 3 + 4 + 6 +14 = 28. which means 28 is a perfect number.
//
// A number N is called deficient if the sum of it's proper divisors is less
//... |
857dae4bc2d1cb59d2944f7003a8cc38d1f62552 | 1724dfd648ca02d58ec01c0314faa2832c5dbb6a | /Pixio/Windowing/OpenGL/OpenGLWindow.cpp | 1c0c1e20e5130072e301f501a748ef54f4ae974c | [] | no_license | Tiviv/BachelorsThesis | c81ac0df71d56aaef1e8c78beb3a9884aca64cb9 | 935c7b06db76b964e4bfd3cd5b2f6489e9e479a1 | refs/heads/master | 2021-07-11T12:46:18.098049 | 2021-02-17T21:04:28 | 2021-02-17T21:04:28 | 95,643,557 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,473 | cpp | OpenGLWindow.cpp | #include "Pixio/Windowing/OpenGL/OpenGLWindow.h"
#include <cstring>
#include <iostream>
#include <map>
#include <GL/freeglut.h>
using namespace std;
static map<int, OpenGLWindow*> windows;
bool OpenGLWindow::init = false;
void OpenGLWindow::render()
{
int i = glutGetWindow();
windows[i]->onRender();
}
void... |
0d56bd17f3fe3133bf4e75cecb38f7120d944537 | 0c55a96434e461eb1885da57e5bd9c9c866c2ec7 | /mock-fb-2.cpp | 35519b7e128b6210bb2d19b05acf701a7efb6ea5 | [] | no_license | rem4ik4ever/leet-code | 9bcd54fc28ff7ad2a6ec2c6a7740a098a644b32b | 72098755d3d9713414c99d44364c70088c7a728d | refs/heads/master | 2020-05-21T14:37:44.038861 | 2020-01-13T04:27:20 | 2020-01-13T04:27:20 | 186,085,161 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 792 | cpp | mock-fb-2.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
using namespace std;
// O(n)
class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
vector<int> res(nums.size(), 0);
int p = 1;
for (int i = 0; i < nums.size(); i++)
{
res[i] =... |
a6f8ccb822f109bcfe5cf6f29a840438e1322a1f | 03ba325820c997599beff5add437d35347a953aa | /source/utopian/core/renderer/jobs/DepthOfFieldJob.cpp | 4561d996fefc5b514a4f29b9925819824937dc98 | [
"MIT"
] | permissive | simplerr/UtopianEngine | cc13a43279bd49f55136120cf75c8c8d5fcff705 | b7c38df663a4b6b2fa1d7c9f1f83dfc661de1a9a | refs/heads/master | 2022-10-12T12:03:19.166812 | 2022-09-28T05:48:31 | 2022-09-28T05:48:31 | 77,483,702 | 64 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 9,036 | cpp | DepthOfFieldJob.cpp | #include "core/renderer/jobs/DepthOfFieldJob.h"
#include "core/renderer/CommonJobIncludes.h"
#include "vulkan/RenderTarget.h"
#include "vulkan/handles/Sampler.h"
#include "core/Log.h"
#include <vulkan/vulkan_core.h>
#include <thread>
namespace Utopian
{
DepthOfFieldJob::DepthOfFieldJob(Vk::Device* device, uint32_t ... |
2bf549d3d1a23a415f0fdce4273a393d56baf7a1 | d0889089b86bc407b154879cb294e703f9303989 | /Lumos/External/glm/test/core/core_func_swizzle.cpp | 9758533f9d7ce0021cb4041a899ec78e68df0932 | [
"MIT",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-happy-bunny"
] | permissive | jmorton06/Lumos | 9ab96420c619d9baac07e4561d0a7e83645d54c8 | e5f0ebfa9049d3515caaad056fda082a1e9d74ae | refs/heads/main | 2023-09-01T02:48:00.496623 | 2023-07-06T07:31:44 | 2023-07-06T07:31:44 | 164,933,352 | 1,052 | 126 | MIT | 2023-09-06T08:08:18 | 2019-01-09T20:32:10 | C++ | UTF-8 | C++ | false | false | 3,026 | cpp | core_func_swizzle.cpp | #define GLM_FORCE_SWIZZLE
#include <glm/ext/scalar_relational.hpp>
#include <glm/ext/vector_relational.hpp>
#include <glm/glm.hpp>
static int test_ivec2_swizzle()
{
int Error = 0;
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
{
glm::ivec2 A(1, 2);
glm::ivec2 B = A... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.