Skip to content

Instantly share code, notes, and snippets.

View murilomenezescosta's full-sized avatar

Kouz murilomenezescosta

View GitHub Profile
@murilomenezescosta
murilomenezescosta / s_new_from_stdin.c
Created April 30, 2019 16:03 — forked from migf1/s_new_from_stdin.c
Read portably a string of arbitrary length from the console in C ( ANSI C89 / ISO C90 ).
#include <stdio.h> /* getchar() */
#include <stdlib.h> /* malloc(), realloc() */
#include <string.h> /* memcpy() */
/* -----------------------------------------------
* Create a new string (NUL-terminated array of chars) by reading the stdin.
* Return the newly created string, or NULL on error.
* Args:
* int beExact: If 0 (false), then the size of the created string will
* be an exact multiple of the internally used alloc-ahead
@murilomenezescosta
murilomenezescosta / persistence.xml
Created May 11, 2018 19:58 — forked from halyph/persistence.xml
persistence.xml MySQL settings
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="org.hibernate.tutorial.jpa" transaction-type="RESOURCE_LOCAL">
<description>
Persistence unit for the JPA tutorial of the Hibernate Getting Started Guide
</description>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
@murilomenezescosta
murilomenezescosta / pom.xml
Last active May 10, 2017 00:48
pom.xml with junit, eclipselink e mysql connector.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.edu.ifsp.murilo</groupId>
<artifactId>ProjetoIntegrado</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>mysql</groupId>
@murilomenezescosta
murilomenezescosta / persistence.xml
Created April 21, 2017 12:00 — forked from zhouji/persistence.xml
persistence.xml for eclipse link and mongodb.
<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="pu" >
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>