Language Selection

English French German Italian Portuguese Spanish

Development

JavaScript (JS) Programming

Filed under
Development
  • What are Callback Functions in JavaScript?

    If you’re a programmer, you’ve probably heard of functions, which are a set of statements that perform an action and return an output but what are callback functions?

    The callback function is an extremely important concept of javascript and is widely used in promises, event listeners, arrays, and much more.

    We’ll go over what callback functions are and how to use them in JavaScript in this tutorial as well as We will also talk about the synchronous and asynchronous callback functions. To have clear and profound concepts of Callback functions we will implement some examples as well.

  • What Does the “use strict” Directive Do in JavaScript

    JavaScript evolved for a long time having no compatibility issues and modified by adding new features but not changing the old features. It had its advantages and disadvantages and the advantage was that it didn’t allow the breaking of the existing code, however, the disadvantage was that any error made by the developers or creators was stuck within JavaScript forever.

    It carried on until ECMAScript 5 (also referred to as ES5) was introduced in 2009 whose perk was that it added new features while modifying current ones. However, by default in JavaScript, these modifications are off. One needs to enable it with a special message or command which is the “use strict”.

  • Top 10 Popular Websites Built using JavaScript – Examples

    Popularity of JavaScript is increasing day by day with it’s usage for building websites, mobile applications, web based games and server side applications. It’s a client side scripting language but with the introduction of NodeJs, it’s now possible to handle server side as well.

    JavaScript is evolving everyday, making it’s way more into the tech world by introducing various frameworks, which makes the life of developers easy. Many websites which are popularly known are built around JavaScript which shows how important and useful the language is. In this write-up, you will have the top 10 popular websites built using JavaScript.

  • What are JavaScript Object Accessors

    JavaScript object accessors are used to access and update the objects and two keywords used for this function are getter and the other is the setter. JavaScript introduced getters and setters in ES5 in 2009.

    We’ll look at what getters and setters are and how to utilize them in JavaScript in this tutorial as well as go over why you should use get or set methods of JavaScript. Apart from this, we will discuss the object.defineProperty() as well. In the end, we will shine some light on which browser supports the set and get methods. So let’s get started.

  • How to Reverse an Array in JavaScript

    Reversing an array is a very popular coding problem which is often asked as an interview question when applying for an entry level JavaScript Developer position. Sometimes you will be asked to modify the original array so that the first element becomes the last and the second element becomes the second last element of the array and so on. Sometimes you might be asked to reverse an array without changing the original array.

    In this post we will look at different methods which are used to reverse an array in JavaScript; these methods will include the methods which reverse the original array as well as methods which can be used to make a new reversed array.

  • How to Speed up the Execution of JavaScript Code

    When developing an app or a website, one of the most crucial elements to consider is the app’s or website’s performance. As a user, I wouldn’t want any app to take a long time to load or whenever I click something and I have to wait for some action. Often if the webpage takes 5-6 seconds to load most users including me would leave the webpage.

    For web developers, JavaScript is a fantastic tool. Every web developer learned JavaScript at some point in their life. However, poor JavaScript code results in slower websites.

    With this in mind, a developer always looks at ways of improving his webpage. You are in luck because today we are going to talk about how to speed up the execution of JavaScript code.

  • How to Write a JavaScript Program to Get File Extension from File Name?

    The file extension is a three or four-letter abbreviation or an acronym at the end of a file that tells you what kind of file it is under different operating systems. For example, the file name is code.js hence the extension here is js. The goal of this article is to show you how to write a JavaScript program to get file extensions from a file name. We will discuss two of the easiest and most used methods to find the file extension.

  • How to Reverse a String in JavaScript

    Reversing an array is a very popular coding problem that is often asked as an interview question to beginner JavaScript devs. Sometimes the interviewers add certain restrictions, forcing you to come up with ingenious solutions.

    In JavaScript, a string can be reversed by many different methods. In this post we will discuss the most creative and interesting methods for reversing a string.

  • How to Link JavaScript to HTML

    JavaScript is a very popular scripting language which is used both on the client-side as well as on the server-side. JavaScript is necessary for our web pages as it makes our web page interactive.

Best Linux Distro for Programming

Filed under
Development
GNU
Linux

If you’re a programmer and you’re looking for a Linux distro, this will help you find the perfect fit.

Without further ado, we’ll go straight to the distro recommendations. If you want to learn more, scroll down to the bottom of the article.

Read more

SageMath: free open-source mathematic software

Filed under
Development
Software

SageMath is a free open-source mathematic software for mathematicians, data scientists and statisticians.

