Language Selection

English French German Italian Portuguese Spanish


Java Programming

Filed under
  • Java date format

    Date value needs to format for various programming purposes. One of the essential reasons to format the date is to represent the date value in a human-readable format. Many classes exist in Java to format the date value. DateTimeFormatter and SimpleDateFormat are two of them. These classes can be used to format date values in different ways. How these two classes can be used to format the date in Java is explained in this tutorial.

  • Java Enum Tutorial

    Java enum is a special Java type that defines by a Java class. It is also called the Java enumeration type. It is introduced in Java version 5 first, which is mainly used to define the collection of constants. The compile type of safety is ensured by using the enum type. So, when all possible values of the variable are known before compile time, then it is better to use enum type. It defines a class that always extends from java.lang.Enum. How enum type can be declared and used in Java are shown in this tutorial.

  • Java Abstract Class

    The concept of the abstraction is to highlight the task of the object instead of highlighting, “how the object does the task”. This type of concept can be implemented by using two ways in Java. These are the abstract class and interface. Abstract class contains the keyword abstract. This class can not be initiated like other normal classes, but a subclass can be derived by inheriting the abstract class. The features of the abstract class can be accessed by creating the object of the subclass. An abstract class can also contain the constructor that can be accessed by creating the object of the subclass class. How you can use an abstract class in Java is shown in this tutorial.

  • Java exception handling

    When the normal flow of the program execution interrupts for any error, then it is called an exception. This type of event can be handled by using a try-catch-finally block. An exception is an object that is used to catch the error and run the statement based on the error condition that is called exception handling. Mainly two types of error are handled by exception handling. These are compiled time errors and run-time errors. The run-time errors are handled by exception handling. How you can handle exceptions in Java is explained in this tutorial.

Programming Leftovers

Filed under
  • RcppSimdJson 0.1.1: More Features

    A first update following for the exciting RcppSimdJson 0.1.0 release last month is now on CRAN. Version 0.1.1 brings further enhancements such direct parsing of raw chars, working with compressed files as well as much expanded querying ability all thanks to Brendan, some improvements to our demos thanks to Daniel as well as a small fix via a one-liner borrowed from upstream for a reported UBSAN issue.

    RcppSimdJson wraps the fantastic and genuinely impressive simdjson library by Daniel Lemire and collaborators. Via very clever algorithmic engineering to obtain largely branch-free code, coupled with modern C++ and newer compiler instructions, it results in parsing gigabytes of JSON parsed per second which is quite mindboggling. The best-case performance is ‘faster than CPU speed’ as use of parallel SIMD instructions and careful branch avoidance can lead to less than one cpu cycle use per byte parsed; see the video of the talk by Daniel Lemire at QCon (also voted best talk).

  • Jonathan Dowland: Generic Haskell

    When I did the work described earlier in template haskell, I also explored generic programming in Haskell to solve a particular problem. StrIoT is a program generator: it outputs source code, which may depend upon other modules, which need to be imported via declarations at the top of the source code files.

    The data structure that StrIoT manipulates contains information about what modules are loaded to resolve the names that have been used in the input code, so we can walk that structure to automatically derive an import list. The generic programming tools I used for this are from Structure Your Boilerplate (SYB), a module written to complement a paper of the same name.

  • 9 reasons I upgraded from AngularJS to Angular

    In 2010, Google released AngularJS, an open source, JavaScript-based frontend structure for developing single-page applications (SPAs) for the internet. With its move to version 2.0 in 2016, the framework's name was shortened to Angular. AngularJS is still being developed and used, but Angular's advantages mean it's a smart idea to migrate to the newer version.

  • [Old/Odd] 5 news feautures of PHP-7.2

    Before PHP 7.2 the object keyword was used to convert one data type to another (boxing and unboxing), for example, an array to an object of the sdtClass class and/or vice versa, as of PHP 7.2 the object data type can be used as parameter type or as function return type.

  • This Week In Rust: This Week in Rust 351

Laravel Programming

Filed under

Python Programming Leftovers

