Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
054faba
Merge pull request #1 from akormushin/master
DariaZvereva Sep 15, 2015
0acb2ba
My first commit
DariaZvereva Sep 22, 2015
3eb2d90
twitterStream without location
DariaZvereva Sep 28, 2015
bbc2921
+pause
DariaZvereva Sep 29, 2015
11a4d34
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Sep 30, 2015
9b3a236
Merge pull request #2 from akormushin/master
DariaZvereva Sep 30, 2015
6fa3a8e
something added
DariaZvereva Sep 30, 2015
0cb2aa9
something added
DariaZvereva Sep 30, 2015
9bbcaf7
Merge branch 'master' of https://github.com/DariaZvereva/fizteh-java-…
DariaZvereva Sep 30, 2015
92e6e1f
добавлена локация и исправлены замечания
DariaZvereva Oct 11, 2015
e11aa2c
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Nov 5, 2015
67da1e9
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Nov 5, 2015
99aa216
small changes
DariaZvereva Nov 5, 2015
233a541
small changes
DariaZvereva Nov 5, 2015
919f417
one test:)
DariaZvereva Nov 5, 2015
65e7b96
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Nov 10, 2015
14e1166
little changes
DariaZvereva Nov 10, 2015
9bb2089
little changes
DariaZvereva Nov 10, 2015
a86d10c
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Dec 7, 2015
54af66e
threads
DariaZvereva Dec 15, 2015
3f9d76b
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Dec 15, 2015
16717d1
MiniORM + CQL + ModuleTest
DariaZvereva Dec 18, 2015
e282718
Merge branch 'master' of https://github.com/akormushin/fizteh-java-2015
DariaZvereva Dec 18, 2015
5c86584
fix
DariaZvereva Dec 18, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions DariaZvereva/grep.exe.stackdump
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MSYS-1.0.12 Build:2012-07-05 14:56
Exception: STATUS_ACCESS_VIOLATION at eip=00788DAA
eax=680A220C ebx=68573734 ecx=003028AA edx=00000124 esi=00000000 edi=685700D4
ebp=0029FE90 esp=0029FE6C program=C:\Program Files (x86)\Git\bin\grep.exe
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0029FE90 00788DAA (685700D4, 00000124, 00000003, 007844EA)
0029FEE0 0078466B (00000000, E79C138C, 0029FF20, 00413CAC)
0029FF00 00784C5F (004039A0, 00401000, 00000000, 00000000)
0029FF20 00784C98 (00000000, 00000000, 00000000, 00000000)
0029FF50 00413BBC (004039A0, 00000000, 00000000, 00000000)
0029FF80 0040103D (7FFDE000, 74473720, E3AB5234, 0029FFDC)
0029FF94 74473744 (7FFDE000, A74129A1, 00000000, 00000000)
0029FFDC 770D9CD4 (FFFFFFFF, 770FD4DC, 00000000, 00000000)
0029FFEC 770D9C9F (00401000, 7FFDE000, 00000000, 78746341)
End of stack trace
124 changes: 124 additions & 0 deletions DariaZvereva/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.fizteh.fivt.students</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>ru.fizteh.fivt.students</groupId>
<artifactId>DariaZvereva</artifactId>
<version>1.0-SNAPSHOT</version>
<name>DariaZvereva</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-stream</artifactId>
<version>4.0.4</version>
</dependency>

<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.48</version>
</dependency>

<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.1.7</version>
</dependency>

<dependency>
<groupId>com.google.code.geocoder-java</groupId>
<artifactId>geocoder-java</artifactId>
<version>0.16</version>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.190</version>
</dependency>
</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<archive>
<manifest>
<mainClass>ru.fizteh.fivt.students.DariaZvereva.MiniORM.Test</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- bind to the packaging phase -->
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package ru.fizteh.fivt.students.DariaZvereva.CQL;

/**
* Created by Dasha on 10.11.2015.
*/

import ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators.Avg;
import ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators.Count;
import ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators.Max;
import ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators.Min;

import java.util.function.Function;

/**
* Aggregate functions.
*
* @author akormushin
*/
public class Aggregates {

public static <C, T extends Comparable<T>> Function<C, T> max(Function<C, T> expression) {
return new Max<>(expression);
}

public static <C, T extends Comparable<T>> Function<C, T> min(Function<C, T> expression) {
return new Min<>(expression);
}

public static <T> Function<T, Long> count(Function<T, ?> expression) {
return new Count<>(expression);
}

public static <T> Function<T, Double> avg(Function<T, ? extends Number> expression) {
return new Avg<>(expression);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators;

import java.util.List;
import java.util.function.Function;

/**
* Created by Dasha on 18.12.2015.
*/
public interface Aggregator<T, R> extends Function<T, R> {
R apply(List<T> elements);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators;

import java.util.List;
import java.util.function.Function;

/**
* Created by Dasha on 18.12.2015.
*/
public class Avg<T> implements Aggregator<T, Double> {
private Function<T, ? extends Number> function;
public Avg(Function<T, ? extends Number> statement) {
function = statement;
}
@Override
public Double apply(List<T> elements) {
return elements.stream().map(function).mapToDouble(element -> (Double) element)
.average().getAsDouble();
}

@Override
public Double apply(T t) {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators;

import java.util.List;
import java.util.function.Function;

/**
* Created by Dasha on 18.12.2015.
*/
public class Count<T> implements Aggregator<T, Long> {
private Function<T, ?> function;
public Count(Function<T, ?> statement) {
function = statement;
}

@Override
public Long apply(List<T> elements) {
return elements.stream().map(function).distinct().count();
}

@Override
public Long apply(T t) {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators;

import java.util.List;
import java.util.function.Function;

/**
* Created by Dasha on 18.12.2015.
*/
public class Max<T, R extends Comparable<R>> implements Aggregator<T, R> {

private Function<T, R> function;
public Max(Function<T, R> statement) {
function = statement;
}

@Override
public R apply(List<T> elements) {
return elements.stream().map(function).max(R::compareTo).get();
}

@Override
public R apply(T t) {
return null;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package ru.fizteh.fivt.students.DariaZvereva.CQL.Aggregators;

import java.util.List;
import java.util.function.Function;

/**
* Created by Dasha on 18.12.2015.
*/
public class Min<T, R extends Comparable<R>> implements Aggregator<T, R> {

private Function<T, R> function;
public Min(Function<T, R> statement) {
function = statement;
}

@Override
public R apply(List<T> elements) {
return elements.stream().map(function).min(R::compareTo).get();
}

@Override
public R apply(T t) {
return null;
}
}
Loading