Stuart Lord

Ranch Hand
+ Follow
since Oct 27, 2006
Stuart likes ...
MySQL Database Chrome Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Stuart Lord

Hi Paul & Fred

Thanks for your comments about this subject, which are interesting. In a nutshell, the issue is that Windows 10 is a freebie. With any free gift, there is no legally binding contract and hence no onus on the provider to do anything to fix it if problems come to light. Maybe after July, when people start to pay for 10, Microsoft will be a lot quicker to fix issues or else face court actions.

I am and have been sceptical of Microsoft's attitude to Open Source products. They appear to want to tie their usership down to their ways of doing things, which follows logically if they want to create a monopoly over computing software in general. In this vein, it is pretty certain that the reason why Java works on 10, is because it is the property of Oracle, who have the legal clout to take on Microsoft in the courts.

As for how many have migrated to 10, well this Windows 10 usage stats makes interesting reading, what would be even more interesting would be to see how many have reverted back to 7 or 8..

I look forward to further comments..
7 years ago
Kevin and Jesper

Thanks for your comments and thoughts. At this stage I'm inclined to be cautious and not upgrade - the Freezing Start Menu in 10 is for me a real show stopper and reported it recently (within the past week or so). Since that aspect of the interface is integral to any version of Windows, Microsoft will have to fix it, before I for one migrate my computer.

I could mention how Microsoft have an unfortunate habit of treating their customers (i.e. users) as the final testers of their new products. (e.g. Vista was half -tested when it was released). However that observation is stark, staring, obvious!

The following seems to offer some help

Windows 10 Start menu problem fix(?)

But I may decide, like one contributor to the discussions on this site, to wait until my PC dies, then buy an Apple instead..
7 years ago
I am currently running Windows 7 on my home PC and finding that it works very well. It is a 'mature' OS with hardly any serious issues, if at all.

As any Windows user knows, who hasn't switched to 10, they will have been bugged by a desktop popup, prompting them to switch, before the July 29 deadline for a free ugrade.

Recently this tactic has become more aggressive, with the message telling the user that they have been scheduled for a download and auto-installation on a certain date and time. Clearly Microsoft are desperate to get any many as possible running the latest version of Windows.

However the latest reports on (for example) tell of the Start Menu in Windows 10 freezing and the user having to apply a manual fix!.

Microsoft have furthermore not given any assurances that this problem/bug/botch-up has been cured in the latest release of Windows 10.

I have 2 sets of questions:

Reliability Issues
1. Is it worth switching now or better to wait until July in the hope that the bug that I described has been fixed?

Java on Windows 10
2. How is Java treated on Windows 10? Is it easy for example to open the equivalent of the Command Prompt window and enter DOS commands? How do Java Updates work (or not!) on 10?

I look forward to getting any comments or suggestions.

7 years ago
Hi Dave - thanks once again for your help and observations. So to summarise:

* Use 0x or 0b in source code in front of a value - e.g. 0xA3 - this tells the compiler to treat the value after it as a Hexadecimal integer or if 0b as a Binary integer.
* This code merely takes a String value from the command line and parses it into an int, then displays it as an integer value.
If you want to get the character representation of that int then you have to downcast it into a char thus:
* In order to cope with Hex values in the command line, use instead. This parses all the values in the command line into the codeValues array. Bearing in mind that Hex 76 is Decimal 118 and the character representation of that is v, whereas the character representation of Decimal 76 is L..
7 years ago
Hi Paul - thanks for your observation. I actually refered to the Sinclair ZX Spectrum character set, which is described in another Wikipedia article as a variant of ASCII. So it seems that I've confused an ASCII variant with ASCII...!

Microcomputers are a relic of the 1980's and early 1990's, but machines like the ZX Spectrum did fuel an interest in computer programming and home computing. This, I contend lead indirectly to the World Wide Web and the creation of Java as a specifically internet-oriented language. Of course once you have computers being used by speakers of many of the worlds languages, then it isn't hard to see why Unicode came along to accomodate the many different character sets in use.

Interestingly our current society has recognised the value of encouraging interest in computing, with the Raspberry PI being used in schools today - which is what the BBC B Micro attempted to do in the 1980's...

Dave - thanks for your further help. So the lesson is: if you want to display a hex value as a char, then it must be prefixed by 0x.
7 years ago
Hi Paul

Thanks for your help - its clear to me that the enhanced for loop will not work in this situation.

Re. your earlier comment,

And a minor point: what they wrote will work for all Unicode characters.