Filed under
  • How To Build A Simple Virtual Assistant Using Python

    Virtual assistants are everywhere from Alexa, to Google Home, to Apple Siri. They help us check the weather, make phone calls, control the thermostat, door locks, and other smart home devices e.t.c

    In this article, I will be walking you through how to create a simple virtual assistant using Google Speech Recognition and IBM Watson Text to Speech in Python.

  • Deep Learning in Keras - Building a Deep Learning Model

    Deep learning is one of the most interesting and promising areas of artificial intelligence (AI) and machine learning currently. With great advances in technology and algorithms in recent years, deep learning has opened the door to a new era of AI applications.

    In many of these applications, deep learning algorithms performed equal to human experts and sometimes surpassed them.

    Python has become the go-to language for Machine Learning and many of the most popular and powerful deep learning libraries and frameworks like TensorFlow, Keras, and PyTorch are built in Python.

    In this series, we'll be using Keras to perform Exploratory Data Analysis (EDA), Data Preprocessing and finally, build a Deep Learning Model and evaluate it.

    In this stage, we will build a deep neural-network model that we will train and then use to predict house prices.

  • Return modified string with Python

    Hello and welcome back, today I have solved another python related problem on CodeWars and would like to post the solution here.

    The question is as follows:-

    Given 2 strings, a and b, return a string of the form short+long+short, with the shorter string on the outside and the long string on the inside. The strings will not be the same length, but they may be empty ( length 0 ).

  • Python 3.9.0rc1

    This is the first release candidate of Python 3.9

    This release, 3.9.0rc1, is the penultimate release preview. Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release. The second candidate and the last planned release preview is currently planned for 2020-09-14.

  • Python 3.9.0rc1 is now available

    Python 3.9.0 is almost ready. This release, 3.9.0rc1, is the penultimate release preview. You can get it here:

    Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release. The second candidate and the last planned release preview is currently planned for 2020-09-14.

    Please keep in mind that this is a preview release and its use is not recommended for production environments.

  • The Inner Workings of: Arq

    The main point of (what I colloquially call) a job library is, essentially, to execute a function (i.e. job) somewhere else, and potentially at a different time. When using a sync approach to web services (such as when using non-async Django or Flask), the limitations of the synchronous IO model basically require the use of a job library to execute logic outside of the context of a single request handler - if you don't want to do the logic in the scope of a request (and make the request take longer), you need to do it somewhere else, so you need a job library like Celery. A simple example might be an HTTP interface to send an email to a lot of recipients. You might not want the request to wait until all the emails have been sent to return a response since that might take a long time, so you would just schedule a job to run somewhere else to do the work.

    Job libraries like Celery basically require you to run special worker processes in addition to your web handler processes, and the worker processes use a database to get instructions to run functions, and then they run them.

  • PSF GSoC students blogs: Weekly Check-In | GSoc | #11
  • PyCoder’s Weekly: Issue #433 (Aug. 11, 2020)
  • Pysa: An Open-Source Tool To Detect & Fix Security Issues In Python Code

    Facebook has open-sourced Pysa, an internal tool used on Instagram to detect and fix bugs in the huge Python codebase of the app. Pysa can automatically identify vulnerable code snippets written by Facebook engineers before they are integrated into the social network’s systems.

    It is a static analyzer tool meaning it works by scanning code in a “static” form before the code is compiled. It hunts for common patterns that are usually observed in bugs and flags the potential issues in the code.

  • Facebook Open Sources Analysis Tool for Python Code

    The security-focused tool relies on Pyre, Facebook’s type checker for Python, and allows for the analysis of how data flows through code. It can be used to identify issues related to the protection of user data, as well as flaws such as XSS and SQL injection.

    In addition to making Pysa available in open source, Facebook released many of the definitions that it leverages when looking for security bugs, making it readily available for others to start analyzing their own Python code.

Go 1.15 Release Notes

Filed under

The latest Go release, version 1.15, arrives six months after Go 1.14. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before.

Read more

Also: Go 1.15 Released With Much Improved Linker, New CPU Mitigations

Programming Leftovers

