Programming Leftovers
-
Week 1 report or porting Gentoo packages to modern C
Hello all,
This is my week 1 report for my project “Modern C porting of Gentoo
packages” as a Google summer of code student at Gentoo Linux foundation.
Some of you might recognize me from last year, yep this is my second
time (and unfortunately last).I’ll try to divide my report into two sections, current which is where
I’ll discuss the current status and next which is where I’ll discuss what
I’m going to do it next. -
A “read more” link in GoHugo
Hugo supports the WordPress-style tag in blog posts, which split your text into a summary and body. What if you wanted your template to always show the full text of a post, unless you provided a manual summary?
Define this in your
index.html
template: [...] -
How to Use pathinfo() Function in PHP
The pathinfo() in PHP is used to get the information about the file path. Learn more about this function in this guide.
-
How to Use realpath() Function in PHP
The realpath() in PHP is used to find the absolute or real path of the file or a directory. Read about the usage of realpath() function in this guide.
-
How to Clear Local Storage Using JavaScript
The “clear()” method allows the users to remove the local storage item stored in the current domain i.e., browser or from the particular domain.
-
How to Use JavaScript getBoundingClientRect() Method
The “getBoundingClientRect()” method computes the associated HTML element size and its relative position on a web page corresponding to the viewport.
-
How to Set Vertical Alignment to Middle in JavaScript
In JavaScript, the Style “vertical alignment” property sets the vertical alignment of the associated HTML element to “middle”.
-
How to Change the Button Text in JavaScript
JavaScript offers the “innerHTML”, “innerText”, “textContent”, and “value” properties to change the button text created using “” or “” tags.
-
How to Add p Tags to a div Using JavaScript
The HTML DOM provides the “createElement()” for creating the desired HTML element and then adds it to the existing element through the “appendChild()” method.
-
How to Escape a Single Quote From a String in JavaScript
The “\ (backslash)” escape character escapes a single quote(‘) from a string. It treats the next specified character as a literal instead of special character.
-
How to Use log() Function in PHP
The log() function in PHP is used to find the logarithm of the number. Learn how to use the log() function in this guide.
-
How to Convert String to Float in PHP
There are various built-in methods including typecasting, floatval(), and number_format() to convert the string to float in PHP.
-
The Best Programming Language for Mathematical Programming Matlab vs R
Both MATLAB and R have their unique strengths for mathematical programming. Follow this guide to learn about them in detail.
-
round function in MatLab
The round function in MATLAB is used to round numbers to the nearest whole number or a specified decimal place.
-
How to Use index.php Instead of index.html in PHP
PHP developers can easily use index.php instead of index.html by following the guidelines mentioned in this article.
-
How to Set the Offset in jQuery
The “offset()” method in jQuery sets or retrieves the current position(top, and left) of the HTML elements corresponding to the window or document.
-
How Does the HTML DOM Form action Property Work in JavaScript
The form “action” property is associated with the “action” attribute to set and retrieve its value after clicking on the “Submit” button.
-
Thorsten Alteholz: My Debian Activities in May 2023
FTP master
This month I accepted 157 and rejected 22 packages. The overall number of packages that got accepted was 160.
This was my hundred-seventh month that I did some work for the Debian LTS initiative, started by Raphael Hertzog at Freexian.
- [DLA 3430-1] cups-filters security update for one CVE
- [DSA 5407-1] cups-filters security update for one CVE
- [unstable] upload of cups-filters to fix CVE-2023-24805
- [#1036548] unblock bug to fix CVE-2023-24805 in bookworm
- [unstable] upload of sniproxy to fix CVE-2023-25076
- [DSA 5413-1] sniproxy security update in Bullseye for one CVE
- [cups] working to fix CVE-2023-32324 in unstable, Bookworm, Bullseye, Buster
-
Trunk Monkey, also shellCMS_bulma
Fred saw "Skippy the Bush Kangaroo" post:
https://bkhome.org/news/202305/skippy-the-bush-kangaroo.html
And has replied with "Trunk Monkey" from Canada:
https://www.youtube.com/watch?v=_qtG82HJB2I
Changing the subject completely, Andres has enhanced my shellCMS (Content Management System) and created a github repository:
-
GNU World Order 515
Apache Portable Runtime ( **apr** and **apr-util** ), **argon2** , **aspell** , **at-spi2-atk** and **at-spi2-core** and accessibility. Here's a demo simple `cat` command coded with Apache Portable Runtime: #include int main(){ //setup apr_initialize(); apr_pool_t *mypool; apr_pool_create(&mypool, NULL); apr_file_t *file; char *myfile = "text.txt"; //cat apr_file_open(&file, myfile, APR_READ, APR_OS_DEFAULT, mypool); apr_off_t offset = 0; apr_file_seek(file, APR_END, &offset); apr_size_t size = offset; char *mybuffer = apr_pcalloc(mypool, size +1); offset = 0; apr_file_seek(file, APR_SET, &offset); apr_file_read(file, mybuffer, &size); printf(mybuffer); //cleanup apr_file_close(file); apr_pool_destroy(mypool); apr_terminate(); return 0; To compile: $ gcc -I/usr/include/apr-1 -lapr-1 -o mycat mycat.c shasum -a256=5f412c41c0e1855658efe3962e3a87573f73102e56f32588c214451074fdb840
-
Writing a KVM hypervisor VMM in Python
Linux's Kernel Virtual Machine (KVM) is a hypervisor built into the Linux kernel. Whereas in the past Xen proved a more popular hypervisor for multi-tenant clouds — being the original basis of AWS EC2, for example — over the years Linux's own hypervisor has matured and grown in popularity, and now eclipsed Xen as the hypervisor of preference for many clouds. AWS at some point switched to KVM (though it's unclear to me if they still use it or a custom hypervisor at this point), and Google Cloud has used KVM from the beginning.
-
LibreOffice Conf Asia x UbuCon Asia 2023 – Surakarta
Our community in Asia let us know about an event they're organising LibreOffice Conf Asia x UbuCon Asia 2023 (hereinafter referred to as LOUCA23) is an event that brings together Linux and Open Source Software (OSS) activists, contributors, users, communities, and businesses in the Asian region, mainly related to and focused on the LibreOffice...
-
GitLab Pages preview
In this post, I showed how to preview GitLab Pages and share the preview’s URL with teammates in a couple of steps. The hardest part was to realize that web artifacts are rendered regularly with the browser.
-
Gotam Gorabh: GSoC 2023 [Week 2 Report]: Add “Remote Desktop” page into the system panel
Project Title: Create a New “System” panel in GNOME Settings
Mentor: Felipe Borges
Contributor: Gotam GorabhIntroduction
Implementing Remote Desktop page will allow users to access and control a computer or a desktop environment remotely from another location. It enables users to connect to a remote computer or server and interact with it as if they were physically present in front of it.