Steve Dyke

Ranch Hand
+ Follow
since Nov 16, 2004
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
7
Received in last 30 days
0
Total given
11
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Dyke

Dave Tolls wrote:Along with Piet's suggestion, since you are (it looks like) getting a single field from the database (pathdef), I would recommend also using the DISTINCT keyword in you query.
That way you only bring back what you need, and won't have any duplicates.



I thought about that but since I am pulling potentially three different record set that will not work for an overall distinct list.

I wondered if I get all the potential values that need to match part number then run one sql but can you use a list clause in a prepared statement?
17 hours ago

Piet Souris wrote:Then why not make a Set in the first place, instead of a list? If order is important, it could be a LinkedHashSet,  or use Stream.distinct.toList on the lis with duplicates.



This is my new code but when I iterate thru it I only get one value(See last output in my Console output).



Console output

[6/23/18 18:11:18:380 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-B
[6/23/18 18:11:18:382 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-C
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-D
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-E
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-F
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-B
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-C
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-D
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-E
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: G-F
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-B
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-C
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-D
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-E
[6/23/18 18:11:18:383 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-B
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-C
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-D
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-E
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef:
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-B
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-C
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-D
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-E
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-B
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-C
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-D
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-E
[6/23/18 18:11:18:384 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-B
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-C
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-D
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-E
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-B
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-C
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-D
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O ATRHeaderDataPointList: pathdef: F-E
[6/23/18 18:11:18:385 CDT] 00000079 SystemOut     O COV8: ATR Path Def:G-B
17 hours ago
I would like to apply the Set interface on the existing list to eliminate the duplicates.

2 days ago
I have gotten it resolved by adding a class attribute to the radio button group:

I know that this line will not work after looking at it. Because it is referencing a class and the radio buttons only has a name attribute.

Bear Bibeault wrote:And, clean code points:

  • Dont use the same name for different things. You use the same name for an element class and for control names.
  • Use one of camel case or train case for identifiers with multiple words. Just running all the words together in lowercase doesn't follow any accepted convention.


  • Thanks for your help tonight.

    My modified code. But still not getting any response when I click on one of the radio buttons.

    Bear Bibeault wrote:The code isn't very useful without the HTML structure that it is instrumenting.

    Are you sure that your selector is selecting the elements you intend? That's about 75% of jQuery bugs.



    Sorry, I realized after posting I forgot the HTML:


    I have a div container that contains a group of radio buttons. I would like to check when a change event happens on the group and get the value.

    My code that does not work as I expect:

    I am building a list of Objects. I would like to check the list before the add method to make sure the element has not already been added.

    Here is a piece of the code that builds to list:

    3 weeks ago

    Bear Bibeault wrote:
    Surely you can use a name that is more readable? (Hint: camel-case)

    What is it supposed to contain? Did you look at the results of the JSP evaluation by doing a View Source in the browser?

    let code

    This is my servlet code:



    my parms class:



    This is the jsp code. Note that this works but I should be able to pass the object to the JSP and then in the js code get the class property values in lieu of each property individually.

    I posted a similar thread earlier but this is a little more info.

    I want to use my java class property values in javascript. This code returns undefined:

    I use java objects in the HTML code using JSTL all the time to populate lists.

    I would like to use a java class and its fields in my HTML without JSTL.

    I have attempted to assign the class object to an input element but the properties are displayed as undefined.
    I have a date(string) in the form of 4/6/2018 I need to change it to 040618.

    this code does not do what I was hoping for:



    Output is: Tue Jan 18 00:20:00 CST 5
    2 months ago
    I was able to make it work by placing an "/" at the end of the 'from' and 'to' paths.
    2 months ago
    The follow code only copies the directories but not the directory content.



    Example of console output:

    [4/3/18 7:09:47:548 CDT] 00000085 SystemOut     O SupplierDrawingList: file://gvsvr03/Drawings/Release PDF/VendorPrintsSpecsTestReports/AMSAFE/HISTORY/1027
    [4/3/18 7:09:47:548 CDT] 00000085 SystemOut     O SupplierDrawingList: smb://corp.zodiac.lan;srv.drawchg6zsus:Webabc6!@sgai-fs02/qmsattachments$/SupplierDocuments/AM-SAFE INC/HISTORY/1027
    2 months ago