Skip to content

Instantly share code, notes, and snippets.

View pfallasro's full-sized avatar

Pablo Fallas pfallasro

View GitHub Profile
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;
int main() {
int i, j, dimension, elemento;
@pfallasro
pfallasro / cola.c
Created June 24, 2013 04:17
Pila - C y Cola - C
#include <stdio.h>
#include <stdlib.h>
char* getPtrNom();
int getId();
int isEmpty();
int menu();
void clearBuffer();
void dequeue();
void enqueue();
@pfallasro
pfallasro / AngularJS-Service
Last active August 29, 2015 13:56
Basic AngulasJS Service
var myApp = angular.module('myApp', []);
//This is the service
myApp.Factory('Data', function () {
return {message:"I'm data from a service"}
})
//This is the controller
function FirstCntrl ($scope, Data) {
$scope.data = Data;
@pfallasro
pfallasro / AngularJS-Service-Filter
Created March 2, 2014 21:02
AngularJS filter, service and function within a controller example
var myApp = angular.module('myApp', []);
//This is a service
myApp.Factory('Data', function () {
return {message:"I'm data from a service"}
})
//This is a filter
myApp.filter('reverse', function (Data) {
return function (text) {
@pfallasro
pfallasro / angularjs-directive-A
Last active August 29, 2015 13:56
AngularJS very simple directive
app.directive("superman", function () {
return {
restrict:"A";
link: function () {
alert("I'm working")
}
}
})
@pfallasro
pfallasro / angularjs-behaviordirective
Created March 2, 2014 22:01
Angular directive behavior
var myApp = angular.module('behaviorApp', []);
app.directive("enter", function () {
return function (scope, element) {
element.bind("mouseenter", function () {
console.log("I'm inside of you");
})
}
})
@pfallasro
pfallasro / angularjs-directives-controllers
Created March 2, 2014 22:33
AngularJS directives talking to controllers
var myApp = angular.module('behaviorApp', []);
app.controller("AppCtrl", function ($scope) {
$scope.loadMoreTweets = function (){
alert("Loading tweets!")
}
$scope.deleteTweets = function (){
alert("Deleting tweets!")
@pfallasro
pfallasro / gist:9561625
Created March 15, 2014 03:54
Lazy Hibernate Error
org.codehaus.jackson.map.JsonMappingException: failed to lazily initialize a collection of role: com.gangfive.sima.ejb.Organizacion.usuarios, could not initialize proxy - no Session (through reference chain: com.gangfive.sima.contracts.CalendarioCitaResponse["citas"]->java.util.ArrayList[0]->com.gangfive.sima.pojo.CalendarioCitaPOJO["paciente"]->com.gangfive.sima.ejb.Paciente["organizacion"]->com.gangfive.sima.ejb.Organizacion["usuarios"])
at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:218)
at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:183)
at org.codehaus.jackson.map.ser.std.SerializerBase.wrapAndThrow(SerializerBase.java:140)
at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:158)
at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
at org.codehaus.jac
@pfallasro
pfallasro / gist:9633749
Created March 19, 2014 01:27
error sts
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.gangfive.sima.utils.PojoUtils.mapPojoFromEjb(PojoUtils.java:37)
at com.gangfive.sima.controllers.PacientesController.getAll(PacientesController.java:85)
at com.gangfive.sima.controllers.PacientesController$$FastClassByCGLIB$$654fe5ff.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
@pfallasro
pfallasro / errorCalendarizarCita
Created September 17, 2014 03:02
Error al calendarizar cita
ep 16, 2014 12:39:15 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.util.Assert.notNull(Assert.java:123)
at org.springframework.data.jpa.repository.query.ParameterMetadataProvider$ParameterMetadata.prepare(ParameterMetadataProvider.java:156)
at org.springframework.data.jpa.repository.query.CriteriaQueryParameterBinder.bind(CriteriaQueryParameterBinder.java:68)
at org.springframework.data.jpa.repository.query.ParameterBinder.bind(ParameterBinder.java:108)
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery$CountQueryPreparer.invokeBinding(PartTreeJpaQuery.java:196)
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery$QueryPreparer.createQuery(PartTreeJpaQuery.java: