John Morgan

Ranch Hand
+ Follow
since Jul 31, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
12
Received in last 30 days
0
Total given
30
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Morgan

Just to clarify what I am trying to do. We have an application that sends overnight batch printing jobs to remote printers in different cities. Not all these printers have SNMP turned on for various reasons and some times the printers are changed with a different make and model without our knowledge. So what I am trying to do is reach out to the printer, grab the make and model, check that against an approved list of makes and models from our print server and if it is okay then send the print job, if not then send an email to the person in charge of that printer stating their batch print was not sent as the printer was not on the approved list. Most of this we have covered, except getting the hardware information.

Thanks for all the suggestions so far.
2 years ago
I am looking for a way to get the make, model and hardware version of a network printer. I found the following code but it only brings back the name not the information I need. Any suggestions on getting the information I need?



TIA
2 years ago
How is this written for complete novices to Spring? Is the book easy to follow or do you need some previous background in writing spring applications?
3 years ago
Okay so following the advice above I am adding some error checking based on the date but I am running into a couple of errors...

Here is my demo code



And here are the results:


The only date that is coming back correctly is the only one that is in the Simple Date Format... all others are either wrong date or unparseabel.... any suggestions on what I am doing wrong?
3 years ago
Mike Simmons you are correct... the SQL query used to generate the report, the raw CSV file is the same, the excel version is the same and yet when I run the application I can take spreadsheet A and it runs fine; without closing the application I chose spreadsheet B and I get the error. I am trying to wrap my head around why this would be.

Oh and I have tried the suggestion of just samples and I get the same problem.... 60K likes and I had it down to 1K and still the same issue and it happens on the first record of every iteration.

I think you are right about choosing different formats and run it through an IF/THEN statement but I just cannot figure out why this is happening in the first place as literally nothing has changed from what I can tell.
3 years ago
Correct... however the information has not changed. The spreadsheet still has it in the correct format. I even went so far as to save the new sheet as a CSV and then re-import it into excel and I still run into the same problem. I looked at the new CSV file and the date is correct so there is no reason I can see why this would change.
3 years ago
yes... the formats are the same.

I am using POI to read the excel database.
3 years ago
Here is the information I get back as well as what is on the spreadsheet.

New File
DOBCell         20-Sep-1983
Info               John Doe Mon Feb 04 00:00:00 PST 26
Spreadsheet   John Doe 1983-09-20

Old File
DOBCell         1983-09-20
Info               John Doe Tue Sep 20 00:00:00 PDT 1983
Spreadsheet   John Doe 1983-09-20
3 years ago
I am running into a problem that no matter my research I cannot figure out how to fix.

I have a spreadsheet that I am reading a date from (I get one each month and it all worked fine until recently) Now all of a sudden I am getting a "java.text.ParseException: Unparseable date:" when reading the date field. My code has not changed and I have even gone back to the previous spreadsheets and it works fine, and the SQL script to create the spreadsheet has not changed but for some reason I get that error.

My Java code is as follows:



Oh and I should note that I have tried different formats on the excel sheet as well as confirming that the format is the same on the other sheets.... anyone have any suggestions before my bald spot gets any bigger from pulling my hair out?

TIA
3 years ago
Tried "ng build --prod --deploy-url /newapp/ --base-href /newapp" to no avail... still have same error.
I have an app that is in a sub-directory off the main page of my main app that is totally independent of anything else. When I go a "ng build --prod" it looks for all the asset files on the main page and not in the sub-directory.

example
mainpage.com is my primary page
mainpage.com/newapp is where the new app is
mainpage.com/newapp/assets is where all my images are (there are only 6 so I did not create a sub-direcotry)
mainpage.com/assets is where the compiled version of the app is looking for the images.

I do have  <base href="./"> in my index.html file and it works fine when running on my local server (ng serve -- localhost:4200).

Any suggestions on how to fix this?
Does anyone here have any experience with these two?
Which did you consider better?
Is one better suited for enterprise applications versus smaller app?
What were your trials and tribulations with them?

My company is looking at a new application to be built and want to ensure we have all of the information ahead of time and this was one suggestions that we use.

Thanks.
Not sure if this should be here, or in the JavaScript or the Database forum but figured I would start here.

I am working on a tutorial for locking down Angular routes (https://catalin.me/role-based-authentication-with-angular-express-jwt-mysql-part-1/) and have run into a error: "Dialect needs to be explicitly supplied as of v4.0.0".

My code is as follows:

config.js (not the Dialect is herer on line 17)


database.js (This is where the new Sequelize comes into play)


user.js


server.js


passportStrategy.js


I have read through various documentation on this but none of the suggestions seem to work for this instance.  Any suggestions?
I found something close to what I want to do but it does not seem to work in angular...


It should just make the location for the router link reset to the base without moving me on the page at all.