Skip to content

Instantly share code, notes, and snippets.

View paulodiogo's full-sized avatar
:octocat:

NO NO NO paulodiogo

:octocat:
View GitHub Profile
package com.example.android;
import com.thoughtworks.xstream.*;
import com.thoughtworks.xstream.io.*;
import com.thoughtworks.xstream.mapper.*;
import com.thoughtworks.xstream.converters.*;
import com.thoughtworks.xstream.converters.collections.*;
import java.util.*;
@paulodiogo
paulodiogo / override.primefaces.js
Created February 14, 2014 11:40
Removendo bug que faz a linha ser selecionada ao clicar mesmo tendo um radio button
PrimeFaces.widget.DataTable.prototype.bindSelectionEvents = function() {
this.cfg.rowSelectMode = this.cfg.rowSelectMode || "new";
this.rowSelector = this.jqId
+ " tbody.ui-datatable-data > tr.ui-widget-content.ui-datatable-selectable";
this.bindRadioEvents();
if (this.isCheckboxSelectionEnabled()) {
this.bindCheckboxEvents();
@paulodiogo
paulodiogo / ChaveComposta.java
Created February 19, 2014 18:43
definindo uma chave composta no hibernate usando @embeddable
//Definindo
@Embeddable
public class ExemploPK implements Serializable {
private static final long serialVersionUID = -4978349929535369754L;
public ExemploPK() {
}
@paulodiogo
paulodiogo / UsingReadAllLines.cs
Last active August 29, 2015 13:56
Lendo arquivos em c# usando File.ReadAllLines
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
class Program
{
static void Main()
{
// Write a string array to a file.
@paulodiogo
paulodiogo / LendoArquivoUsandoStream.cs
Last active August 29, 2015 13:56
Lendo arquivos em c# usando StreamReader
string text = string.Empty;
using (StreamReader reader = new StreamReader(filePath, Encoding.UTF8))
{
text = reader.ReadToEnd();
}
public interface Observavel{
void adcionarObersavacao(Observacao observacao);
}
public class Observacao{
@Column(name = "TX_OBSERVACAO")
private String observacao;
public Observacao(){}
package com.example.testchart;
import java.util.*;
import java.io.*;
import java.text.DateFormat;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.*;
{"name":"SELIC","id":"537cb4efe4b0123641162024","values":[
{"month":1230775200000, "value": 13.43},
{"month":1233453600000, "value": 12.75},
{"month":1235876400000, "value": 11.78},
{"month":1238554800000, "value": 11.22},
{"month":1241146800000, "value": 10.25},
{"month":1243825200000, "value": 9.62},
{"month":1246417200000, "value": 9.10},
{"month":1249095600000, "value": 8.75},
{"month":1251774000000, "value": 8.75},
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Gráficos</title>
</head>
<body>
@paulodiogo
paulodiogo / index.html
Last active August 29, 2015 14:01
index
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Índices para os gráficos</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<style>
.centered{