Skip to content

Commit

Permalink
Issue 1: Update initial verison of latest Angular and Angular Matiera…
Browse files Browse the repository at this point in the history
…l base UI

Issue 1: Update initial verison of latest Angular and Angular Matieral base UI
  • Loading branch information
danilko committed Sep 2, 2019
1 parent d6c5531 commit 0dae4f3
Show file tree
Hide file tree
Showing 95 changed files with 15,267 additions and 1,079 deletions.
161 changes: 161 additions & 0 deletions controller-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Created by .ignore support plugin (hsz.mobi)
### Gradle template
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar


### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties


### Eclipse template
*.pydevproject
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# PDT-specific
.buildpath

# sbteclipse plugin
.target

# TeXlipse plugin
.texlipse


### Java template
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties


### Grails template
# .gitignore for Grails 1.2 and 1.3
# Although this should work for most versions of grails, it is
# suggested that you use the "grails integrate-with --git" command
# to generate your .gitignore file.

# web application files
/web-app/WEB-INF/classes

# default HSQL database files for production mode
/prodDb.*

# general HSQL database files
*Db.properties
*Db.script

# logs
/stacktrace.log
/test/reports
/logs

# project release file
/*.war

# plugin release files
/*.zip
/plugin.xml

# older plugin install locations
/plugins
/web-app/plugins

# "temporary" build files
/target

85 changes: 85 additions & 0 deletions controller-server/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>controller.server</artifactId>
<packaging>jar</packaging>

<parent>
<groupId>com.musicutility</groupId>
<artifactId>controller-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>controller.web</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<finalName>controller</finalName>
<plugins>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
<resources>
<resource>
<directory>${project.parent.basedir}/controller-web/src/main/web/dist/musicutility/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.6.RELEASE</version>
<configuration>
<addResources>true</addResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration></configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class MusicPlayerState implements Serializable {
private long framePosition;

private String elaspsedTime;
private String elapsedPercentage;
private double elapsedPercentage;

private String errorMessage;

Expand All @@ -26,7 +26,6 @@ public class MusicPlayerState implements Serializable {
public MusicPlayerState() {
super();
elaspsedTime = "";
elapsedPercentage = "";

isPlaying = false;
musicPlayerSetting = null;
Expand Down Expand Up @@ -57,11 +56,11 @@ public void setElaspsedTime(String elaspsedTime) {
this.elaspsedTime = elaspsedTime;
}

public String getElapsedPercentage() {
public double getElapsedPercentage() {
return elapsedPercentage;
}

public void setElapsedPercentage(String elapsedPercentage) {
public void setElapsedPercentage(double elapsedPercentage) {
this.elapsedPercentage = elapsedPercentage;
}

Expand Down Expand Up @@ -120,23 +119,35 @@ public boolean equals(Object o) {

MusicPlayerState that = (MusicPlayerState) o;

if (frameSize != that.frameSize) return false;
if (totalFrames != that.totalFrames) return false;
if (Double.compare(that.sampleRate, sampleRate) != 0) return false;
if (bufferSize != that.bufferSize) return false;
if (framePosition != that.framePosition) return false;
if (Double.compare(that.elapsedPercentage, elapsedPercentage) != 0) return false;
if (isPlaying != that.isPlaying) return false;
if (musicPlayerSetting != null ? !musicPlayerSetting.equals(that.musicPlayerSetting) : that.musicPlayerSetting != null)
return false;
if (elaspsedTime != null ? !elaspsedTime.equals(that.elaspsedTime) : that.elaspsedTime != null) return false;
if (elapsedPercentage != null ? !elapsedPercentage.equals(that.elapsedPercentage) : that.elapsedPercentage != null)
return false;
return errorMessage != null ? errorMessage.equals(that.errorMessage) : that.errorMessage == null;
}

@Override
public int hashCode() {
int result = musicPlayerSetting != null ? musicPlayerSetting.hashCode() : 0;
int result;
long temp;
result = musicPlayerSetting != null ? musicPlayerSetting.hashCode() : 0;
result = 31 * result + (int) (frameSize ^ (frameSize >>> 32));
result = 31 * result + (int) (totalFrames ^ (totalFrames >>> 32));
temp = Double.doubleToLongBits(sampleRate);
result = 31 * result + (int) (temp ^ (temp >>> 32));
result = 31 * result + bufferSize;
result = 31 * result + (int) (framePosition ^ (framePosition >>> 32));
result = 31 * result + (elaspsedTime != null ? elaspsedTime.hashCode() : 0);
result = 31 * result + (elapsedPercentage != null ? elapsedPercentage.hashCode() : 0);
temp = Double.doubleToLongBits(elapsedPercentage);
result = 31 * result + (int) (temp ^ (temp >>> 32));
result = 31 * result + (errorMessage != null ? errorMessage.hashCode() : 0);
result = 31 * result + (isPlaying ? 1 : 0);
return result;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ public void nextMusicFile()
}

musicPlayerSetting.setCurrentMusicFile(musicFiles.get(currentMusicFileIndex));

saveConfiguration();
}
}

Expand All @@ -132,7 +130,7 @@ public MusicPlayerState getMusicPlayerState() {

double fractionalProgress = (int) Math.round((double) musicPlayerState.getFramePosition() / (double) musicPlayerState.getTotalFrames() * 100);

musicPlayerState.setElapsedPercentage(fractionalProgress + "%");
musicPlayerState.setElapsedPercentage(fractionalProgress);

int secondsElapsed = (int) Math.round((double) musicPlayerState.getFramePosition() / musicPlayerState.getSampleRate());

Expand Down
13 changes: 13 additions & 0 deletions controller-web/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false

0 comments on commit 0dae4f3

Please sign in to comment.