Skip to content

Instantly share code, notes, and snippets.

View carlosdlf's full-sized avatar

Carlos DLF carlosdlf

View GitHub Profile
public class ContarVocales {
public static void main(String[] args) {
String vocales = "aeiou";
String palabra = "murcielago";
int cantidadVocales = 0;
for (int i = 0; i < palabra.length(); i++) {
char letter = palabra.charAt(i);
JRExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, new FileOutputStream("zxc"+ ".pdf")); // your output goes here
package edu.cibertec.jadd.jaxws;
import javax.jws.WebMethod;
import javax.jws.WebService;
/**
* Created by Java-VS on 15/04/2016.
*/
@WebService
/**
* Created by clarico on 21/04/2016.
*
* https://projecteuler.net/problem=546
*
*/
public class P546 {
public static void main(String[] args) {
@carlosdlf
carlosdlf / README.md
Created May 26, 2016 23:29 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

public static StringBuilder readFile(File $f) throws IOException {
StringBuilder sb = new StringBuilder();
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader($f));
while ((sCurrentLine = br.readLine()) != null) {
sb.append(sCurrentLine).append("\n");
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
public static List<String> fileList(String directory) {
List<String> fileNames = new ArrayList<>();
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(Paths.get(directory))) {
for (Path path : directoryStream) {
fileNames.add(path.toString());
<script>
function checkFile(fieldObj)
{
var FileName = fieldObj.value;
var FileExt = FileName.substr(FileName.lastIndexOf('.')+1);
var FileSize = fieldObj.files[0].size;
var FileSizeMB = (FileSize/2097152).toFixed(2);
// aca van las extensiones validas
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
public class Decoder {
public static void main(String[] args) {
RootDecoder rootDecoder = new RootDecoder();
List<DecodedData> zxc = rootDecoder
.decode("5F34010182023C009F100706010A03A0B0009F26082F1D19F97D74AF009F360203975F2A020604950580800400009A031708019C01309F02060000000000009F03060000000000009F1A0206049F33036040209F3704BA6FF67F", "EMV", "constructed");
for (DecodedData decodedData : zxc) {
System.out.println("tag ->"+decodedData.component1() + " desc ->" + decodedData.component2() + " valor -> " + decodedData.component3());
}