Skip to content

Instantly share code, notes, and snippets.

View jesuino's full-sized avatar

William Antônio Siqueira jesuino

View GitHub Profile
@jesuino
jesuino / AppController.java
Created August 18, 2014 20:53
O controller da aplicação javaFX para as eleições 2014
package org.jugvale.transparenciaexplorerfx;
import com.sensedia.transparencia.client.core.TransparenciaClient;
import com.sensedia.transparencia.client.ex.RestException;
import com.sensedia.transparencia.client.resources.Candidato;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import javax.ws.rs.Path;
import javax.ws.rs.POST;
import javax.ws.rs.Produces;
import javax.ws.rs.FormParam;
import javax.ws.rs.HeaderParam;
/**
*
* Just a simple service to receive a name and returns it with a greeting.
*
*
@jesuino
jesuino / blog.js
Created November 27, 2014 05:11
Blog App
var liveoak;
function deletePost(id) {
liveoak.remove( '/blog/storage/post',
{id: 'ObjectId(%22' + id + '%22)' },
{ success: function(data) {
console.log( "Post Removed" );
},
error: function() {
@jesuino
jesuino / web.xml
Last active August 29, 2015 14:12
<servlet>
<servlet-name>RESTEasy JSAPI</servlet-name>
<servlet-class>org.jboss.resteasy.jsapi.JSAPIServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RESTEasy JSAPI</servlet-name>
<url-pattern>/bpms-js</url-pattern>
</servlet-mapping>
@jesuino
jesuino / jbpm-js.js
Created December 31, 2014 05:03
Generated Javascript code by the resteasy servlet
// namespace
var REST = {
apiURL : null,
debug: false,
loglevel : 0,
antiBrowserCache : false,
cacheHeaders : []
};
// helper function
@jesuino
jesuino / my-tasks.html
Created December 31, 2014 05:47
Simple page to use the generated API
<html>
<head>
<script src="./bpms-js" type="text/javascript">
</script>
<script type="text/javascript">
function loadTasks() {
var tasks_resp = TaskResource.query({ownerId: "jesuino", $accepts: "application/json"});
var tasks = tasks_resp.list;
@jesuino
jesuino / Particle.pde
Created January 7, 2015 20:26
Fun with Processing
class Particle {
PVector location;
PVector velocity;
float life;
float lifeRate;
color c;
Particle(){
location = new PVector(mouseX, mouseY, height/2);
velocity = new PVector(random(-2, 2), random(1, 3));
@jesuino
jesuino / SimpleWEBView.java
Created January 11, 2015 04:19
Códigos da postagem sobre WEB View do Aprendendo-javafx.blogspot.com
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.web.WebView;
import javafx.scene.Scene;
/**
*
* @author william
*/
public class SimplesWEBView extends Application {
@jesuino
jesuino / NAvegaSites.java
Created January 11, 2015 04:21
Outro Exemplo de web view. Blog aprendendo-javafx.blogspot.com
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.web.WebView;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.scene.layout.HBox;
import java.util.stream.Stream;
import java.util.Optional;
/**
@jesuino
jesuino / Game.java
Created January 21, 2015 17:53
Game in JavaFX: Two classes to create games using JavaFX
package org.jugvale.javafx;
import javafx.scene.canvas.GraphicsContext;
/**
*
* @author william
*/
public abstract class Game {