It is built on top of many mathematic python packages.

SageMath features include animated graphs, interactive plots, portable version that works directly from USB stick, interactive Python interface, notebook, rich documentation and more.

SageMath is an ideal solution for education as it aims for high-level student.

SageMath is faster than other open-source software doing the same calculations, like Mathematica 7.

It is proven to be faster by 32% on Linux (Intel 32bit), and 40% faster on macOS. You can read more about this in SageMath benchmarks.

Read more

Geany 1.38 Lightweight Code Editor is Out, Removes GTK+2 Support

Filed under
Development
Software

Geany is a code editor which uses GTK+ toolkit. The new version, Geany 1.38, comes with increased speed when opening documents.

Every developer who spends hours in front of a computer screen writing codes, absolutely needs an editor to program. Whether we want to program a web page, an application or a program, we must use a tool that allows us to edit the code, modify it and work with it.

Geany is a powerful, stable, and lightweight code editor with certain basic features of an Integrated Development Environment (IDE). It is an open source cross platform editor that is designed specifically for programmers thanks to its built-in support for over 50 programming languages. In addition, with Geany you can perform functions such as syntax highlighting and autocompletion.

Now that a new version has been announced, let?s see what has changed in Geany.

Read more

Brython 3.10 Release, Python Implementation for Web Browsers

Filed under
Development
Web

Submitted by A release of the project Brython 3.10 (Browser Python) with a web browser-side implementation of the Python 3 programming language, allowing you to use Python instead of JavaScript to develop scripts for the Web. The project code is written in Python and is distributed under the BSD license.

Read more

Programming Leftovers

Filed under
Development
  • Results from the OpenSUSE 2021 Rust Survey — Firstyear's blog-a-log

    From September the 8th to October the 7th, OpenSUSE has helped me host a survey on how developers are using Rust in their environments. As the maintainer of the Rust packages in SUSE and OpenSUSE it was important for me to get a better understanding of how people are using Rust so that we can make decisions that match how the community is working.

    First, to every single one of the 1360 people who responded to this survey, thank you! This exceeded my expectations and it means a lot to have had so many people take the time to help with this.

  • Dial A For Arduino | Hackaday

    A lot of phrases surrounding phones don’t make sense anymore. With a modern cellphone, you don’t really “hang up” and there’s certainly no “dial” to be had. However, with [jakeofalltrades’] project, you can read an old-fashioned phone dial using an Arduino.

    The idea behind a phone dial is actually pretty simple. When you pull the dial back to the stop using one of the numbered holes and release it, it causes a switch to open and close the same number of times as the hole you selected. That is, if you pull back the 5 hole, you should get 5 switch closures. The duration of each switch event and the time between switch events is a function of the speed the dial moves because of its internal spring. The zero hole actually produces ten pulses.

  • React Help Desk: Free open-source live chat assistant for your website

    React Help Desk is an open source live chat application that comes with an administrative control panel that lets you manage multiple chats. The control panel written with React, Node.js, and web sockets.

    React Help Desk offers a real-time support system with a simple interface which allows you to communicate with many clients at the same time.

    Created by Jason Gallagher, a web developer with 20 years of experience, who created it for his personal use and currently using it at his website.

  • 1981 Called, Here’s Your Software | Hackaday

    How many of us who have a few decades of adulthood under our belts would like to talk to our 17 year old selves? “Hey kid, it’s all gonna be OK. Also, Duke Nukem Forever does come out eventually, but it’s not going to be pretty!” Being honest, exposure to the hot takes of one’s naive teenage self would almost certainly be as cringeworthy as the time-worn-but-familiar adult would be to the teenager, but there’s one way in which you can in a sense have a conversation with your teenage self. [Mad Ned] had this opportunity, when he discovered a printed BASIC listing for a game he’d written for the TRS-80 back in 1981. Could he make it run again, and what did it tell him about his teenage years?

  • The Largely Untold Story Of How One Guy In California Keeps The World’s Computers On The Right Time Zone. (Well, Sort Of)

    All Linux and Mac-based computers pull their time zones from a massively important database — the time zone database. The process of defining time zones is centralized. This is actually quite a big deal in its own right because people tend to grossly underestimate how pivotal Linux is to … the entire [Internet] and technology as we know it. It may constitute a small percentage of desktop users and be an OS largely favored by nerds and computer developers. But in server-land it’s actually the dominant operating system, especially on the public cloud infrastructure that is rapidly usurping the diminishing role that on-premises infrastructure has to play in getting packets of data from hosts to users (in normal language: making the [Internet] work). AWS instances, for instance, default to Amazon’s Linux spin-off. Virtually all the world’s supercomputers used for everything from weather forecasting to simulating physics experiments run on Linux. Android is a fork of Linux. (I don’t play the “will this be Linux’s year on the desktop?” game. People have been wrong too many times and I don’t particularly care either way). If you’ve ever used an Android device, received a weather forecast, or accessed a website (you’ve probably done all those things), then you’ve benefited from the existence of Linux.

