Steve Dyke

Ranch Hand
+ Follow
since Nov 16, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
15
Received in last 30 days
0
Total given
71
Given in last 30 days
1
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Dyke

Bear Bibeault wrote:Use the debugger or console.log to see what each factor in your conditional expressions equates to individually. Make sure that they are all as you expect.

Also, prefer !== and === in comparisons. That way you get xact comparisons without coersions.



Thanks. Changed code to following and all is good now.

This code always returns false even though the attributes have the following values:

FAIInspectionGeneralData: inspectioncategorylist: 2 faietqcn: 48749 Trimmed: 48749

Paul Clapham wrote:

Steve Dyke wrote:A remote data look up get a date 04/25/2025.



Okay. But is this date value in that code a LocalDate, or an SQLDate, or some homebrew sort of date, or what?



It is pulled via sql as a String: 04/25/2024
4 weeks ago

Paul Clapham wrote:Well, yeah, if you try to parse a string like '2022-04-25' using the format 'MM/dd/uuuu' it isn't going to work. The most straightforward fix would be to use a format which matches the format of the strings you're producing.



I see now format should be uuuu-MM-dd.

Suppose I have a LocalDate with the format 2022-04-25.
A remote data look up get a date 04/25/2025.

How do I get the remote date changed so I can compare the two dates?
4 weeks ago
This is my code but it is generating an error on third line:
SystemErr     R java.time.format.DateTimeParseException: Text '2022-04-25' could not be parsed at index 2

4 weeks ago

Carey Brown wrote:Any reason why 'lastShippingAddress' is not the same type as 'vendorAdd1', i.e. 'String'?


Sorry, but on my initial code I did not list all of the Vendor properties.

The Vendor records are pulled into my application from a remote data source as a list of Vendor objects.
There is a property for Vendor Code, Vendor Name, Street Address 1, Street Address 2, City, State, Zip, etc. This all represents the Vendor default data.
Therefor the Vendor address is made up of several properties.
Some times we will ship to an alternate address, maybe several times. Instead of our Purchasing agent retyping this alternate address every time I save the LastShipedAddress into a remote data file with a field that links back to the original Vendor record.
So both a remote Vendor record has the same structure as a LastShippedAddress record.
When a Vendor record is selected the Purchasing agent can leave as default address of chose the alternate LastShippedAddress.
1 month ago

Carey Brown wrote:

I am sorry I can't describe this more precisely.

1 month ago

Carey Brown wrote:You have confusing variable names for lastShippingAddress, one place it's of type LastShippingAddress and the other it's Vendor. Fix that first.



Not sure what to do to fix this.
The LastShippingAddress Object has a property of Vendor()
Vendor has a property of LastShippingAddress
1 month ago

Liutauras Vilda wrote:

Steve Dyke wrote:This creates an infinite loop



Do you have an idea why would that happen?



Yes I understand why it is looping.
I am just curious is there a way to do this without having to set private Vendor lastShippingAddress = new Vendor(); to null
I am trying to move away from setting any object properties to null.
1 month ago
This is my vendor object. As shown one of the properties is LastShippingAddress.






This creates an infinite loop unless I change  public Vendor lastShippingAddress = new VendorV8(); to public VendorV8 lastShippingAddress = null;
Is there another way to do this without setting to null?
1 month ago
Like most of my issues that take the most of my time to figure out, this one took about 5 hours and the help from this forum group.
The first time I tried the code a blank file was created with my merge file name.
The code failed but I did not realize the blank file had been created.
So every attempt I made thereafter, changing code to test, gave me the Access Denied message.
I was attacking the wrong source. After I removed the blank file, everything started working as expected.
4 months ago

Tim Moores wrote:Are you using a current SMB implementation like https://github.com/AgNO3/jcifs-ng?



Using jcifs-2.1.35.
I use this for my entire application with no issues.
This is just the first time I am attempting to use the merge utility.
4 months ago

Tim Holloway wrote:Most likely cause is that one (or more) of your URLs didn't form the way you thought it would and I'd add some log messages to see what you're actually getting.



This is what the System.out.println is showing:
FAIReportToJasper: pdffilePathMerged: smb://sgai-fs02.corp.zodiac.lan/qmsattachments$/QMSAttachments/Temp/FAIReportMerged_4248917.pdf

My scenario is I write three pdf files to a particular directory. Then I want to merge them into one pdf file.
This is all done on the same share. The three files are written just fine and accessible using HTTP.
I also use the same cifsContext parameter for all the smb access.

So I am trying to understand why I can write the initial three files to the share but not the merged file.

4 months ago
In my following code I get "FAIReportToJasper: jcifs.smb.SmbException: Access is denied."
On this line of code: out = new BufferedOutputStream(new SmbFileOutputStream( new SmbFile(pdffilePathMerged, cifsContext() )));

4 months ago
I want to get properties from a class that has been assigned to a Session Attribute in Javascript.
The following code will return undefined for both hospitaliteminput and hospitalitemDescription

My server code:


My JS Code:
5 months ago
JSP