Norm Radder

Rancher
+ Follow
since Aug 10, 2005
Worked mostly with IBM mainframe assembly code. Loved IBM's VM OS.
Eastern Florida
Cows and Likes
Cows
Total received
38
In last 30 days
0
Total given
1
Likes
Total received
458
Received in last 30 days
2
Total given
87
Given in last 30 days
1
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Norm Radder

associate with a String and boolean value


Create a class to hold the values, create an instance of the class with the desired values and put that instance in the Map with the key.
5 hours ago
The Integer class is immutable.  I assume that the i++ statement creates a new instance of the Integer class with the new value.
The wait, notify and synchronize statements must all refer to the same object.  But the code changes what i refers to when i++ is executed.
1 day ago
Continually creating a new String from guessedLetters looks wrong.  Create it only as needed.
1 week ago
Why is there a % before the javac?  Try entering just javac
1 week ago

Parse them into Integers.


I assume the OP is trying to convert '1' to 1.  
One way is to subtract '0' from the character value.
1 week ago
I think Windows ignores the case.  Java is case sensitive.
2 weeks ago
NOTE:  THE CODE TAGS HAVE REMOVED PARTS OF SOME OF THE HTML STATEMENTS ???
Disabling HTML seems to have fixed it.


I have a html/js/css program for showing a folder of images.  Landscape images are mostly shown correctly.  But when I get to a portrait image its width is too wide and it shows a stretched image.  When I advance to the next image that is landscape it is shown with reduced width. If I then back up the to the portrait image, it is shown with the correct width.
I have several folders of images each of which have their own html file for showing them.  The html file gets the folder name from its name.  The idea being there would be one master source for the html files that could be copied and renamed to provide starting points for each  of the folders with the images.

How can I have the code show the portrait images correctly the first time?

Previous thread on similiar topic:  https://coderanch.com/t/713528/languages/Prevent-portrait-images-overflowing-screen

The html file:

The js file:

The css file:


Some lines from the list of images (LoadImageRefs.js) :

For this list of images, the .html file would be in the same folder as the WorldCruise folder and the images would be in the WorldCruise/jpg folder.

I'm struggling ...


Please explain.

Please wrap the posted code in code tags:  Select the code and press  the Code button.
2 weeks ago
Use the code in the first post with the } added correction.
The code in the second post has the error:  static reference to the non-static method

If you would copy and paste the code instead of posting an image, the contents of the incorrect statement could be copied into a post for an explanation.
2 weeks ago
Can you post the code that shows the problem?

To access non-static content in a class, you need an instance of the class and get or set methods in the class.
2 weeks ago
Earlier I saw a missing } at the end of the main method.  Add that to the code.

Also I see that that code is different from the code in the first post.  What changes did you make?

The code in the first post should work with the } added.
The code in the second post is the code with the quoted error message in the title.

Its confusing.
3 weeks ago
Please copy the full text of the error message and paste it here.  It should give the source line where the error is happening.

Also copy and paste here the actual code with the error.  The posted code has errors  (missing } ) and will not compile.
3 weeks ago
An int is a primitive.  There are not references to primitives.  A primitive variable holds the value, not a reference to an instance of a class.
3 weeks ago
The code on line 72 checks for message == null.  Then what happens?

Note: The code in that method lines 69 to 76 needs formatting to make it easier to read.
3 weeks ago