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 <iostream> | |
#include <vector> | |
using namespace std; | |
int factorial(int x); | |
void combn(int n, int m, vector<vector<int> > *result); | |
vector<int> currentCombination; | |
vector<int> startingFormat; |
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 <iostream> | |
#include <algorithm> | |
#include <tuple> | |
#include <vector> | |
#include <numeric> | |
using namespace std; | |
bool lessThan(pair<int, int> const &a, pair<int, int> const &b) { return a.first < b.first; } | |
int calculateCost(vector <pair<int, int> > deposits, vector<int> collectorsPos, int smallestCost) |
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 430 core | |
uniform ivec2 viewportDimensions; | |
uniform mat4 gl_ProjectionMatrix; | |
uniform ivec4 viewport; | |
uniform float imageAspectRatio; | |
uniform float angle; | |
out vec3 color; |
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
// Rendering Constrains | |
const int MAX_LIGHTS = 4; | |
// Shared Structures | |
struct Matrix { | |
mat4 modelViewProjection; | |
mat4 modelView; | |
mat4 model; | |
mat4 view; | |
mat4 projection; |
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
template<typename T> | |
void types::ShaderProgram::setUniform(const std::string &sUniformName, T &&value0) const | |
{ | |
GLint uniformLocation = getUniform(sUniformName); | |
if (uniformLocation == -1) { return; } | |
setUniform(uniformLocation, std::forward<T>(value0)); | |
} |
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
/* | |
* File: main.cpp | |
* Author: Anon | |
* | |
* Created on January 10, 2015, 11:11 AM | |
*/ | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> |
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
auto it = std::find_if(progVertices.begin(), progVertices.end(), | |
[&minCostVertex](const std::pair<unsigned int, Vertex *> &index) { | |
// found smaller cost so swap vertex candidate | |
if (index.second->collapseCost < minCostVertex->collapseCost) { | |
minCostVertex = index.second; | |
// early loop break if the collapse cost is zero or really close to zero | |
if (minCostVertex->collapseCost > -glm::epsilon<float>() && minCostVertex->collapseCost < glm::epsilon<float>()) { | |
return true; | |
} |
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
{ | |
"id": 1, | |
"email": "polonoise@gmail.com", | |
"api_key": "3897014bd4615f0fd2eb34f608c54a18", | |
"treatment": [ | |
{ | |
"id": 1, | |
"start_date": "2007-12-04T00:00:00.000Z", | |
"end_date": "2007-12-04T00:00:00.000Z", | |
"description": "cualquiervaina", |
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
Prefix Verb URI Pattern Controller#Action | |
api_v1_user_treatment_dose_medicine_administration_routes POST /api/v1/users/:user_id/treatments/:treatment_id/doses/:dose_id/medicines/:medicine_id/administration_routes(.:format) api/v1/administration_routes#create {:format=>"json"} | |
api_v1_user_treatment_dose_medicine_administration_route GET /api/v1/users/:user_id/treatments/:treatment_id/doses/:dose_id/medicines/:medicine_id/administration_routes/:id(.:format) api/v1/administration_routes#show {:format=>"json"} | |
PATCH /api/v1/users/:user_id/treatments/:treatment_id/doses/:dose_id/medicines/:medicine_id/administration_routes/:id(.:format) api/v1/administration_routes#update {:format=>"json"} | |
PUT /api/v1/users/:user_id/treatments |
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
private class Node | |
{ | |
public Node parent = null; | |
public int x = 0; | |
public int y = 0; | |
public void Visit() | |
{ | |
Heightmap.Instance[x, y] += 1; |
OlderNewer