Filed under
  • Engineer Your Own Electronics With PCB Design Software

    A lot of self-styled geeks out there tend to like to customize their own programs, devices, and electronics. And for the true purists, that can mean building from the ground up (you know, like Superman actor Henry Cavill building a gaming PC to the delight of the entire internet).

    Building electronics from the ground up can mean a lot of different things: acquiring parts, sometimes from strange sources; a bit of elbow grease on the mechanical side of things; and today, even taking advantage of the 3D printing revolution that’s finally enabling people to manufacture customized objects in their home. Beyond all of these things though, engineering your own devices can also mean designing the underlying electronics — beginning with printed circuit boards, also known as PCBs.


    On the other hand, there are also plenty of just-for-fun options to consider. For example, consider our past buyer’s guide to the best Linux laptop, in which we noted that you can always further customize your hardware. With knowledge of PCB design, that ability to customize even a great computer or computer setup is further enhanced. You might, for instance, learn how to craft PCBs and devices amounting to your own mouse, gaming keyboard, or homemade speakers — all of which can make your hardware more uniquely your own.

    All in all, PCB design is a very handy skill to have in 2020. It’s not typically necessary, in that there’s usually a device or some light customization that can give you whatever you want or need out of your electronics. But for “geeks” and tech enthusiasts, knowledge of PCB design adds another layer to the potential to customize hardware.

  • Programming pioneer Fran Allen dies aged 88 after a career of immense contributions to compilers

    Frances Allen, one of the leading computer scientists of her generation and a pioneer of women in tech, died last Tuesday, her 88th birthday.

    Allen is best known for her work on compiler organisation and optimisation algorithms. Together with renowned computer scientist John Cocke, she published a series of landmark papers in the late '60s and '70s that helped to lay the groundwork for modern programming.

    In recognition of her efforts, in 2006 Allen became the first woman to be awarded the AM Turing Award, often called the Nobel Prize of computing.

  • Excellent Free Tutorials to Learn ECMAScript

    ECMAScript is an object‑oriented programming language for performing computations and manipulating computational objects within a host environment. The language was originally designed as a scripting language, but is now often used as a general purpose programming language.

    ECMAScript is best known as the language embedded in web browsers but has also been widely adopted for server and embedded applications.

  • Alexander Larsson: Compatibility in a sandboxed world

    Compatibility has always been a complex problems in the Linux world. With the advent of containers/sandboxing it has become even more complicated. Containers help solve compatibility problems, but there are still remaining issues. Especially on the Linux desktop where things are highly interconnected. In fact, containers even create some problems that we didn’t use to have.

    Today I’ll take a look at the issues in more details and give some ideas on how to best think of compatibility in this post-container world, focusing on desktop use with technologies like flatpak and snap.


    Another type of compatibility is that of communication protocols. Two programs that talk to each other using a networking API (which could be on two different machines, or locally on the same machine) need to use a protocol to understand each other. Changes to this protocol need to be carefully considered to ensure they are compatible.

    In the remote case this is pretty obvious, as it is very hard to control what software two different machines use. However, even for local communication between processes care has to be taken. For example, a local service could be using a protocol that has several implementations and they all need to stay compatible.

    Sometimes local services are split into a service and a library and the compatibility guarantees are defined by the library rather than the service. Then we can achieve some level of compatibility by ensuring the library and the service are updated in lock-step. For example a distribution could ship them in the same package.

  • GXml-0.20 Released

    GXml is an Object Oriented implementation of DOM version 4, using GObject classes and written in Vala. Has a fast and robust serialization implementation from GObject to XML and back, with a high degree of control. After serialization, provides a set of collections where you can get access to child nodes, using lists or hash tables.

    New 0.20 release is the first step toward 1.0. It provides cleaner API and removes old unmaintained implementations.

    GXml is the base of other projects depending on DOM4, like GSVG an engine to read SVG documents based on its specificacion 1.0.

    GXml uses a method to set properties and fill declared containers for child nodes, accessing GObject internals directly, making it fast. A libxml-2.0 engine is used to read sequentially each node, but is prepared to implement new ones in the future.

  • Let Mom Help You With Object-Oriented Programming

    Mom is a shortcut for creating Moo classes (and roles). It allows you to define a Moo class with the brevity of Class::Tiny. (In fact, Mom is even briefer.)

    A simple example:

    Mom allows you to use Moo features beyond simply declaring Class::Tiny-like attributes though. You can choose whether attributes are read-only, read-write, or read-write-private, whether they're required or optional, specify type constraints, defaults, etc.

  • Perl Weekly Challenge 73: Min Sliding Window and Smallest Neighbor

    These are some answers to the Week 73 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

    Spoiler Alert: This weekly challenge deadline is due in a few days from now (on Aug. 16, 2020). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.

  • [rakulang] 2020.32 Survey, Please

    The TPF Marketing Committee wants to learn more about how you perceive “The Perl Foundation” itself, and asks you to fill in this survey (/r/rakulang, /r/perl comments). Thank you!

Python Programming Leftovers