Python and Perl Programming

Filed under
Development
  • All Pythonistas should switch to Go… or okay, maybe just half

    But not those at Google, Uber, Dropbox, Soundcloud, Slack, and Medium. The programmers at top corporations have long fallen for the language with the cute mascot.

  • Python Has Become the Most Popular Language, According to TIOBE

    According to a TIOBE statement in October 2021, Python is now the most popular programming language in the world.

    According to the latest ratings from the software company TIOBE, Python is now the most popular programming language in the world. The so-called TIOBE Index is based on the number of language searches performed online, which may also be a measure of a language’s popularity.

  • Programming languages: This major update for Python has just arrived
  • Top 10 In-Demand Programming Language that Will Rule in 2021
  • gfldex: Double inspiration

    Quite a few of the posts prior to this one where inspired by a post of fellow blogger. I would like to double down on that today. Vadim wrangled with symbols and Fabio enjoyed renaming them. Having struggled with packages in the past, Vadim’s post was very helpful in making me realise, .HOW is how I can get hold of the object that is the package. And if Perl can do it, there is surely no way to stop Raku to have the same capability.

    We want to re-export functions while changing their name. Just adding a prefix will do for now. That presents the first problem. Currently, there is no way to get named arguments to use handed to sub EXPORT. Any Hash will also be gobbled up. All we have are positional parameters. Since Raku is omni-paradigmatic, that wont pose a challenge.

  • Hackers And China | Hackaday

    The open source world and Chinese manufacturing have a long relationship. Some fifteen years ago, the big topic was how companies could open-source their hardware designs and not get driven bankrupt by competition from overseas. Companies like Sparkfun, Adafruit, Arduino, Maple Labs, Pololu, and many more demonstrated that this wasn’t impossible after all.

Programming Leftovers

Filed under
Development
  • Youth Hacking 4 Freedom – from the Free Software Foundation Europe

    And there’s more: Thorsten Behrens from The Document Foundation’s Board of Directors is on the jury. So, if you fill the requirements listed above and want to get hacking on a project, join in!

  • Dirk Eddelbuettel: corels 0.0.3 on CRAN: Update

    An updated version of the corels package is now on CRAN!

    The change is chiefly an updated configure.ac (just like RcppGSL yesterday, RQuantLib two days ago, and littler three days ago.

  • Excellent Free Tutorials to Learn OpenMP - LinuxLinks

    OpenMP (Open Multi-Processing) is an open standard API for Shared Memory parallelization in C, C++ and Fortran which consist of three primary API components: compiler directives, runtime routines and environment variables.

    An OpenMP-parallelised application starts as a serial application that runs on a single compute core. When instructed by the programmer, the application spawns a number of threads, which can run concurrently on separate cores. Thus, work can be distributed to leverage more resources.

    Here’s our recommended OpenMP tutorials.

  • Open source developers are unique: Tips for working with and managing community-centric dev teams [iophk: the TechRepublic link is about IBM, so maybe it should not be included]

    Is there anything unique about working with, managing or being an open source developer. On a recent episode of Dynamic Developer, I spoke with Todd Moore, vice president for open technology and developer advocacy, at IBM about these topics as well what he looks for when hiring open source developers, the right way for companies to turn their open source projects into open standards and some of the coolest open technology initiatives IBM is working on.

    Todd has a long history in software and hardware development and is a leader in the open source world. He and his team of developers have worked with leading open source communities like the Apache Software Foundation, Linux Foundation, Eclipse and OpenStack.

    The following is a transcript of the interview, edited for readability. You can listen to the podcast player embedded in this article, watch a video above or read a transcript of the interview below.

  • Perl Weekly Challenge 133: Integer Square Roots and Smith Numbers

    These are some answers for Week 133 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 October 10, 2021 at 23:59). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.

  • Python Provides Classic Basic | Hackaday

    Back in the late 1970s and early 1980s when you turned on a PC, more often than not, you’d get a Basic prompt. Most people would then load a game from a tape, but if you were inclined to program you could just start writing. [Richpl] wanted that same experience and thus PyBasic was born.

  • Solution another YandexQ question via sieve of eratosthenes in Python

