Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
2 answers
310 views

Visualize Python data in JavaFX with Py4J

For a larger project, I need to build a bridge between a Python and a Java programme. I decided to use Py4J and constructed a smaller problem to familiarise myself with the first steps. Java is ...
Misi's user avatar
  • 63
3 votes
1 answer
234 views

Parsing Java's class file

The structure of a class file consists of a single structure (presented here using pseudostructures written in a C-like structure notation): ...
Madagascar's user avatar
  • 10.2k
3 votes
1 answer
112 views

Java i/o speed less than python i/o while printing an array

Motivation: I was solving an array based i/o problem and encountered Time Limit Errors, it was later found that the code for java ran roughly 10x slower than the ...
the_illuminated2003's user avatar
6 votes
2 answers
2k views

Identifying arrays with the same mean

I came across a problem where given a array of integer arrays of different lengths [[1,2,3],[4,1,1], [9,2,1]] you need to return an array of arrays, each array ...
beginnercs12's user avatar
7 votes
1 answer
328 views

Format an English-language count of items

I started reading Robert Martin's Clean Code. I'm trying to "translate" all his examples into Python, so I can understand them better since my knowledge of Python is greater than that of ...
revliscano's user avatar
1 vote
5 answers
13k views

LeetCode 1: Two Sum

This is an easy level LeetCode question, obviously not much code to review. I'm posting C++/Java/Python here. If you'd like to review, please do so. Thank you! Problem Given an array of integers, ...
Emma Marcier's user avatar
  • 3,712
8 votes
2 answers
2k views

Python-style Generator in Java

I have implemented Python-style generators within Java. I might be reinventing the wheel here, but I feel that the ability to define a Generator with an anonymous class is the most flexible approach. ...
Avi's user avatar
  • 181
4 votes
1 answer
148 views

Pycharm plugin for imports cleaning

I have written Pycharm plugin for integrating pycharm with tidyimports. I have followed steps mentioned in Simple Pycharm Plugin Example. Below is the code that I have written, it works but I need ...
ThinkGeek's user avatar
  • 271
2 votes
0 answers
362 views

Streaming video from PiCamera to Windows using Java and Python

I'm making a robot with Raspberry. My goal is: Code a server on Rasbperry using Python that captures the image from camera and sends data via socket Code a client on PC using Java that reads data from ...
Fabio Mancuso's user avatar
2 votes
3 answers
252 views

isPrime functions in Python and Java

This Python code looks messy to me. Am I doing any wrong style, or is this how Python looks like? ...
Srinath Ganesh's user avatar
16 votes
1 answer
7k views

Streaming H264 video from PiCamera to a JavaFX ImageView

I'm currently working on a robotics application where a video feed is being displayed from a Raspberry Pi 3. I've been working on a way to stream the video directly into JavaFX (the rest of the UI is ...
flakes's user avatar
  • 1,945
5 votes
3 answers
330 views

Java String iterations

I am working with some Java code. Basically I have a wrapper class that holds a string and implements some of the many useful python string methods in Java. My goal here is to implement the Python ...
Tom's user avatar
  • 567
10 votes
3 answers
290 views

Getting funky with Pi

Push a button and an LED lights up1 and sends a signal to another computer that plays a song. First project on the Raspberry pi, really simple but definitely fun and educational to implement. Also, ...
Legato's user avatar
  • 9,929
-1 votes
1 answer
909 views

"Data Abstraction" and "Abstract Data Type" for a rational number [closed]

Below is implementation 1 of data abstraction for rational number using functional paradigm written in Python: ...
overexchange's user avatar
  • 3,401
4 votes
2 answers
240 views

Python vs. Java Runtime on Euler 22 - Name Scores

I want to know why Java is accepted over Python when it comes to runtime. On performing the following Euler problem, Python takes up less lines and runs faster (Python ~0.05s, Java ~0.3s on my machine)...
user12740's user avatar