Jump to content

DtrollMC

Member
  • Posts

    443
  • Joined

  • Last visited

Everything posted by DtrollMC

  1. Sounds like what Ionic is as well
  2. Not exactly sure how TensorFlow works exactly, you'd need to learn natural language processing as well if it will be answering questions.
  3. I've been reading a few books lately, one of them being Java EE 7 Development with NetBeans 8 (Heffelfinger), and I keep having problems with making the named beans. They seem to work sporadically, sometimes the bean works, other times (most times) I am greeted with this lovely error: /index.xhtml @8,56 contracts="#{themeSelector.themeName}" WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped When I restart Glassfish, and re-run the application, it will work again. Why is this? Is there any simple way to prevent this? This is generally the bean I am trying to implement: package com.carvethsolutions.beans; import java.io.Serializable; import javax.enterprise.context.RequestScoped; import javax.inject.Named; /** * A simple Named Bean to select a theme on the webpage * @author John L. Carveth */ @Named @RequestScoped public class ThemeSelector implements Serializable { private String themeName = "dark"; public String getThemeName() { return themeName; } public void setThemeName(String themeName) { this.themeName = themeName; } } and I access the named bean in the xhtml pages using: #{themeSelector.themeName} Anyone familiar with Java EE, JSF, to help with this?
  4. This forum helps me while programming a ton, and I don't even have to make a post, or even read them! Sometimes, I'll have a problem with my software, and I'll start typing up a forum post to ask for help, only to understand my problem by the end of writing the post, and I never end up posting it. Anyone else do this?
  5. I would argue constants are a different case, as you wouldn't have a class with all caps. The best naming practices can go a long way in telling others what something in your code does. Always good to preach the best practices
  6. public static String console2 (String PrereqString) { Scanner console = new Scanner(System.in); int number = 1; String prereqs = ""; while(!prereqs.equals("done")){ System.out.print("List pre-requisite#" + number + "(enter done, if finished with prerequisites):"); prereqs = console.nextLine(); number = number + 1; PrereqString = PrereqString + " " + prereqs; } return PrereqString; } You should use code blocks to make the code more visible. I don't understand what this code should be doing, but I see a problem with this line: PrereqString = PrereqString + " " + prereqs; Variables need to have a lower case name. preReqs or prereqs. In Java, Class names are capitalized, so this whole line syntactically is incorrect. I'd suggest the following: public static String console2(String preReq) { Scanner console = new Scanner(System.in); int n = 1; String input = ""; while (!input.equals("done")) { System.out.println("..."); input = console.nextLine(); n++; preReq = preReq + " " + input; } return preReq; } I don't understand the code, but this code works and stops when done is entered: import java.util.Scanner; class Testst { public static String console2(String preReq) { Scanner console = new Scanner(System.in); int n = 1; String input = ""; while (!input.equals("done")) { System.out.println("..."); input = console.nextLine(); n++; preReq = preReq + " " + input; } return preReq; } public static void main(String[] args) { console2("test"); } }
  7. I'd suggest looking around locally to you, like Kijiji / etc, see if you like anything you see. Maybe hit up a graphic design school / class at the Uni and post a sign saying your hiring.
  8. I just know a lot of Artists have to deal with people expecting them to work for free lol
  9. Keep in mind no one will do this for free.
  10. Storing your results in a collection, sorting the collection, getting the first/last entry. Or, store a max variable (start it at 0), and every time you read a percentage, compare it to the max, if it is greater, it is the new max.
  11. All I've ever used Docker for was running Umple on a local machine vs using the website.
  12. This is not academic, trying to learn more about J2EE, JPA, and business programming in general. Your first suggestion makes sense, have a Product table, and then an inventory table. When building this application I am imagining it for small businesses who still track most/all of their inventories / orders manually. I want the program to be scallable to larger businesses as well, could you expand on what you mean by learning how to write indexes or store procedures? If my store procedures you mean defining queries for the business objects, I will be doing that in the Entity classes.
  13. yes, as that is the association shown in the diagram.
  14. I am working on designing an Inventory Management Software, using JSP, JPA, and either SQLite or MySQL. The software needs to catalog a company's products, their names, desc, cost, price, etc. That could be represented by a Product object like this: But in this IMS, I want to be able to track product expiry. For example, a company that sells scones buys Milk and Cream, some bags have different expiration dates than others. So I thought to have another item, ProductItem, exist as a Many to One relationship to the Product object, and would then have an expiry property as well as a quantity: That way, the Product class can calculate the total stock of the specific item by adding up the quantities of all ProductItems with a matching product. I am looking for ways to improve this design. Is there a more efficient way to go about tracking different data on pieces of a whole?
  15. I will look into that. Haven't done any multi-threaded programming before. Using Kotlin
  16. Hey guys, so I'm messing around with 2D arrays and simple terrain generation algorithms. I know that the two algorithms I wrote are not very efficient, but I have gotten the results to display under certain settings. However, when I try to increase the size of the matrix I am generating / displaying, all the steps are done but the GUI just never shows up. What could be causing this? The source code is only a few classes, so it won't take long to check out. Don't judge the code too much as I just refactored how the UI was structured so things are still messy. https://github.com/JLCarveth/Voronoi/tree/master/src/com/github/jlcarveth
  17. Seems to be a lot of love for C#! What sortof programs are you making with the language? I've only ever used it once, in Grade 12 for Unity, don't really remember it much, but I remember I liked it! Might have to pick it back up again, though all I've been doing lately is an Android Library..
  18. Hey! I am bored and drunk, just wondering what everyone's language of choice was. Personally, I've been programming a lot in Kotlin / Java, because the structure of the languages and programs makes the most sense to me. How about you, what language do you find yourself using the most and why?
  19. If it weren't for Google Maps, many people would be lost.
  20. There is only one thing you can do that will Really make you a good programmer; programming. The more you do it, the better you get. Start wiith a small project, perhaps a simple Text Editor, and try to keep the program organized / structured while making new features for the Text Editor (only an example). I'll also suggest some actual concepts you should learn very very well as a good base of knowledge: Understanding Boolean Logic Loops, conditionals Data Structures (make your own implementation of a Stack, Queue, or LinkedList (with an Array or Linked Nodes)) There are many more data structures. Object Oriented Programming Design Patterns
  21. I have a ton of usb flash drives laying around, from 8GB to 140GB. What are some cool things to do with some of them?
×