yes, I agree that the code:
public class SingleCodeDisplay

outputs the £ sign - but only if you use a decimal value. If you substitute 163 for its hex equivalent - A3, then you get the compilation error message: error: cannot find symbol
char c = A3;
symbol: variable A3
location: class SingleCodeDisplay
1 error

so I will find a way of converting hex to decimal...

Incidentally, I notice that the old ASCII value for a £ - 96 - is now 136 or A3 in Unicode.
7 years ago
Hi Junilu

Thanks for your input and the 2 alternative ways of putting the value in codevalue into a char.

I have now developed the class - as I mentioned earlier - so that it reads in an array of values from the command line.

The following class

when given the command line values:
76 101 116 32 116 104 101 32 98 101 115 116 32 115 116 97 114 116 117 112 115 32 97 112 112 108 121 32 116 111 32 121 111 117

outputs : Let the best startups apply to you

I have one final question - when I use an enhanced for loop in line 10, thus:

the compilation fails with the message: error: incompatible types: String cannot be converted to int
for (int x : args)
1 error

Why does the enhanced for loop not compile, when both versions of the class access the args array and the control variable and the codevalues array have not been renamed?

I would hazard a guess that it is actually Integer.parseInt that it isn't happy with the enhanced for loop.
7 years ago
Hi Junilu

Thanks for your input - the change to the System.out.println statement gives the desired result.

The code now reads

So when you downcast an int into a char and display it, you get the character which that code represents. Bearing in mind that the number 1 is represented by code 49 (Let me know when your head stops spinning! ).

As for one liners - I would say that is more obvious, as to what the computer is doing, over against , but then maybe others would like to give their opinions...

I'll develop the class so that it does the same for an array of values - in somewhat slower time
7 years ago
Hello Paul

Thanks for your help. I had already tried your suggestion and the following code

gives this error on compilation: error: incompatible types: possible lossy conversion from int to char
char c = codevalue;
1 error

should I be casting the int as a char and if not how do you parse the value in the int named codevalue into a char?

I look forward to your comments.
7 years ago
Hi Campbell - thanks for your input. To be brief and to answer your question, the following code, will display a dollar sign, (36) but not pound sign (96). In fact you get a ' instead, but I seem to recall that originally the £ sign wasn't even shown on some keyboards.

What I would like to do is to parse the first argument in the command line into the char - as per Dave Tolls second suggestion - but can't see how this is done.

Any suggestions or pointers would be welcome.
7 years ago
Fred and Carey - thanks for your input on this topic.

I am inclined to agree with Fred when he mentions "extended ASCII"

This article in Wikipedia clarifies the matter when it describes the ZX Spectrum charater set as a

variant of ASCII

Wikipedia - ZX Spectrum character set

Incidentally Fred Kleinschmidt's example in Java:

can be accomplished in 1 statement in Sinclair BASIC:
which gives "£"

Naturally I prefer Java over BASIC
7 years ago
Dave, Fred and Paul

Thanks to you all for your speedy replies. I can't believe that its as simple as that, but then this must surely have been one of the fundamental considerations when Java was first written.

Paul - re. your comment about Unicode and ASCII, I suppose it made sense to the creators of Unicode to simply extend the ASCII codes and keep the same first 128 numbers. This question was sparked by (would you believe) a job advert, which simply gave a string of codes, which converted into a message. I assumed that they were ASCII codes, but they could equally have been Unicode.

The Sinclair ZX Spectrum microcomputer of 1980's vintage actually had a 256 code 'character' set. Codes 0 to 5 were not used, and every key press or combination of key presses, on the Spectrum keyboard equated to an ASCII code. So for example the BASIC GO TO command was ASCII code 236, etc.. Of course with the advent of Unicode, this code will generate something different, when put into a char in Java...
7 years ago
I would like to find a class that will convert ASCII codes to characters.

For example it should convert the following ASCII codes: 76, 101, 116 to the characters Let

Any help would be much appreciated.
7 years ago
I am currently involved in the development of a MySQL database and intend to develop a web-based front-end for it using an PHP-based Open Source tool called Xataface. I would also like to identify a suitable PHP reporting engine which could 'bolt on' to Xataface.

Does anyone have any suggestion please?
9 years ago
This problem has now been resolved by installing the latest version of Java - jdk-7u11-windows-i586 - for my version of Windows which is XP Home SP3.

Many thanks to all those who offered help - in the end Oracle sent me an email advising that I download the latest version.

Stuart Lord
11 years ago