Skip to content

Instantly share code, notes, and snippets.

View pluralism's full-sized avatar

André Pinheiro pluralism

  • Critical TechWorks
  • Porto, Portugal
View GitHub Profile
char convert(char *s, int numRows) {
int lenght = strlen(s);
char result = (char*)malloc(lenght * sizeof(char));
int resI = 0;
int line = 0;
int delimiter = 2;
int advancer = 0;
while(line < numRows){
char* getHint(char* secret, char* guess) {
int lenght = strlen(secret);
if(lenght != strlen(guess))
return NULL;
unsigned int x = 0,y = 0;
int cow = 0,bull = 0;
bool* val = (bool*)calloc(false, lenght * sizeof(bool));
while(x < lenght){
if(guess[x] == secret[x])
bull++;
final ImageView itemImageView = (ImageView)view.findViewById(R.id.photoImage);
final Bitmap itemDrawable = ((BitmapDrawable) itemImageView.getDrawable()).getBitmap();
"aeroportoPartida", "paisPartida", "aeroportoChegada", "paisChegada", "fusoHorario"
"Francisco Sa Carneiro", "Portugal", "Aeroporto Internacional de Faro", "Portugal", "UTC+00:00"
"Francisco Sa Carneiro", "Portugal", "Portela", "Portugal", "UTC+00:00"
"Portela", "Portugal", "Aeroporto Internacional de Faro", "Portugal", "UTC+00:00"
"Portela", "Portugal", "Francisco Sa Carneiro", "Portugal", "UTC+00:00"
"Aeroporto Internacional de Faro", "Portugal", "Francisco Sa Carneiro", "Portugal", "UTC+00:00"
"Aeroporto Internacional de Faro", "Portugal", "Portela", "Portugal", "UTC+00:00"
"Schiphol Amsterdam", "Nederland", "Asturias", "Espana", "UTC+01:00"
"Schiphol Amsterdam", "Nederland", "Bilbao", "Espana", "UTC+01:00"
"Schiphol Amsterdam", "Nederland", "Bordeaux-Merignac Airport", "France", "UTC+01:00"
void MyRobot::drawSide()
{
glBegin(GL_QUADS);
for(int i = 0; i < stacks; i++) {
for(int j = 0; j < 3; j++) {
drawVertex(vertex[i][j]);
drawVertex(vertex[i][j + 1]);
drawVertex(vertex[i + 1][j + 1]);
drawVertex(vertex[i + 1][j]);
}
int getMaxNumber(char *number)
{
long int tmp_number;
char *lptr;
tmp_number = strtol(number, &lptr, 10);
//No valid conversion could be performed
if(tmp_number == 0L)
{
#pragma once
#ifndef MENUCAL_H_
#define MENUCAL_H_
#include <vector>
#include <queue>
#include <list>
#include <limits>
#include <cmath>
#include <iostream>
using namespace std;
#include "Graph.h"
int main(int argc, char *argv[])
{
Graph<int> p;
return 0;
}
/*
* Graph.h
*/
#pragma once
#ifndef __calproject__Graph__
#define __calproject__Graph__
#include <vector>
#include <queue>
#include <list>
#include <limits>
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1 -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/pluralism/Desktop/calproject/calproject -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/wg/tgy_8t713kn6ll3vzhg4v0jh0000gp/T/main-ff99b1.o -x c++ main.cpp
clang -cc1 vers