repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
QuaternionMark/COMP371-FinalProject | Src/Primitives/Axis.h | #ifndef AXIS_H_INCLUDED
#define AXIS_H_INCLUDED
#include "../Graphics/Shader.h"
class Mesh;
class Axis {
private:
const float vertices[12] = {
// Position. // Normal.
0.f, 0.f, 0.f, 0.f, 1.f, 0.f,
0.f, 0.f, -1.f, 0.f, 1.f, 0.f
};
Mesh* mesh;
Shader::Uniform* worldMat;
... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/Iex/IexNamespace.h | <gh_stars>1-10
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permit... |
QuaternionMark/COMP371-FinalProject | Src/Objects/Car.h | <gh_stars>1-10
#ifndef CAR_H_INCLUDED
#define CAR_H_INCLUDED
#include <vector>
#include <GL/glew.h>
#include "RectCollider.h"
#include "../Math/Vector.h"
#include "../Math/Matrix.h"
class Cube;
class Wheel;
class Shader;
class Texture;
class Smoke;
class Car {
public:
enum class WalkInput {
None = 0x0,
... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h | <reponame>QuaternionMark/COMP371-FinalProject<filename>Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights rese... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/LibTIFF4/tif_jpeg.c | /* $Id: tif_jpeg.c,v 1.11 2015/02/19 22:39:58 drolon Exp $ */
/*
* Copyright (c) 1994-1997 <NAME>ler
* Copyright (c) 1994-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* ... |
QuaternionMark/COMP371-FinalProject | Src/Primitives/Quad.h | #ifndef QUAD_H_INCLUDED
#define QUAD_H_INCLUDED
class Shader;
class Mesh;
class Quad {
private:
float quadVertices[16] = {
// positions // texture Coords
-1.0f, 1.0f, 0.0f, 1.0f,
-1.0f, -1.0f, 0.0f, 0.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, -1.0f, 1.0f, 0.0f,
};
... |
QuaternionMark/COMP371-FinalProject | Src/Utils/InputUtil.h | #ifndef INPUTUTIL_H_INCLUDED
#define INPUTUTIL_H_INCLUDED
struct GLFWwindow;
class InputUtil {
public:
static bool keyHit(GLFWwindow* window, int key, int& lastKeyState);
};
#endif // INPUTUTIL_H_INCLUDED
|
QuaternionMark/COMP371-FinalProject | Src/Primitives/Grid.h | <reponame>QuaternionMark/COMP371-FinalProject
#ifndef GRID_H_INCLUDED
#define GRID_H_INCLUDED
#include <vector>
#include "../Graphics/Shader.h"
class Mesh;
class Grid {
private:
const float vertices[32] = {
// Positions // Normals // UV Coords
-1.f, 0.f, -1.f, 0.f, 1.f, 0.f, 0.f, 0.f,
... |
QuaternionMark/COMP371-FinalProject | Src/Utils/Timing.h | <filename>Src/Utils/Timing.h
#ifndef TIMING_H_INCLUDED
#define TIMING_H_INCLUDED
#include <chrono>
class Timing {
private:
// The maximum amount of time the accumulator can store.
const double MAX_ACCUMULATED_SECONDS = 1.0;
double timeStep;
double accumulatedSeconds;
// Total time since the obje... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Examples/Generic/FIIO_Mem.h | /*--------------------------------------------------------------------------*\
|| fiio_mem.h by <NAME> <<EMAIL>> ||
|| ||
|| (v1.02) 4-28-2004 ||
|| FreeImageIO to ... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfArray.h | <filename>Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfArray.h
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binar... |
QuaternionMark/COMP371-FinalProject | Src/Graphics/Texture.h | #ifndef TEXTURE_H_INCLUDED
#define TEXTURE_H_INCLUDED
#include <GL/glew.h>
#include "../Utils/String.h"
class Shader;
class Texture {
private:
String filePath;
GLuint textureID;
public:
Texture(const String& path);
~Texture();
void activate(int index) const;
};
#endif // TEXTURE_H... |
QuaternionMark/COMP371-FinalProject | Src/Graphics/Mesh.h | #ifndef MESH_H_INCLUDED
#define MESH_H_INCLUDED
#include <GL/glew.h>
#include <vector>
class Shader;
class Mesh {
private:
GLuint vertexArrayObject = 0;
GLuint vertexBufferObject = 0;
GLuint primitiveBuffer = 0;
std::vector<float> vertexData;
std::vector<int> primData;
Shader* shade... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfMisc.h | ///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided th... |
QuaternionMark/COMP371-FinalProject | Src/Objects/RectCollider.h | <filename>Src/Objects/RectCollider.h
#ifndef RECTCOLLIDER_H_INCLUDED
#define RECTCOLLIDER_H_INCLUDED
#include "../Math/Vector.h"
#include "../Math/Matrix.h"
#include "../Math/Line.h"
#include "../Graphics/Shader.h"
class Mesh;
class RectCollider {
public:
enum class CollisionDir {
None = -1,
Top ... |
QuaternionMark/COMP371-FinalProject | Src/Math/Matrix.h | /**
Modified from https://github.com/juanjp600/pge.
Copyright (c) 2019 <NAME>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any pur... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfMultiView.h | ///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007, Weta Digital Ltd
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// * ... |
QuaternionMark/COMP371-FinalProject | Src/Graphics/Camera.h | <gh_stars>1-10
#ifndef CAMERA_H_INCLUDED
#define CAMERA_H_INCLUDED
#include "../Math/Matrix.h"
#include "Shader.h"
class Camera {
private:
float xAngle;
float yAngle;
// The range of the yAngle field before it is clamped.
float yAngleLimit;
float tilt;
float nearPlaneZ;
float farPlaneZ;
... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/LibOpenJPEG/opj_config.h | #ifndef OPJ_CONFIG_H
#define OPJ_CONFIG_H
#ifndef _MSC_VER
#define OPJ_HAVE_STDINT_H
#define OPJ_HAVE_INTTYPES_H
#endif
#endif /* OPJ_CONFIG_H */
|
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmThread/IlmThreadNamespace.h | ///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided th... |
QuaternionMark/COMP371-FinalProject | Src/Utils/String.h | #ifndef STRING_H_INCLUDED
#define STRING_H_INCLUDED
#include <vector>
#include <string>
class String {
public:
~String();
String();
String(const String& a);
String(const char* cstr);
String(const std::string& cppstr);
String(const String& a,const String& b);
String(char c);
String(int ... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/Imath/ImathBox.h | <filename>Libraries/FreeImage-3170/Source/OpenEXR/Imath/ImathBox.h
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004-2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and b... |
QuaternionMark/COMP371-FinalProject | Src/Primitives/Triangle.h | <reponame>QuaternionMark/COMP371-FinalProject
#ifndef TRIANGLE_H_INCLUDED
#define TRIANGLE_H_INCLUDED
#include <vector>
#include "../Graphics/Shader.h"
class Mesh;
class Triangle {
private:
const float vertices[9] = {
0.f, 0.5f, 0.f, // Top.
-0.5f, -0.5f, 0.f, // Left.
0.5f, -0.5f, 0.... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/LibOpenJPEG/opj_config_private.h | <reponame>QuaternionMark/COMP371-FinalProject
#ifndef OPJ_CONFIG_PRIVATE_H
#define OPJ_CONFIG_PRIVATE_H
#define OPJ_PACKAGE_VERSION "2.0.0"
/**
Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined
If your big endian system isn't being detected, add an OS specific check
*/
#if (defined(BYTE_ORDER)... |
QuaternionMark/COMP371-FinalProject | Src/Math/Vector.h | /**
Modified from https://github.com/juanjp600/pge.
Copyright (c) 2019 <NAME>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any pur... |
QuaternionMark/COMP371-FinalProject | Src/Math/MathUtil.h | #ifndef MATH_H_INCLUDED
#define MATH_H_INCLUDED
class MathUtil {
public:
constexpr static float MARGIN_ERROR = 0.001f;
constexpr static float PI = 3.1415926535897932f;
static float degToRad(float degrees);
static bool eqFloats(float p1, float p2);
// Clamps an integer between a min and max incl... |
QuaternionMark/COMP371-FinalProject | Src/Primitives/Wheel.h | #ifndef WHEEL_H_INCLUDED
#define WHEEL_H_INCLUDED
#include "../Graphics/Shader.h"
class Mesh;
class Wheel {
private:
Vector3f position;
Vector3f scale;
Vector3f rotation;
// Lateral rotation of wheels.
float tireRotation;
Mesh* mesh;
Matrix4x4f worldMatrix;
Shader::Uniform* worldMatr... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h | <filename>Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in so... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfFastHuf.h | ///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2009-2014 DreamWorks Animation LLC.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// me... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfDwaCompressor.h | <reponame>QuaternionMark/COMP371-FinalProject
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2009-2014 DreamWorks Animation LLC.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted pro... |
QuaternionMark/COMP371-FinalProject | Src/Graphics/Sprite.h | <gh_stars>1-10
#ifndef SPRITE_H_INCLUDED
#define SPRITE_H_INCLUDED
#include "Shader.h"
class Mesh;
class Sprite {
private:
Shader::Uniform* modelMatrixUniform;
Shader::Uniform* scaleUniform;
Shader::Uniform* rotationMatrixUniform;
Shader::Uniform* colorUniform;
Mesh* mesh;
Vector3f position... |
QuaternionMark/COMP371-FinalProject | Src/Primitives/Cube.h | #ifndef CUBE_H_INCLUDED
#define CUBE_H_INCLUDED
#include "../Graphics/Shader.h"
class Mesh;
class Cube {
private:
const float vertices[288] = {
// Positions // Normals // UV Coords
// back face
-0.5f, 0.0f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, // bottom-left
0... |
QuaternionMark/COMP371-FinalProject | Src/Graphics/Shader.h | <reponame>QuaternionMark/COMP371-FinalProject<gh_stars>1-10
#ifndef SHADER_H_INCLUDED
#define SHADER_H_INCLUDED
#include <GL/glew.h>
#include <vector>
#include "../Utils/String.h"
#include "../Math/Matrix.h"
class Shader {
public:
class Uniform {
public:
union Values {
Values();
... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmBaseConfig.h | <reponame>QuaternionMark/COMP371-FinalProject
/**
Define and set to 1 if the target system has POSIX thread support
and you want IlmBase to use it for multithreaded file I/O.
*/
#if defined(_MSC_VER) || defined(__MINGW32__)
#undef HAVE_PTHREAD
#else
#undef HAVE_PTHREAD
#endif
/**
Define and set to 1 if the ... |
QuaternionMark/COMP371-FinalProject | Src/Controllers/AI.h | #ifndef AI_H_INCLUDED
#define AI_H_INCLUDED
#include "../Objects/Car.h"
class Shader;
class AI {
private:
Car* car;
Car::WalkInput currTaskDirection;
int stepsUntilNewTask;
bool brainFreeze;
public:
AI(Shader* shd, Shader* colliderShd, Shader* spriteShd);
~AI();
void setCa... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/Imath/ImathRoots.h | <gh_stars>1-10
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are p... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/IlmImf/ImfForward.h |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// Portions (c) 2012 Weta Digital Ltd
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or with... |
QuaternionMark/COMP371-FinalProject | Src/Objects/Smoke.h | <reponame>QuaternionMark/COMP371-FinalProject
#ifndef SMOKE_H_INCLUDED
#define SMOKE_H_INCLUDED
#include "../Math/Vector.h"
class Shader;
class Sprite;
class Smoke {
private:
const float MIN_SCALE = 0.2f;
const float RANGE = 4.f - MIN_SCALE;
Sprite* sprite;
const float LIFESPAN = 1.f;
f... |
QuaternionMark/COMP371-FinalProject | Libraries/FreeImage-3170/Source/OpenEXR/Iex/IexForward.h | ///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided th... |
QuaternionMark/COMP371-FinalProject | Src/Controllers/Player.h | #ifndef PLAYER_H_INCLUDED
#define PLAYER_H_INCLUDED
#include "../Math/Vector.h"
class Camera;
class Car;
struct GLFWwindow;
class Shader;
class Player {
private:
Camera* camera;
Car* car;
bool cameraFollowingCar;
public:
Player(Shader* shd, Shader* colliderShd, Shader* spriteShd, int camWidth, int... |
DenisBabarykin/DynamicMatrixWorkExample | matrix.c | <reponame>DenisBabarykin/DynamicMatrixWorkExample
#define _CRT_NONSTDC_NO_DEPRECATE // Отключение сообщений об устаревших функциях, не входящих в стандарт
#define _CRT_SECURE_NO_WARNINGS // Отключение сообщений о небезопасных функциях
#define _CRT_SECURE_NO_DEPRECATE // Отключение сообщений об устаревших небезопасны... |
meesokim/z80asm | zmac.c | /* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... |
chris781245/ZYCycleView | ZYCycleCell.h | <reponame>chris781245/ZYCycleView
//
// ZYCycleCell.h
// Investank
//
// Created by 史泽东 on 2019/1/14.
// Copyright © 2019 史泽东. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZYCycleCell : UICollectionViewCell
@property (nonatomic, strong) NSURL *imageURL;
@end
NS_ASSUME_NON... |
chris781245/ZYCycleView | ZYCycleFlowLayout.h | //
// ZYCycleFlowLayout.h
// Investank
//
// Created by 史泽东 on 2019/1/14.
// Copyright © 2019 史泽东. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZYCycleFlowLayout : UICollectionViewFlowLayout
@end
NS_ASSUME_NONNULL_END
|
chris781245/ZYCycleView | ZYCycleView.h | <reponame>chris781245/ZYCycleView
//
// ZYCycleView.h
// Investank
//
// Created by 史泽东 on 2019/1/14.
// Copyright © 2019 史泽东. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZYCycleView : UIView
@property (nonatomic, strong) NSArray *imageURLs;
@end
NS_ASSUME_NONNULL_END
|
menshikh-iv/hw | intel-opt/3_vector/2.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#define N 100000
#define MAX_ITER 100
struct s_of_arrs{
double a[N];
double b[N];
};
struct el_of_arrs{
double a;
double b;
};
int main(){
srand(time(0));
struct el_of_arrs fst[N];
struct s_of_arrs snd;
double full_time_el_of_arrs = 0.;
double ... |
menshikh-iv/hw | intel-opt/123_int/2/2_1.c | <filename>intel-opt/123_int/2/2_1.c<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#define N 10000
extern float calculate(float *a, float *b);
int main()
{
float *a,*b,res;
int i;
a = (float*)malloc(N*sizeof(float));
b = (float*)malloc(N*sizeof(float));
for(i=0;i<N;i++)
{
a[i] = i;
... |
menshikh-iv/hw | intel-opt/5_openmp/8.c | <reponame>menshikh-iv/hw
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <time.h>
#define N 500000
#define MAX_ITER 100
/*
Элементы массива a инициализируются 0, массива b[0]...b[n-1] – случайными числами от 0 до n-1.
Распараллелить цикл for (i=0; i<n; i++) a[b[i]]++;
*/
int main() {
srand(0);
... |
menshikh-iv/hw | intel-opt/5_openmp/9.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <time.h>
#define N 1000000
#define MAX_ITER 50
/*
Распараллелить цикл вычисления суммы
for (i=0; i<n; i++) sum+=F(i);
*/
double func(double element){
return element * element * element - element * 0.15;
}
int main() {
srand(0);
double ... |
menshikh-iv/hw | intel-opt/3_vector/1.c | <filename>intel-opt/3_vector/1.c<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#define N 100000
#define MAX_ITER 100
int main(){
srand(time(0));
float a_fl[N], b_fl[N];
double a_dl[N], b_dl[N];
float full_time_fl = 0.;
float full_time_dl = 0.;
float result_1 = 0.;
double result_2 = 0... |
menshikh-iv/hw | intel-opt/123_int/1/1_2.c | <gh_stars>0
void unknown(int *a)
{
int x = 0;
x++;
} |
menshikh-iv/hw | intel-opt/5_openmp/7.c | <reponame>menshikh-iv/hw
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <time.h>
#define N 1000000
#define MAX_ITER 25
/*
Ускорить выполнение цикла for в программе, вычисляющей
покоординатную функцию от элементов массива a: a[i]=F(a[i]);
*/
float func(float element){
return element * element * e... |
menshikh-iv/hw | intel-opt/123_int/1/1_1.c | <reponame>menshikh-iv/hw
#include <stdio.h>
extern void unknown(int *a);
int main()
{
int a,b,c;
a=5;
c=a;
unknown(&a);
if(a==5)
printf("a==5\n");
b=a;
printf("%d %d %d\n",a,b,c);
return(1);
}
|
menshikh-iv/hw | intel-opt/4_parallel/5.c | <gh_stars>0
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/time.h>
#define M 300
#define N 400
#define K 200
#define MAX_ITER 5
/*
Написать программу по перемножению матриц. Запустить программу с автоматическим распараллеливанием и без него, оценить разницу
*/
int main(){
srand(0);
... |
menshikh-iv/hw | intel-opt/4_parallel/6.c | #include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/time.h>
#define N 500000
#define MAX_ITER 20
/*
Написать программу, определяющую количество всех простых числе в диапазоне от 0 до N
Запустить программу с автоматическим распараллеливанием и без него, оценить разницу и объяснить результат
*/
ma... |
menshikh-iv/hw | intel-opt/123_int/2/2_2.c | #include <stdio.h>
#define N 10000
extern float calc(float a, float b);
float calculate(float * restrict a, float * restrict b)
{
int i;
float res;
for(i=0;i<N;i++)
{
res = calc(a[i],b[i]);
}
return res;
}
|
hareat/trials | c/bypass_fflush.c | <filename>c/bypass_fflush.c<gh_stars>0
// bypass_fflush.c Are file buffers flushed in case of forgotten fclose,
// a terminating signal or an exit call?
// Answer: no in case of an abnormal program end by a terminating signal
// or an _exit call.
// yes in case of a norm... |
hareat/trials | c/forkExecChild.c | // forkExecChild.c sleeps for a while to show the use of fork+exec*
// to start several child programs.
//
// build: cc forkExecChild.c -o forkExecChild
// use: ./forkExecChild
// ./forkExecChild 3
/////////////////////////////////////////////////////////////////////
#include <stdio.h> // prin... |
hareat/trials | c/fork.c | <filename>c/fork.c
// fork.c shows the use of fork to create several child processes.
//
// build: cc fork.c -o fork
// use: ./fork 5
// ./fork 100000
// meanwhile try ps u to show the current processes
/////////////////////////////////////////////////////////////////////
#include <errno.h>
#include <s... |
hareat/trials | c/shm_posix.c | // shm_posix.c shows the use of POSIX shared memory.
// In POSIX a pathname relative to /dev/shm is the shared information
// all processes or binaries need. The necessary size is often calculated.
// Uses fork() to create multiple processes - see fork.c.
// In the trial do not care about closing ressources in the case... |
hareat/trials | c/shm_sysv.c | <gh_stars>0
// shm_sysv.c shows the use of System V shared memory.
// In System V a numeric key is the shared information all processes
// or binaries need. The necessary size is often calculated.
// Uses fork() to create multiple processes - see fork.c.
// In the trial do not care about closing ressources in the case ... |
hareat/trials | c/signal.c | <gh_stars>0
// signal.c shows the use of signal to handle signals.
// use kill -l for a list of signal numbers
//
// build: cc signal.c -o signal
// use: ./signal
// you have to kill with killall -9 signal
// because CTRL+C is handled by the signal handler, try it
// ./signal 10 12
// ... |
hareat/trials | c/forkExec.c | // forkExec.c shows the use of fork+exec* to start several child programs.
//
// build: cc forkExec.c -o forkExec
// use: ./forkExec 3
// ./forkExec 5 /bin/sleep
// meanwhile try ps u to show the current processes
/////////////////////////////////////////////////////////////////////
#include <errno.h>... |
tbartelmess/sqlite-trace | sqlite-trace/Public Headers/sqlite-trace.h | //
// sqlite-trace.h
// sqlite-trace
//
// Created by <NAME> on 2020-12-24.
//
#ifndef sqlite_trace_h
#define sqlite_trace_h
#include <stdio.h>
#include "sqlite3.h"
void sqlite_trace_configure(sqlite3* db, const char* name);
#endif
|
tbartelmess/sqlite-trace | sqlite-trace/main.c | //
// main.c
// sqlite-trace
//
// Created by <NAME> on 2020-12-21.
//
#include <stdio.h>
#include "sqlite3.h"
#include <os/log.h>
#include <os/signpost.h>
#include "Cleanup.h"
os_log_t logger;
os_signpost_id_t sqlite_signpost;
void setup_logger() {
logger = os_log_create("sqlite", "tracing");
sqlite_sign... |
tbartelmess/sqlite-trace | sqlite-trace/sqlite-trace.c | //
// sqlite-trace.c
// sqlite-trace
//
// Created by <NAME> on 2020-12-24.
//
#include "sqlite-trace.h"
#include "sqlite3.h"
#include <os/log.h>
#include <os/signpost.h>
static os_log_t logger;
typedef struct {
os_signpost_id_t signpost_id;
char* name;
} sqlite_trace_context_t;
static void configure_logg... |
yingyulou/PDBToolsCpp | src/Residue.h | /*
Residue.h
=========
Class Residue header.
*/
#pragma once
#include <string>
#include <vector>
#include <unordered_map>
#include <utility>
#include <iostream>
#include <Eigen/Dense>
#include "NotAtom.h"
#include "NotProtein.h"
#include "Chain.h"
#include "Atom.h"
#include "Constants.hpp"
namespace ... |
yingyulou/PDBToolsCpp | src/Protein.h | <reponame>yingyulou/PDBToolsCpp<filename>src/Protein.h
/*
Protein.h
=========
Class Protein header.
*/
#pragma once
#include <string>
#include <vector>
#include <unordered_map>
#include <iostream>
#include "NotAtom.h"
#include "Chain.h"
#include "Residue.h"
#include "Atom.h"
namespace PDBTools
{
///... |
yingyulou/PDBToolsCpp | src/NotAtom.h | /*
NotAtom.h
=========
Class __NotAtom header.
*/
#pragma once
#include <string>
#include <vector>
#include <unordered_set>
#include <initializer_list>
#include <Eigen/Dense>
#include "Predecl.h"
namespace PDBTools
{
////////////////////////////////////////////////////////////////////////////////
//... |
yingyulou/PDBToolsCpp | src/NotProtein.h | /*
NotProtein.h
============
Class __NotProtein header.
*/
#pragma once
#include <vector>
namespace PDBTools
{
////////////////////////////////////////////////////////////////////////////////
// Using
////////////////////////////////////////////////////////////////////////////////
using std::vector... |
yingyulou/PDBToolsCpp | src/Predecl.h | <filename>src/Predecl.h
/*
Predecl.h
=========
Struct class predeclaration.
*/
#pragma once
namespace PDBTools
{
////////////////////////////////////////////////////////////////////////////////
// Class Predeclaration
////////////////////////////////////////////////////////////////////////////////
c... |
yingyulou/PDBToolsCpp | src/Chain.h | /*
Chain.h
=======
Class Chain header.
*/
#pragma once
#include <string>
#include <vector>
#include <unordered_map>
#include <iostream>
#include "NotAtom.h"
#include "NotProtein.h"
#include "Protein.h"
#include "Residue.h"
#include "Atom.h"
namespace PDBTools
{
//////////////////////////////////////... |
yingyulou/PDBToolsCpp | src/Atom.h | <filename>src/Atom.h
/*
Atom.h
======
Class Atom header.
*/
#pragma once
#include <string>
#include <iostream>
#include <Eigen/Dense>
#include "NotProtein.h"
#include "Residue.h"
namespace PDBTools
{
////////////////////////////////////////////////////////////////////////////////
// Using
//////////... |
nikolausmayer/cpp-queueprocessor | QueueProcessor.h | <gh_stars>0
/**
* <NAME>, 2018 (<EMAIL>)
*/
#ifndef QUEUEPROCESSOR_H__
#define QUEUEPROCESSOR_H__
/// System/STL
#include <chrono>
#include <functional>
#include <memory>
#include <mutex>
#include <queue>
#include <thread>
namespace QueueProcessor
{
template <class T>
class QueueProcessor
{
typedef std:... |
sympt0m/fourth | fourth.c | #include "stdafx.h"
static volatile char *HELP = "Windows XP sucks and so does Visual C++ 2010, but I'm not about to shell out $200 for Windows 10 Pro for this keygenme stuff. I hate licensing costs.";
struct RSAKey {
uint32_t d;
uint32_t n;
uint32_t e;
};
static void
randombytes(void *buf, size_t len)... |
sympt0m/fourth | stdafx.h | // stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <Windows.h>
#include <WinCrypt.h>
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
#include <std... |
egorzainullin/Skillbox-part-2 | Task8_3/Task8_3/TwoViewController.h | //
// TwoViewController.h
// Task8_3
//
// Created by <NAME> on 04.06.2022.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TwoViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
|
egorzainullin/Skillbox-part-2 | Task8_3/Task8_3/ViewController.h | <gh_stars>0
//
// ViewController.h
// Task8_3
//
// Created by <NAME> on 04.06.2022.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
MasterofGalaxies/smg2-powerstarcolors | getstarcolorandstarselecthandler.c | #include <stddef.h>
#include <string.h>
extern char *getCurrentStageName__2MRFv(void);
extern void *makeGalaxyStatusAccessor__2MRFPCc(const char *galaxyname);
// Reads a galaxy's ScenarioData.bcsv
extern void FUN_804CBB60(void *galaxystatusaccessor, const char *column,
int starnumber, char **... |
CobaltXV/REP-001 | csrc/net/transmit.c | #include "transmit.h"
EXTERN_C_BEGIN
EXTERN_C_END |
CobaltXV/REP-001 | include/socket.h | #ifndef SOCKET_H
#define _SOCKET_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include "common.h"
#ifdef __cplusplus
# ifndef EXTERN_C
# defin... |
CobaltXV/REP-001 | include/common.h | #ifndef _COMMON_H
#define _COMMON_H
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
# ifndef EXTERN_C
# define EXTERN_C extern "C"
# endif
# ifndef EXTERN_C_BEGIN
# define EXTERN_C_BEGIN extern "C" {
# endif
# ifndef EXTERN_C_END
# define EXTERN_C_END }
# ... |
CobaltXV/REP-001 | csrc/net/socket.c | #include "socket.h"
EXTERN_C_BEGIN
socket_t CreateSecSocket(int domain, int type, int proto) {
socket_t sock;
sock = socket(domain, type, proto);
if (sock < 0) {
// TODO: ERROR
return (sock);
}
int returnValue;
returnValue = setsockopt(sock, SOL_SOCKET, SO_REUSEADD... |
CobaltXV/REP-001 | csrc/error.c | <filename>csrc/error.c
#include "error.h"
EXTERN_C_BEGIN
EXTERN_C_END |
CobaltXV/REP-001 | include/error.h | <gh_stars>0
#ifndef _ERROR_H
#define _ERROR_H
#ifdef __cplusplus
# ifndef EXTERN_C
# define EXTERN_C extern "C"
# endif
# ifndef EXTERN_C_BEGIN
# define EXTERN_C_BEGIN extern "C" {
# endif
# ifndef EXTERN_C_END
# define EXTERN_C_END }
# endif
#else
# ifndef EXTERN_C
# define EXTER... |
CobaltXV/REP-001 | csrc/enc/encrypt.c | <gh_stars>0
#include "encrypt.h"
EXTERN_C_BEGIN
EXTERN_C_END |
CobaltXV/REP-001 | csrc/common.c | #include "common.h"
EXTERN_C_BEGIN
bool SubValueList16(uint16_t *list, uint16_t item, int32_t size) {
if (list == NULL) {
// TODO: ERROR
return (false);
}
for (int32_t i = 0; i < size; i++) {
if (list[i] == item) return (true);
}
return (false);
}
bool SubValueList32(uin... |
CobaltXV/REP-001 | csrc/main.c | <reponame>CobaltXV/REP-001<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include "socket.h"
#include "transmit.h"
#include "encrypt.h"
#include "error.h"
#ifdef __cplusplus
# ifndef EXTERN_C
# define EXTERN_C extern "C"
# endif
# ifndef EXTERN_C_BEGIN
# define EXTERN_C_BEGIN extern "C" {
# end... |
irustm/nodegui | src/cpp/include/nodegui/QtCore/QSize/qsize_wrap.h | <gh_stars>1-10
#pragma once
#include <napi.h>
#include <stdlib.h>
#include <QSize>
#include "core/Component/component_macro.h"
class QSizeWrap : public Napi::ObjectWrap<QSizeWrap> {
private:
std::unique_ptr<QSize> instance;
public:
static Napi::FunctionReference constructor;
static Napi::Object init(Napi::... |
irustm/nodegui | src/cpp/include/nodegui/QtWidgets/QAbstractButton/qabstractbutton_macro.h | <reponame>irustm/nodegui<gh_stars>1-10
#pragma once
#include "QtGui/QIcon/qicon_wrap.h"
#include "QtWidgets/QWidget/qwidget_macro.h"
#include "QtWidgets/QWidget/qwidget_wrap.h"
/*
This macro adds common QAbstractScrollArea exported methods
The exported methods are taken into this macro to avoid writing them ... |
irustm/nodegui | src/cpp/include/nodegui/QtWidgets/QSystemTrayIcon/qsystemtrayicon_wrap.h | #pragma once
#include <napi.h>
#include <QPointer>
#include "QtWidgets/QWidget/qwidget_macro.h"
#include "nsystemtrayicon.hpp"
class QSystemTrayIconWrap : public Napi::ObjectWrap<QSystemTrayIconWrap> {
private:
QPointer<NSystemTrayIcon> instance;
public:
static Napi::Object init(Napi::Env env, Napi::Object ex... |
irustm/nodegui | src/cpp/include/nodegui/QtWidgets/QBoxLayout/qboxlayout_wrap.h | <filename>src/cpp/include/nodegui/QtWidgets/QBoxLayout/qboxlayout_wrap.h
#pragma once
#include <napi.h>
#include <stdlib.h>
#include <QBoxLayout>
#include <QPointer>
#include "QtWidgets/QBoxLayout/nboxlayout.hpp"
#include "QtWidgets/QLayout/qlayout_macro.h"
class QBoxLayoutWrap : public Napi::ObjectWrap<QBoxLayoutW... |
irustm/nodegui | src/cpp/include/nodegui/QtGui/QKeySequence/qkeysequence_wrap.h | <gh_stars>1-10
#pragma once
#include <napi.h>
#include <stdlib.h>
#include <QKeySequence>
#include "core/Component/component_macro.h"
class QKeySequenceWrap : public Napi::ObjectWrap<QKeySequenceWrap> {
private:
std::unique_ptr<QKeySequence> instance;
public:
static Napi::FunctionReference constructor;
sta... |
irustm/nodegui | src/cpp/include/nodegui/QtGui/QApplication/qapplication_wrap.h | <filename>src/cpp/include/nodegui/QtGui/QApplication/qapplication_wrap.h
#pragma once
#include <napi.h>
#include <QApplication>
#include <QPointer>
#include "core/Component/component_macro.h"
class QApplicationWrap : public Napi::ObjectWrap<QApplicationWrap> {
private:
QPointer<QApplication> instance;
static i... |
irustm/nodegui | src/cpp/include/nodegui/QtGui/QStyle/qstyle_wrap.h | #pragma once
#include <napi.h>
#include <QStyle>
#include "core/Component/component_macro.h"
class QStyleWrap : public Napi::ObjectWrap<QStyleWrap> {
private:
QStyle* instance;
public:
static Napi::FunctionReference constructor;
static Napi::Object init(Napi::Env env, Napi::Object exports);
QStyleWrap(co... |
stardot/ncc | mip/mipvsn.h | #define MIP_VERSION "500"
|
stardot/ncc | mip/aetree.h | <gh_stars>0
/*
* aetree.h - AE Tree constructor and print functions.
* Copyright (C) Acorn Computers Ltd., 1988-1990.
* Copyright (C) Codemist Ltd., 1987-1992.
* Copyright (C) Advanced RISC Machines Limited, 1991-1992.
* SPDX-Licence-Identifier: Apache-2.0
*/
/*
* RCS $Revision$ Codemist 15
* Checkin $Date$
*... |
stardot/ncc | tests/2368.c | /*
* ARM C compiler regression test $RCSfile$
* Copyright (C) 1997 Advanced Risc Machines Ltd. All rights reserved.
* SPDX-Licence-Identifier: Apache-2.0
*/
/*
* RCS $Revision$
* Checkin $Date$
* Revising $Author$
*/
#include "testutil.h"
/********************* 2368 ***********************/
/* no executabl... |
stardot/ncc | arm/asm.c | <filename>arm/asm.c
/*
* arm/asm.c: ARM assembly language output, Codemist version 21
* Copyright (C) Codemist Ltd., 1987-1993
* Copyright (C) Advanced RISC Machines Limited., 1990-1993
* SPDX-Licence-Identifier: Apache-2.0
*/
/*
* RCS $Revision$
* Checkin $Date$
* Revising $Author$
*/
/* Assembler output i... |
stardot/ncc | mip/cse.h | <filename>mip/cse.h<gh_stars>0
/*
* cse.h: Common sub-expression elimination
* Copyright (C) Acorn Computers Ltd., 1988-1990.
* Copyright (C) Advanced RISC Machines Limited, 1991-92.
* SPDX-Licence-Identifier: Apache-2.0
*/
/*
* RCS $Revision$
* Checkin $Date$
* Revising $Author$
*/
/*
* This header describ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.