Mozilla and Programming Leftovers

Filed under
Development
Moz/FF
  • Reducing the Overhead of Profiling Firefox Sleeping Threads – Mozilla Performance

    Firefox includes its own profiler: Visit profiler.firefox.com to enable it, and the user documentation is available from there.

    The main advantages compared with using a third-party profiler, are that it’s supplied with Firefox, it can capture screenshots, it understands JavaScript stacks, and Firefox is adding “markers” to indicate important events that may be useful to developers.

    Its most visible function is to capture periodic “samples” of function call stacks from a number of threads in each process. Threads are selected during configuration in about:profiling, and can range from a handful of the most important threads, to all known threads.

    This sampling is performed at regular intervals, by going through all selected threads and suspending each one temporarily while a sample of its current stack is captured (this is known as “stack walking”). This costly sampling operation can have a non-negligible impact on how the rest of the Firefox code runs, this is the “overhead” of the Profiler. In order to be able to sample as many threads as possible with the smallest impact, there is ongoing work to reduce this overhead.

  • Lots to see in Firefox 93! - Mozilla Hacks - the Web developer blog

    Firefox 93 comes with lots of lovely updates including AVIF image format support, filling of XFA-based forms in its PDF viewer and protection against insecure downloads by blocking downloads relying on insecure connections.

    Web developers are now able to use static initialization blocks within JavaScript classes, and there are some Shadow DOM and Custom Elements updates. The SHA-256 algorithm is now supported for HTTP Authentication using digests. This allows much more secure authentication than previously available using the MD5 algorithm.

  • GCC, Clang[d], LSP client, Kate and variadic macro warnings, a short story

    Kate has had an LSP plugin for sometime now, which uses Clangd. It's a great plugin that brings many code navigation/validation features, akin to those available in Qt Creator and KDevelop.

    So naturally since I got it to work, I've been using it. At some point I found out about the Diagnostics tab in the LSP Client tool view in Kate, which displays useful information; however I also saw that it was plagued by a spam of the following warnings...

  • GCC 12 Enables Auto-Vectorization For -O2 Optimization Level - Phoronix

    The change merged today is enabling the auto-vectorizer at the -O2 optimization level rather than only at -O3 and above. The auto-vectorizer is enabled by default with -O2 and using its "very cheap" cost model. The very cheap model enables vectorization if the scalar iteration count is a multiple of four, it is the "cheapest" of these cost models. Meanwhile the default cost model for vectorization at -O3 is "dynamic" for having more checks to try to determine if a vectorized code path will be faster.

  • Jon Chiappetta: Reddit Refresher Javascript Bookmark
  • Dirk Eddelbuettel: RcppGSL 0.3.10: Small Updatex

    A new release 0.3.10 of RcppGSL is now on CRAN. upload](https://dirk.eddelbuettel.com/blog/2020/06/21#rcppgsl_0.3.8). The RcppGSL package provides an interface from R to the GNU GSL by relying on the Rcpp package.

    This release brings a requested configure.ac update (just like RQuantLib yesterday and littler two days ago, along with the at-work tiledb update today). It also adds a small testing improvement. No user-visible changes, no new features. Details follow from the NEWS file.

  • Lang team October update

    This week the lang team held its October planning meeting (minutes). We hold these meetings on the first Wednesday of every month.

  • This Week In Rust: This Week in Rust 411

3 new features of the latest OpenPGP.js version

Filed under
Development
Security

OpenPGP.js is a cryptography library that implements the OpenPGP standard, most commonly used for email encryption. ProtonMail, Mailvelope, and FlowCrypt all use OpenPGP.js, to name a few. That means the OpenPGP.js library encrypts millions of users' messages.

The OpenPGP standard, first published in the 1990s, like almost anything, requires maintenance and updating for both security and usability. A "crypto refresh" of the standard is in the works, which adds modern encryption algorithms and deprecates outdated ones. To improve usability, various email applications now allow users to seamlessly encrypt their communication—without managing their keys or those of their contacts.

First released in 2014, OpenPGP.js began based on an early prototype called GPG4Browsers, which is based on several scripts by Herbert Hanewinkel (among other contributors). The second version of OpenPGP.js, released in 2016, was completely reworked to use Uint8Arrays instead of strings (which significantly increased its performance) and modern ES6 modules rather than CommonJS modules internally. Versions 3 and 4, both released in 2018, added support for Elliptic-curve cryptography (ECC) and streaming, respectively.

Read more

Syndicate content