Skip to content

Instantly share code, notes, and snippets.

@DeepSky8
DeepSky8 / CopyFile.java
Created September 2, 2015 00:13
On line 22, the "int len;" is declared on line 22, and then initialized with a value on line 23, correct?
package com.lynda.files;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@DeepSky8
DeepSky8 / CopyFile.java
Created September 2, 2015 00:13
On line 22, the "int len;" is declared on line 22, and then initialized with a value on line 23, correct?
package com.lynda.files;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@DeepSky8
DeepSky8 / issueList.html
Last active August 29, 2015 14:22
Throws this error: Could not parse as expression: "returnId(${issue.id})" (issueList:23)
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Issue Tracker -- Issues</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css" />
</head>
<body>
<a href="/issues/new">New Issue</a>
<a href="/issues/search">New Search</a>
@DeepSky8
DeepSky8 / Application.java
Last active August 29, 2015 14:20
Adding an ENUM to represent the issue's current stage. This must be changable as the issue moves through the resolution process. Application.java lines 37-39 don't currently recognize ENTERED, PROGRESSING, or REVIEWING as enums - java is currently trying to resolve them to variables. IssueController.java line 90-93 doesn't recognize the enums I …
package com.kyrlach.issuetracker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.kyrlach.issuetracker.issue.Issue;
import com.kyrlach.issuetracker.issue.IssueRepository;
import com.kyrlach.issuetracker.login.User;
@DeepSky8
DeepSky8 / IssueController.java
Last active August 29, 2015 14:19
Code compiles. Search executes, and the loggers indicate that when no checkbox is marked for categoriesA and difficultiesB, the correct values are supplied. The logger on line 79 also indicates the Issue(s) that are being found by the search on line 77. The browser displays issueList.html, but it doesn't show any of the Issues that the logger on…
package com.kyrlach.issuetracker.issue;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@DeepSky8
DeepSky8 / IssueSearchForm.java
Created April 13, 2015 19:10
Struggling to set the default values in "difficulties" to specific integers
package com.kyrlach.issuetracker.issue;
import java.util.ArrayList;
import java.util.List;
public class IssueSearchForm {
private String title;
private String description;
private String category;
private List<Integer> difficulties;
@DeepSky8
DeepSky8 / IssueController.java
Created April 10, 2015 17:00
Trying to get issueList.html to display search results, not just the database list of issues
package com.kyrlach.issuetracker.issue;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@DeepSky8
DeepSky8 / IssueController.scala
Last active August 29, 2015 14:18
Trying to search a database through Hibernate
package com.kyrlach.issuetracker.issue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
package com.kyrlach.issuetracker.issue;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface IssueRepository extends CrudRepository<Issue, Long> {
List<Issue> findByTitle(String title);
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="file:///C:/Ongoing%20Projects/IssueTracker/PureCssLoginPage.css">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Issue Tracker</title>
</head>