Glyndwr Bartlett

Ranch Hand
+ Follow
since Jul 30, 2018
I am not a programmer. I am learning as I go in order to create an award application for Scouts.
Australia
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
13
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Glyndwr Bartlett

This is what I was able to come up with after a LOT of trial and error:



Kind regards,

Glyn
Hi Paul,

Each <div></div> is at the top of the column instead of at the bottom near the horizontal line. So the <div></div> is aligned left instead of right; I think. So the "S" in "Short" aligns with the "L" in "Longer line". I want the "t" to align with the "e".

Kind regards,

Glyn
I have a table header that is angled to 45 degrees and I need to align it to the right/bottom. For some reason it will not change from aligned left. The header is dynamically created:



OR



The CSS is:



Once I have the alignment correct then I can work on the "translate(-90px, -200px)" to position correctly.

Kind regards,

Glyn

Hi Ron,

Sorry not sure what you mean (I am not a programmer). Do you have an example please?

Kind regards,

Glyn
4 months ago
Hi Tim,

Errors on this code:

Syntax error on token "final", float expected
Cannot use this in a static context
Cannot invoke getResource(String) on the primitive type float

Kind regards,

Glyn


4 months ago
Hi Tim and Ron,

The answer is:



Where "ScoutTranscript" is the name of the class the code is in.

Thank you very much for your help, much appreciated.

Kind regards,

Glyn
4 months ago
Hi Tim,

The Tomcat is set up for my by the hosting company. So I can not adjust it. Also, this is a test area and I want to be able to deploy the war to production with all the information. The images are static as they are only used for the PDF headings. I am not a programmer by trade so any code samples would be appreciated.

Hi Ron,

I tried your code and have the error "Cannot make a static reference to the non-static method getClass() from the type Object".

Thanks for all your help,

Glyn
4 months ago
I am trying to get an image to display on a pdf I am creating in java on the server side:

 

The image is stored in AwardTracker_NJE/WebContent/images. The error message I am receiving in the log is:



How should I be retrieving this image to use in this code to build the PDF please?

Kind regards,
Glyn
4 months ago
Hi Tim Moores,

Yes, thank you. By removing getServletContext() from the ScoutMain.generateE1 and all reference to it in the called program it now works. If I can ever catch the person who produced the GWT version I will ask them why it was in there.

Kind regards,

Glyn

Hi Tim Holloway,

I understand the first three paragraphs of your reply; however, struggling with the last. I obviously need some education in this area; which I will see to.

Kind regards,

Glyn
6 months ago
I have an issue trying to use getServletContext() on the server-side. This is marked as an error (underlined in red) and the hover over error is "The method getServletContext() is undefined for the type MySQLConnection" and the quick fix is to create the mothod.

I am using some code that was generated by someone else for gwtJava. I am now trying to use this in a JEE project. Unfortunately I have not been able to get help from the person who originally created this code and I am not a programmer and am learning as I go.


The ScoutMain.generateE1 has:



I have looked at:

Different ways to get Servlet Context

Why getservletcontext isn't found?

And the getServletContext() documentation, which I found very confusing.

I think I may be missing an import; however, cannot find which one.

Kind regards,

Glyn
6 months ago
I am using Bootstrap 3 date picker. I am short of space and do not want to display the glyphicon. However, when I remove the glyphicon (i.e., the three span lines) the calendar picker is permanently displayed (instead of only when you click on the date field).

How can I set the code to only display the calendar picker when I click on the date field?

jQuery:



HTML:



Kind regards,

Glyn
This is what I ended up doing.

HTML:



jQuery:



SQL:

             
7 months ago
I need to store a pdf (each pdf will be < 5 pages maximum) in a mySQL database (yes I know this is not recommended). The column is defined as mediumblob. The test pdf is 198 KB. I get the error "Errors occurred in addMedicalPlan: java.io.FileNotFoundException: " followed by a dump of the file " JVBERi0xLjcKCjQgMCBvYmoKKElkZW50aXR5KQplbmRvYmoKNS ......" and at the end "(The filename or extension is too long)".

I have managed to do this with images and have been trying to re-purpose that code to store the pdf; by researching articles and other questions. Unfortunately, for me, most of the example relate to PHP. I have been able to read the pdf and display it in the page with this code:

HTML:



jQuery:



Do I need to strip off  "data:application\/(pdf);base64", i.e.,  img2 = (img1.getAttribute('src')).replace(/^data:application\/(pdf);base64,/, ""); for the pdf? I do similar for storing my images (i.e., img2 = (img1.getAttribute('src')).replace(/^data:image\/(png|jpg|jpeg|gif);base64,/, "");). Is this superfluous for pdf files?

I then pass the pdf to be stored with ajax:



And the server side java is:




I am not a programmer and am doing this pro-bono and learning as I go for my organisation.

Kind regards,

Glyn


7 months ago
Hi Carey,

My apologies I could not find the javascript forum. Can I transfer this or do I close it and create a new topic?

Kind regards,

Glyn