Skip to content

Instantly share code, notes, and snippets.

View messo's full-sized avatar

Bálint Kriván messo

View GitHub Profile
// ---------
// VERSION 1
// ---------
public void sum1(List<Iterator<Double>> iterators, int length) {
double[] data = new double[length];
for (Iterator<Double> it : iterators) {
for (int i = 0; i < length; i++) {
data[i] += it.next();
}
public class LoginPage extends BasePage {
private static class LoginForm extends StatelessForm<Void> {
private String username;
private String password;
public LoginForm(String id) {
super(id);
@messo
messo / BeanLocator.java
Created February 2, 2011 01:27
My EJB Bean
public class BeanLocator implements ServiceLocator {
@Override
public Object getInstance(Class<?> clazz) {
System.out.println(clazz);
if (clazz.equals(GroupManager.class)) {
return lookupBean(clazz, "GroupManager");
} else {
return null;
}
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;