This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign}; | |
use num_traits::{Float, Num, NumAssignOps}; | |
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd)] | |
pub struct Vector3<T: Num + Copy> { | |
pub x: T, | |
pub y: T, | |
pub z: T, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:english_words/english_words.dart'; | |
void main() => runApp(MyApp()); | |
class RandomWords extends StatefulWidget { | |
@override | |
RandomWordsState createState() => RandomWordsState(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 450 core | |
layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | |
layout (set = 0, binding = 5, std430) buffer MyBuffer | |
{ | |
uint array[]; | |
} myBuffer; | |
layout (push_constant) uniform Scalar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by AregevDev on 11/5/2019. | |
// | |
#pragma once | |
#include <glad/glad.h> | |
#include <sstream> | |
#include <fstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLFW_INCLUDE_NONE | |
#include <GLFW/glfw3.h> | |
#include <glad/glad.h> | |
#define STB_IMAGE_IMPLEMENTATION | |
#include <stb/stb_image.h> | |
#define NK_INCLUDE_FIXED_TYPES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <raylib/raymath.h> | |
#include <raylib/raylib.h> | |
int main() { | |
InitWindow(500, 500, "Hello World"); | |
SetTargetFPS(60); | |
Vector2 player = {30.0f, 70.0f}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char *readFile(const char *filepath) { | |
char *source = NULL; | |
FILE *fp = fopen(filepath, "r"); | |
if (fp) { | |
if (fseek(fp, 0L, SEEK_END) == 0) { | |
long bufsize = ftell(fp); | |
source = malloc(sizeof(char) * (bufsize + 1)); | |
fseek(fp, 0L, SEEK_SET); | |
size_t len = fread(source, sizeof(char), bufsize, fp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use oauth2::reqwest::http_client; | |
use oauth2::{basic::BasicClient, AuthUrl, AuthorizationCode, ClientId, ClientSecret, CsrfToken, Scope, TokenUrl, TokenResponse}; | |
use std::io::{BufRead, BufReader, Write}; | |
use std::net::TcpListener; | |
use url::Url; | |
use serenity::http::Http; | |
fn main() { | |
let client = BasicClient::new( | |
ClientId::new("544523578855391241".to_string()), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use glium::glutin::{ | |
dpi::LogicalSize, Api, ContextBuilder, Event, EventsLoop, GlRequest, WindowBuilder, WindowEvent, | |
}; | |
use glium::index::{NoIndices, PrimitiveType}; | |
use glium::texture::RawImage2d; | |
use glium::{implement_vertex, uniform, Display, DrawParameters, Program, Surface, VertexBuffer}; | |
use image::GenericImageView; | |
use std::io::Cursor; | |
use glium::uniforms::{Sampler, MagnifySamplerFilter}; |
NewerOlder