Filed under
  • The best frontend JavaScript framework for Django

    A question I've seen asked a lot is "what's the best frontend JavaScript framework to use with Django".

    Django itself doesn't make any recommendation on which frontend framework to use, or even assumes you're using a frontend framework at all.

    So, which frontend framework should you be using? And which one "plays well" with Django?

  • Ned Batchelder: You should include your tests in coverage

    This seems to be a recurring debate: should you measure the coverage of your tests? In my opinion, definitely yes.

    Just to clarify: I’m not talking about using coverage measurement with your test suite to see what parts of your product are covered. I’ll assume we’re all doing that. The question here is, do you measure how much of your tests themselves are executed? You should.

  • Is Java and Python similar?

    I don't think python and Java have anything in common. I enjoy the simple clean utilitarian nature of python. As long as simple pep8 guidelines are followed it is very easy to read any strangers code. Most people write python in an OO sort of way. However one can get pretty far in writing with an FP lite methodology. Many people complain about indents. To me it is just different and something easy to get used to. Python has idioms that values being clean and concise. It is trivial to deploy. My main critique of python is that if one uses too much python it is easy to get dumbed down by all the magic. It is important to use other languages in addition to python just to keep ones skills sharp. Thinking about writing high performing Python usually means thinking about doing it in some other language.


    Note: I recognize Java is the most popular language in the world. Many great successfull applications use Java. One can eventually use Java to solve almost any problem. That doesn't mean I like it or think it is good for the industry.

  • Real Python: Identify Invalid Python Syntax

    Python is known for its simple syntax. However, when you’re learning Python for the first time or when you’ve come to Python with a solid background in another programming language, you may run into some things that Python doesn’t allow. If you’ve ever received a SyntaxError when trying to run your Python code, then this guide can help you. Throughout this course, you’ll see common examples of invalid syntax in Python and learn how to resolve the issue.

  • PSF GSoC students blogs: Weekly Check-In #6 (2nd Aug - 9th Aug)
  • PSF GSoC students blogs: Weekly Check-In #11
  • PSF GSoC students blogs: Week 10 Check-in
  • PSF GSoC students blogs: Week 10
  • PSF GSoC students blogs: GSoC: Week 11: InputEngine.add(paths)

GNU, GTK/GNOME, and More Development News

