Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!

Joe Ess

+ Follow
since Oct 29, 2001
Joe likes ...
Linux Mac OS X Windows
Forum Moderator
Joe Ess currently moderates these forums:
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joe Ess

I knew nothing about Docker before reading this book and I found it a good introduction to the subject.  
There is a whole lot more to learn about containers, for example, it sidesteps Kubernetes (and rightly so, seeing as how that is a whole subject on its own).  That said, it is a solid starting point.
3 weeks ago

Ryan McGuire wrote:We're 95% (probably more) a Windows shop.

You make it sound like there's no Linux there!    The data center will spin up a Linux VM for a couple hundred bucks.

paul nisset wrote:I went through a bad/time wasting experience  with Docker for Windows on a Windows 10 laptop.

I tried Docker Toolbox on a maxed-out Windows workstation and had no end to problems.  I installed Docker on a Linux virtual machine on that desktop and it worked fine, at least for some academic work.
3 weeks ago

Mina Asj wrote:
I'm new here pleases don't be too harsh

We are never harsh!  
Start simple.  Try to prompt the user for a string, then print out the characters in the string one by one.  Once you have that working, you can try to add a comparison in the loop.

Mina Asj wrote:
also how would you solve this with a while loop and for-range?

Once you get the first task done, you'll understand a little more about looping and testing.  Then you can consider how to do it with other loop types.  
While loops are documented here
For loops are documented here

If you have further questions, don't hesitate to ask.  We are happy to help, but we want you to do the work so you can learn.
1 month ago

Simon McNamara wrote:GNURadio simply requires PyQt4 (I received the same error). I would not be surprised if GNURadio requires the older module PyQt4.

Keep in mind that I don't know gnuradio from a hole in the ground but this seems to indicate that gnuradio depends on PyQt5

Simon McNamara wrote:
How would I find the correct path for python3? The path to python2.7 seems totally different (e.g., something like /usr/lib/python2.7).

The *nix command is "which".  On my Mac:

My Raspberry Pi's aren't plugged in just now, but those are the same paths as on the Linux Mint computer I have hooked up to my TV.  It's based on Debian as is Raspbian (if that's what you are using on your Pi).
1 month ago

Simon McNamara wrote:

For the life of me I cannot get my PyQt4 problem resolved.

According to this, PyQt4 is no longer actively developed or supported.  I wonder if PyQt5 would play better with Catalina.

Simon McNamara wrote:
The shipped version of python for MacOS is 2.7.x .

I have a two-week old install of Catalina and I have Python 3.7.3 as well as 2.7.16.  Open an terminal and enter "python3".  If you haven't installed it, it will prompt you to install the Command Line Developer Tools, which includes Python 3.
1 month ago

Simon McNamara wrote:
This java compiles and runs fine, but doesn't launch the python. No exceptions. No nothing.

If the problem is with the Python script, as it appears to be, you would not get an exception on the Java side.  Errors would be written by Python to Standard Out or Standard Err and you would need to read from those streams in order to capture them (and you should read from them.  They are buffers of limited side, and if they get full, your application stops).  
Have a look at this article for some of the pitfalls with using Runtime.exec().
Have you installed PyQt4?  I do not think it is included with the standard Python distribution.
1 month ago
Java uses something called Pass By Value.  This means that when you pass an object to a method, the method receives a copy of the reference to the object, not the original reference to the object in the caller.  Changing the "output" reference in handleRequest does not change the value of "output" where you called it.  What you can do is change the contents of output in handleRequest.  Since the two references point to the same instance of OutputStream, you would get the desired result.  
I think it is a better practice to use a return value rather than to change a method parameter (that's why Java is Pass By Value in the first place).  It is easier to see where changes are taking place in the code and has less of a chance for unintended side effects.
1 month ago
It is declared by the Python Standard Library to return a String: Python Documentation
1 month ago
Why not use both?  I use Python as a prototype language and a sort of "scripting language on steroids" and I use Java for my professional projects (web applications for the most part).  There's plenty of developers using Python as their primary language as well.  
I found this book to be a helpful introduction to Python:
Think Python
1 month ago
Input from the console is a String.  You need to cast those values to int to use them as numbers.
1 month ago
I don't use Netbeans but I don't see an error.  
What I assume is happening is that the program is running through to its completion and the debugger is exiting with the error code 99.
Can you set a breakpoint on the "hello world" line?  That should halt the debugger.  
1 month ago
There are many changes between Struts 2.3 and 2.5.  The details are here.  There is a migration guide here.
I'm not aware of any issues with special characters, but I can't think of any in our applications.  There is a mention of New Locale Aware Conversion Logic in the migration guide which leads me to believe there may have been some internationalization changes.  We would need some more information to properly diagnose your issue, however.
1 month ago

Siegfried von Wyrm wrote:No help provided, only step-for-step instructions given as if the OP were an absolute buffoon.

Those step-by-step instructions are similar to what I do as a developer with 20 years experience.  It is way cheaper to change a design on paper than it is in code.  My team will spend hours working out a design on whiteboards before we ever consider sitting at a computer.   When I am coding and run into a problem, the first thing I do is take a walk.  If clearing my head doesn't lead to an answer, I hit the whiteboard again.  
I think what you wanted was someone to tell you what is wrong with your code.  Campbell was trying to tell you the problem with your code was your design.  You can't fix the design in code.  You do the design work before you code.
1 month ago

Wensley Brands wrote:Is it made with HTML,CSS,Javascript ?

The bottom of the page says "Made with Bulma", which is a CSS framework.  Right click on his page and select "View page source" and I think you can get a good idea as to how that page functions.  
Vaadin is a different way to go about building a web page.  Rather than manipulating DOM components with CSS, one works with Java objects.  You can certainly use it to create a simple web page.  The catch is that to use Vaadin, you will have to deploy the "page" on a Java servlet container like Tomcat.  Using HTML and CSS simplifies deployment because you don't need a servlet container.  What server resources do you have access to?
Spring Boot simplifies the creation and configuration of Spring applications.  I don't know about you, but I've run into problems with Spring trying to get the correct version of a dependency to work with a particular Spring library or figuring out which configuration switch to set in order to get the expected behavior.  You ever play Myst?  It's like that.
Spring Boot removes a lot of the mystery out of Spring by defining the expected behavior up front.  Dependency versions are explicitly declared, so one doesn't have to hunt around for the correct version of X to go with Spring version Y.  It can also embed a server (Tomcat, Jetty or Undertow) with the application which makes deployment easier and, I presume, using containers like Docker easier as well.
1 month ago