Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Sin function in C

    In mathematics, the sine function is among three primary functions, others comprising cosine and tan. Techniques for executing basic mathematical operations, like the elementary exponential, logarithmic, square root, and mathematical operations, are included in the <math.h> header. You must include the header file <math.h> to utilize these functions. The sin function accepts an angle in radians and gives its sine value, which can be confirmed using a sine curve.

    You may use the law of sine to find any arbitrary angle in a triangle, as well as the length of a certain triangle side. This is a fundamental trigonometric notion. The sin function is used in the ANSI/ISO 9899-1990 versions of the C language. Sin () returns a result that is between 1 and -1.

    Now, let us start with a few examples of sin() function in the C programming language.

  • Dirk Eddelbuettel: RcppQuantuccia 0.0.4 on CRAN: Updated Calendar

    A new release of RcppQuantuccia arrived on CRAN earlier today. RcppQuantuccia brings the Quantuccia header-only subset / variant of QuantLib to R. At the current stage, it mostly offers date and calendaring functions.

    This release is the first in two years and brings a few internal updates (such as a swift to continuous integration to the trusted r-ci setup) along with a first update of the United States calendar. Which, just like RQuantLib, now knows about two new calendars LiborUpdate and FederalReserve.

  • System/Linux/DevOps Engineer Interview - Invidious

    An interview with a fellow Linux Engineer / System Engineer / DevOps Engineer / Programmer / Tech Person -- Craig has an interesting background, and some amazing advice for those of you breaking into the tech industry right now.

  • ninja Build system, and renamed files

    I've been hearing about ninja, I had looked at it some time in the past, and did some local basic benchmarking (using time), and didn't find a huge difference in build times, both from scratch and incrementally. I tried ninja again recently and found one feature that sells it pretty well to me, it can show the build progress on one line in the terminal.

  • The Return of the Unix Shell

    With about half a century of life, the Unix shell is pervasive and entrenched in our computing infrastructure—with recent virtualization and containerization trends only propelling its use. A fresh surge of academic research highlights show potential for tackling long-standing open problems that are central to the shell and enable further progress. A recent panel discussion at HotOS ’21 concluded that improvements and research on the shell can be impactful and identified several such research directions. Maybe it’s time for your research to be applied to the shell too?

  • Python CGI example

    CGI is abbreviated as Common Gateway Interface in Python, which is a block of benchmarks to explain the exchange of data among the web server and a script. A CGI program is written by an HTTP server as the user input is entered through the HTML . In other words, it is a collection of procedures that are used to build a dynamic interaction between the client and the server application. When a client uses any element or sends a request to the web browser, that CGI executes a particular request, and the result or the output is sent back to the webserver.

  • How do I check if a string contains another substring in Python

    Sometimes we need to find out whether a particular string is present in another string or not. So to know that there are some already pre-defined methods available in Python programming.

  • How to disable scrolling on a webpage with JavaScript

    JavaScript is a web language used for creating dynamic web pages and making them interactive for users. Through JavaScript we can perform various functions, change CSS of HTML elements, perform actions on each click and many more.JavaScript makes the page of our website more interactive and adds dynamic behaviors to it, we can create various menus, drop down menus, scroll bars etc. We can even enable and disable the behaviour of each of these components using JavaScript. In this article we’ll see how to disable scrolling on a webpage using JavaScript.

  • How to check if an array is empty in JavaScript

    Knowing how to check for an empty array is an important coding skill which can often come in handy. It can be helpful in a situation where you have to show or hide something on a web page depending on whether the array is empty or not.

    Similarly, there are many other places where you will find this skill helpful. The purpose of this post is to explain the code, the concept behind the code and the most common use cases of checking for empty arrays in JavaScript code.

  • OpenCL 3.0.9 Specification Released - Phoronix

    The Khronos Group's OpenCL working group did a quiet Friday evening tagging of OpenCL 3.0.9.

    Most notable with OpenCL 3.0.9 as this routine specification update are the specification sources now being included for the provisional extensions adding semaphores and external memory support to OpenCL. Those extensions were originally announced this spring as part of OpenCL 3.0.7 but the specification ASCII doc sources were not included until now.

  • Computer scientists at University of Edinburgh contemplate courses without 'Alice' and 'Bob' [Ed: This isn't the way to promote equality but to garner animosity towards those who claim to be promoting this cause]

    A working group in the School of Informatics at the University of Edinburgh in Scotland has proposed a series of steps to "decolonize" the Informatics curriculum, which includes trying "to avoid using predominantly Western names such as Alice/Bob (as is common in the computer security literature)."

    The names Alice and Bob were used to represent two users of a public key cryptography system, described in a 1978 paper by Ronald Rivest, Adi Shamir, and Leonard Adleman, "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems." And since then, a variety of other mostly Western names like Eve – playing an eavesdropper intercepting communications – have been employed to illustrate computer security scenarios in related academic papers.

    The School of Informatics' working group reflects the University of Edinburgh's commitment to diversity, equity, and inclusion and to meet specific obligations spelled out in Scottish regulations like the Equality Act 2010 and the Public Sector Equalities Duty.

    The naming recommendation was reported last month by The Telegraph, which cited internal university documents. The Register filed a Freedom of Information Request with the University to obtain the documents, which were added to the University's website following the Telegraph report.

    [...]

    Examples cited in the document include "to avoid using master/slave to represent computing agents and instead use coordinator or workers" – a decision taken by numerous open source projects and companies in recent years – and to avoid using off-putting stereotypes during instruction.

More in Tux Machines

Wine 7.1

  • WineHQ - Wine Announcement - The Wine development release 7.1 is now available.
    The Wine development release 7.1 is now available.
    
    What's new in this release (see below for details):
      - Vulkan 1.3 support.
      - A number of theming fixes.
      - WebSocket improvements.
      - Improved cursor clipping on macOS.
      - IDL compiler fixes for C++.
      - Various bug fixes.
    
    The source is available from the following locations:
    
      https://dl.winehq.org/wine/source/7.x/wine-7.1.tar.xz
      http://mirrors.ibiblio.org/wine/source/7.x/wine-7.1.tar.xz
    
    Binary packages for various distributions will be available from:
    
      https://www.winehq.org/download
    
    You will find documentation on https://www.winehq.org/documentation
    
    You can also get the current source directly from the git
    repository. Check https://www.winehq.org/git for details.
    
    Wine is available thanks to the work of many people. See the file
    AUTHORS in the distribution for the complete list.
    
  • Wine 7.1 is out with Vulkan 1.3 support | GamingOnLinux

    Now that the dust has settled on the bottle of Wine 7.0, the biweekly development releases have begun and Wine 7.1 is out with new features and bug fixes. This is the compatibility layer that allows you to run games and applications developed for Windows - on Linux. Part of what makes up Steam Play Proton. Once a year or so, a new stable release is made.

  • Wine 7.1 Released With Vulkan 1.3 Support, Theming Fixes - Phoronix

    With Wine 7.0 having been released, the code freeze is over and we are now onto the Wine 7.x bi-weekly development releases that will then culminate with the Wine 8.0 stable release one year from now. In kicking off the new development series, Wine 7.1 is out today. Wine 7.1 brings support for Vulkan 1.3 that released earlier this week. The headers and other bits for Wine's Vulkan integration have been updated against the v1.3 specification.

How the Free Software and the IP Wars of the 1990s and 2000s Presaged Today’s Toxic, Concentrated Internet

The history of free software and the IP Wars of the 1990s and 2000s provides a good illustration of these path-dependencies around the meaning of liberty, law, and power throughout the period. In response to the rise in prominence of Unix, a proprietary system developed by Bell Labs, in the 1980s, free software advocate Richard Stallman and others began a crusade to liberate software from its proprietary ties. They created the GPL (“GNU Public License”) a free open license that requires anyone reusing, buying or redistributing the software to comply with the freedoms granted by the original license.. The free software movement later inspired a parallel movement to liberate content and creativity from copyright strictures. In an article titled “Anarchism Triumphant,” Columbia Law Professor Eben Moglen argued that free software represented the beginning of a shift towards a free-er anarchic digital political economy which would do away with most forms of private ownership. In a 1994 essay, Electronic Frontier Foundation co-founder John Perry Barlow argued that copyright law, which protects the material expression of ideas, had become obsolete on the internet, the “Home of the Mind.” Many of these ideas grew in opposition to the powerful interests of the time: against firms like Bell Labs producing proprietary software, against firms like AT&T controlling telecommunications and broadband, against Hollywood studios and music labels who sought to enclose and profit from creative digital assets. Yet many of these views also unconsciously built the intellectual, legal, and economic case for new forms of enclosure, those that were already being adopted by open platforms such as Google which would soon thrive on the distributed sharing of content by opaquely acquiring control over and monetizing attention and data. In disputes on who should win between Hollywood and YouTube, users were the ones ultimately left behind. As Tel Aviv University Law Professor Niva Elkin-Koren put it, “[w]hat began as a controversy over the appropriateness of copyright law to accommodate … technological changes, became a political battle over the distribution of the potential gains that cyberspace offers.” These so-called “IP Wars” embodied institutional controversies on the stakes of the internet’s ecology and saliently illustrate confusions that are still with us today. For example, as Duke University Law Professor James Boyle put it, it was as if early cyberlibertarians “couldn’t agree on whether [their] motto was to be ‘Taxation is theft’ or ‘Property is theft.’” Their aversion for IP often hid faith in new forms of digital capitalism. Further, the rhetoric of freedom and anarchy underlying the IP Wars helped strengthen commercial interests and monopoly rents on the Internet. Visions of the internet as an apolitical laboratory of innovation, a frictionless space governed by individual choices took the center stage, ultimately facilitating the accumulation of digital control in the hands of a few internet gatekeepers. The move towards private and code-based governance opened the door to widespread and poorly regulated surveillance practices that remained disguised under the facial neutrality of code and cyber-economists’ efficiency-based arguments. Read more

Flatpak App of the Week: Extension Manager – Browse and Install GNOME Shell Extensions

Extension Manager is a very simple app that does one thing (and does it good), to mirror the content of the GNOME Extensions website at extensions.gnome.org. The application lets you easily manage your installed GNOME Shell extensions, similar to what the official GNOME Extensions app does, but it also lets you browse the extensions.gnome.org website straight from within the app if you want to install more extensions on your GNOME desktop. Read more

today's leftovers

  • Custom Piano Tickles the Ivories

    This electronic keyboard is completely designed and built from scratch, including the structure of the instrument and the keys themselves. [Balthasar] made each one by hand out of wood and then built an action mechanism for them to register presses. While they don’t detect velocity or pressure, the instrument is capable of defining the waveform and envelope for any note, is able to play multiple notes per key, and is able to change individual octaves. This is thanks to a custom 6×12 matrix connected to a STM32 microcontroller. Part of the reason [Balthasar] chose this microcontroller is that it can do some of the calculations needed to produce music in a single clock cycle, which is an impressive and under-reported feature for the platform.

  • Hacking A Proper Dash Into The Tesla Model 3 | Hackaday

    The build relies on a CANserver, an ESP32-based device specifically built for hooking up to the CAN bus on Tesla vehicles and sharing the data externally. The data can then be piped wirelessly to an Android phone running CANdash to display all the desired information. With the help of an aftermarket dash clip or a 3D printed custom mount, the phone can then be placed behind the steering wheel to display data in the usual location.

  • Firefox Nightly: These Weeks in Firefox: Issue 108
  • Celebrating Data Privacy Day

    Happy International Data Privacy Day! While January 28 marks a day to raise awareness and promote best practices for privacy and data protection around the world, we at Mozilla do this work year-round so our users can celebrate today — and every day — the endless joy the internet has to offer. We know that data privacy can feel daunting, and the truth is, no one is perfect when it comes to protecting their data 24/7. At Mozilla though, we want to make data protection feel a bit easier and not like something else on the never-ending life to-do list. We build products that protect people online so they can experience the best of the web without compromising on privacy, performance or convenience. The internet is too good to miss out on — we’ll take care of securing it so you can focus on exploring and enjoying it. To accomplish this, we started with square one: our Firefox browser — enhancing its privacy and tracking protections over the past year, while improving its user experience to make surfing the web less dangerous and more carefree. [...] Despite how it sounds, you don’t need to be a hacker to make use of an encrypted connection. Whether you’re online shopping or want to make sure your login credentials are safe from attackers, we’re working on ensuring your browsing experience is secure from start to finish. That’s why, when you open up a Private Browsing tab on Firefox, you can be confident that your information is safe thanks to our HTTPS by Default offering, which ensures the data you share with and receive from a website is encrypted and won’t be able to be intercepted, viewed or tampered with by a hacker. To take this one step further, we’re also working with Internet Service Providers like Comcast and other partners through our Trusted Recursive Resolver program, to begin making DNS encryption the default for Firefox users in the US and Canada.

  • Abuse & Sex Crimes at FOSDEM and Open Source tech events

    All these people have conflicts of interest. For example, Molly herself was secretly sleeping with Chris Lamb when he was leader of Debian. Imagine a woman comes to Molly's team to make an abuse complaint about Lamb or one of his close friends. [...] Women trusting women simply because they are women is not a good choice. There are numerous examples of women like Molly who have been sympathetic to or even in cahoots with male abusers.

  • What is MongoDB, and how does it work? | FOSS Linux

    MongoDB is the most common and widely used NoSQL database. It is an open-source document-oriented DB. NoSQL is used to refer to ‘non-relational’. This means that the MongoDB database is not based on tabular relations like RDBMS as it provides a distinct storage and data retrieval mechanism. The storage format employed by MongoDB is referred to as BSON. The database is maintained by MongoDB Inc. and is licensed under the Server-Side Public License (SSPL).