Filed under
  • GNU Emacs 27.1 Adds HarfBuzz Text Shaping, Native JSON Parsing

    GNU Emacs 27.1 is the latest feature release for this very extensible text editor. With Emacs 27.1 there is support for utilizing the HarfBuzz library for text shaping. HarfBuzz is also what's already used extensively by GNOME, KDE, Android, LibreOffice, and many other open-source applications.

    Emacs 27.1 also adds built-in support for arbitrary-size integers, native support for JSON parsing, better support for Cairo drawing, support for XDG conventions for init files, the lexical binding is now used by default, built-in support for tab bar and tab-line, and support for resizing/rotating images without ImageMagick, among other changes.

  • Philip Withnall: Controlling safety vs speed when writing files

    g_file_set_contents() has worked fine for many years (and will continue to do so). However, it doesn’t provide much flexibility. When writing a file out on Linux there are various ways to do it, some slower but safer — and some faster, but less safe, in the sense that if your program or the system crashes part-way through writing the file, the file might be left in an indeterminate state. It might be garbled, missing, empty, or contain only the old contents.

    g_file_set_contents() chose a fairly safe (but not the fastest) approach to writing out files: write the new contents to a temporary file, fsync() it, and then atomically rename() the temporary file over the top of the old file. This approach means that other processes only ever see the old file contents or the new file contents (but not the partially-written new file contents); and it means that if there’s a crash, either the old file will exist or the new file will exist. However, it doesn’t guarantee that the new file will be safely stored on disk by the time g_file_set_contents() returns. It also has fewer guarantees if the old file didn’t exist (i.e. if the file is being written out for the first time).

  • Daniel Espinosa: Training Maintainers

    Is not just help others to help you, is a matter of responsibility with Open Source Community. Your life have wonders and should change for better, so you will be lost opportunities or simple can’t work on your favorite open source project. Prepare your self to be a maintainer professor, change your mind for the beginning and help others, that is also a great contribution to open source software.

    Be kind. Your potential contributors will take over when required. Making sure they have the abilities and use best practices in the project, is not just good for your project, is good for all others out there; they will use them to help other projects.

  • nanotime 0.3.1: Misc Build Fixes for Yuge New Features!

    The nanotime 0.3.0 release four days ago was so exciting that we decided to do it again! Kidding aside, and fairly extensive tests notwithstanding we were bitten by a few build errors: who knew clang on macOS needed extra curlies to be happy, another manifestation of Solaris having no idea what a timezone setting “America/New_York” is, plus some extra pickyness from the SAN tests and whatnot. So Leonardo and I gave it some extra care over the weekend, uploaded it late yesterday and here we are with 0.3.1. Thanks again to CRAN for prompt processing even though they are clearly deluged shortly before their (brief) summer break.

  • Explore 10 popular open source development tools

    There is no shortage of closed-source development tools on the market, and most of them work quite well. However, developers who opt for open source tools stand to gain a number of benefits.

    In this piece, we'll take a quick look at the specific benefits of open source development tools, and then examine 10 of today's most popular tooling options.


    Git is a distributed code management and version-control system, often used with web-based code management platforms like GitHub and GitLab. The integration with these platforms makes it easy for teams to contribute and collaborate, however getting the most out of Git will require some kind of third-party platform. Some claim, however, that Git support for Windows is not as robust as it is for Linux, which is potentially a turnoff for Windows-centric developers.


    NetBeans is a Java-based IDE similar to Eclipse, and also supports development in a wide range of programming languages. However, NetBeans focuses on providing functionality out of the box, whereas Eclipse leans heavily on its plugin ecosystem to help developers set up needed features.

  • Andre Roberge: Rich + Friendly-traceback: first look

    After a couple of hours of work, I have been able to use Rich to add colour to Friendly-traceback. Rich is a fantastic project, which has already gotten a fair bit of attention and deserves even more.

    The following is just a preview of things to come; it is just a quick proof of concept.

  • Growing Dask To Make Scaling Python Data Science Easier At Coiled

    Python is a leading choice for data science due to the immense number of libraries and frameworks readily available to support it, but it is still difficult to scale. Dask is a framework designed to transparently run your data analysis across multiple CPU cores and multiple servers. Using Dask lifts a limitation for scaling your analytical workloads, but brings with it the complexity of server administration, deployment, and security. In this episode Matthew Rocklin and Hugo Bowne-Anderson discuss their recently formed company Coiled and how they are working to make use and maintenance of Dask in production. The share the goals for the business, their approach to building a profitable company based on open source, and the difficulties they face while growing a new team during a global pandemic.

QML Online - Qt 5.15, Kirigami, Breeze and more!

Filed under

I'm happy to announce that QML Online is now running with the last version of Qt (5.15) and with an initial Kirigami integration with breeze icons!

Read more

Also: Old truths remain

Python Programming

Filed under

Syndicate content

More in Tux Machines

Android Leftovers

Tiny module and dev kit run RT Linux on STM32MP1

Exor’s 25.4 x 25.4mm, extended temp “NanoSOM nS02” module runs real-time Linux and its XPlatform industrial IoT software on a soldered, 800MHz STM32MP157 with up to 1GB DDR3L and 32GB eMMC. An “OpenHMI nS02” dev kit with 5-inch touchscreen is optional. Italian embedded technology firm Exor Embedded has launched a NanoSOM nS02 module that runs real-time Linux on the new 800MHz version of ST’s dual-core, Cortex-A7 based STM32MP157. As with the recent, Apollo Lake based, FPGA-enabled GigaSOM GS01 module, Exor announced the product with Arrow, which will be distributing the module and an OpenHMI nS02 Development Kit (see farther below). Read more

Endless OS 3.8.5

Endless OS 3.8.5 was released for existing users today, August 10th, 2020. Downloadable images for new users will be available in the next few days. Read more

Linspire 9.0 Released

Today our development team is excited to announce the release of Linspire 9.0; packed with a TON of improvements and security updates, this is a major update that we’ve been working hard to get out to our faithful users. The global pandemic has delayed its release, but the development team has worked diligently and meticulously behind-the-scenes over the past few months, fine-tuning every detail of what is widely considered to be the premier Linux desktop on the market today. The Linspire 9.0 series will be the last one featuring the 18.04 LTS codebase; upcoming Linspire X will be based on the 20.04 LTS code and kernel. Read more Also: Linspire 9.0 Officially Released, Based on Ubuntu 18.04 LTS and Linux 5.4 LTS